Class Main


  • public final class Main
    extends java.lang.Object
    A simple GUI to check texts with.
    • Field Detail

      • EXTERNAL_LANGUAGE_SUFFIX

        static final java.lang.String EXTERNAL_LANGUAGE_SUFFIX
        See Also:
        Constant Field Values
      • TRAY_SERVER_ICON

        private static final java.lang.String TRAY_SERVER_ICON
        See Also:
        Constant Field Values
      • TRAY_SMALL_SERVER_ICON

        private static final java.lang.String TRAY_SMALL_SERVER_ICON
        See Also:
        Constant Field Values
      • messages

        private final java.util.ResourceBundle messages
      • externalLanguages

        private final java.util.List<org.languagetool.Language> externalLanguages
      • frame

        private javax.swing.JFrame frame
      • taggerDialog

        private javax.swing.JDialog taggerDialog
      • taggerArea

        private javax.swing.JTextPane taggerArea
      • textArea

        private javax.swing.JTextArea textArea
      • numberedTextAreaPane

        private javax.swing.JScrollPane numberedTextAreaPane
      • resultArea

        private javax.swing.JTextPane resultArea
      • enableHttpServerItem

        private java.awt.CheckboxMenuItem enableHttpServerItem
      • trayIcon

        private java.awt.TrayIcon trayIcon
      • closeHidesToTray

        private boolean closeHidesToTray
      • isInTray

        private boolean isInTray
      • taggerShowsDisambigLog

        private boolean taggerShowsDisambigLog
      • currentFile

        private java.io.File currentFile
      • bom

        private org.apache.commons.io.ByteOrderMark bom
      • statusLabel

        private final javax.swing.JLabel statusLabel
      • fontChooserDialog

        private FontChooser fontChooserDialog
      • recentFiles

        private final org.apache.commons.collections4.queue.CircularFifoQueue<java.lang.String> recentFiles
      • recentFilesMenu

        private javax.swing.JMenu recentFilesMenu
      • configDialogs

        private final java.util.Map<org.languagetool.Language,​ConfigurationDialog> configDialogs
      • splitPane

        private javax.swing.JSplitPane splitPane
      • mainPanel

        private final javax.swing.JPanel mainPanel
    • Constructor Detail

    • Method Detail

      • loadFile

        private void loadFile()
      • loadFile

        private void loadFile​(java.io.File file)
      • saveFile

        private void saveFile​(boolean newFile)
      • addLanguage

        private void addLanguage()
                          throws java.lang.InstantiationException,
                                 java.lang.IllegalAccessException
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
      • showOptions

        private void showOptions()
      • showSelectFontDialog

        private void showSelectFontDialog()
      • getFrame

        private java.awt.Component getFrame()
      • updateTitle

        private void updateTitle()
      • createGUI

        private void createGUI()
      • getLabel

        private java.lang.String getLabel​(java.lang.String key)
      • getMnemonic

        private int getMnemonic​(java.lang.String key)
      • getMenuKeyStroke

        private javax.swing.KeyStroke getMenuKeyStroke​(int keyEvent)
      • createMenuBar

        private javax.swing.JMenuBar createMenuBar()
      • updateRecentFilesMenu

        private void updateRecentFilesMenu()
      • loadRecentFiles

        private void loadRecentFiles()
      • addLookAndFeelMenuItem

        private void addLookAndFeelMenuItem​(javax.swing.JMenu lafMenu,
                                            javax.swing.UIManager.LookAndFeelInfo laf,
                                            javax.swing.ButtonGroup buttonGroup)
      • setLookAndFeel

        private void setLookAndFeel()
      • makePopupMenu

        private java.awt.PopupMenu makePopupMenu()
      • checkClipboardText

        private void checkClipboardText()
      • hideToTray

        private void hideToTray()
      • tagText

        private void tagText()
      • quitOrHide

        private void quitOrHide()
      • quit

        private void quit()
      • setTrayIcon

        private void setTrayIcon()
      • showGUI

        private void showGUI()
      • restoreFromTray

        private void restoreFromTray()
      • restoreFromTrayAndCheck

        private void restoreFromTrayAndCheck()
      • getClipboardText

        private java.lang.String getClipboardText()
      • maybeStartServer

        private boolean maybeStartServer()
      • stopServer

        private void stopServer()
      • checkTextAndDisplayResults

        private void checkTextAndDisplayResults()
      • getStackTraceAsHtml

        private java.lang.String getStackTraceAsHtml​(java.lang.Exception e)
      • setWaitCursor

        private void setWaitCursor()
      • unsetWaitCursor

        private void unsetWaitCursor()
      • appendTagsWithDisambigLog

        private boolean appendTagsWithDisambigLog​(java.lang.StringBuilder sb,
                                                  org.languagetool.AnalyzedSentence sentence,
                                                  boolean odd)
      • tagTextAndDisplayResults

        private void tagTextAndDisplayResults()
      • setResultAreaVisible

        private void setResultAreaVisible​(boolean enable)
      • setTrayMode

        private void setTrayMode​(boolean trayMode)
      • main

        public static void main​(java.lang.String[] args)
      • printUsage

        private static void printUsage()
      • getImageIcon

        private javax.swing.ImageIcon getImageIcon​(java.lang.String filename)