
org.fife.ui.rsyntaxtextarea.spell.demo.SpellingParserDemo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spellchecker Show documentation
Show all versions of spellchecker Show documentation
A simple spell checker add-on for RSyntaxTextArea. It will spell-check comments in source code, or the entire file if you are editing plain text. Spelling errors are squiggle-underlined with the color of your choice, and tooltips are available offering any spelling suggestions.
/*
* 07/21/2009
*
* SpellingParserDemo.java - Demo of the spell-checker for RSyntaxTextArea.
*
* This library is distributed under the LGPL. See the included
* SpellChecker.License.txt file for details.
*/
package org.fife.ui.rsyntaxtextarea.spell.demo;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
/**
* Demo application for the SpellingParser
add-on to RSTA.
*
* @author Robert Futrell
* @version 1.0
*/
public class SpellingParserDemo extends JFrame {
/**
* Constructor.
*/
public SpellingParserDemo() {
setRootPane(new DemoRootPane());
setTitle("Spelling Parser Demo");
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setLocationRelativeTo(null);
}
/**
* Program entry point.
*
* @param args Command line arguments.
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
String laf = UIManager.getSystemLookAndFeelClassName();
laf = "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel";
UIManager.setLookAndFeel(laf);
} catch (RuntimeException re) { // FindBugs
throw re;
} catch (Exception e) {
e.printStackTrace();
}
new SpellingParserDemo().setVisible(true);
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy