Class ConfigurationDialog

java.lang.Object
org.languagetool.gui.ConfigurationDialog
All Implemented Interfaces:
ActionListener, EventListener

public class ConfigurationDialog extends Object implements ActionListener
Dialog that offers the available rules so they can be turned on/off individually.
  • Field Details

    • NO_MOTHER_TONGUE

      private static final String NO_MOTHER_TONGUE
      See Also:
    • ACTION_COMMAND_OK

      private static final String ACTION_COMMAND_OK
      See Also:
    • ACTION_COMMAND_CANCEL

      private static final String ACTION_COMMAND_CANCEL
      See Also:
    • MAX_PORT

      private static final int MAX_PORT
      See Also:
    • messages

      private final ResourceBundle messages
    • original

      private final Configuration original
    • config

      private Configuration config
    • owner

      private final Frame owner
    • insideOffice

      private final boolean insideOffice
    • configChanged

      private boolean configChanged
    • profileChanged

      private boolean profileChanged
    • restartShow

      private boolean restartShow
    • firstSelection

      private boolean firstSelection
    • dialog

      private JDialog dialog
    • serverCheckbox

      private JCheckBox serverCheckbox
    • serverPortField

      private JTextField serverPortField
    • configTree

      private JTree[] configTree
    • serverSettingsCheckbox

      private JCheckBox serverSettingsCheckbox
    • extraPanels

      private final List<JPanel> extraPanels
    • configurableRules

      private final List<org.languagetool.rules.Rule> configurableRules
  • Constructor Details

    • ConfigurationDialog

      public ConfigurationDialog(Frame owner, boolean insideOffice, Configuration config)
  • Method Details

    • addExtraPanel

      void addExtraPanel(JPanel panel)
      Add extra JPanel to this dialog. If the panel implements , this dialog will call SavablePanel.save() after the user clicks OK.
      Parameters:
      panel - the JPanel to be added to this dialog
      Since:
      3.4
    • createTree

      private DefaultMutableTreeNode createTree(List<org.languagetool.rules.Rule> rules, boolean isStyle, String tabName)
    • getEnabledState

      private boolean getEnabledState(org.languagetool.rules.Rule rule)
    • show

      public boolean show(List<org.languagetool.rules.Rule> rules)
    • showPanel

      public boolean showPanel(List<org.languagetool.rules.Rule> rules)
    • createNonOfficeElements

      private void createNonOfficeElements(GridBagConstraints cons, JPanel portPanel)
    • createOfficeElements

      private void createOfficeElements(GridBagConstraints cons, JPanel portPanel)
    • showRemoteServerHint

      private int showRemoteServerHint(Component component, boolean otherServer)
    • getTreeModel

      @NotNull private @NotNull DefaultTreeModel getTreeModel(DefaultMutableTreeNode rootNode)
    • getMouseAdapter

      @NotNull private @NotNull MouseAdapter getMouseAdapter()
    • getTreeButtonPanel

      @NotNull private @NotNull JPanel getTreeButtonPanel(int num)
    • getProfilePanel

      @NotNull private @NotNull JPanel getProfilePanel(GridBagConstraints cons, List<org.languagetool.rules.Rule> rules)
    • getMotherTonguePanel

      @NotNull private @NotNull JPanel getMotherTonguePanel(GridBagConstraints cons)
    • getNgramPanel

      private JPanel getNgramPanel(GridBagConstraints cons)
    • getWord2VecPanel

      private JPanel getWord2VecPanel(GridBagConstraints cons)
    • getPossibleMotherTongues

      private String[] getPossibleMotherTongues()
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getLanguageForLocalizedName

      @Nullable private @Nullable org.languagetool.Language getLanguageForLocalizedName(String languageName)
      Get the Language object for the given localized language name.
      Parameters:
      languageName - e.g. English or German (case is significant)
      Returns:
      a Language object or null if the language could not be found
    • getSpecialRuleValuePanel

      private JPanel getSpecialRuleValuePanel()
    • getUnderlineColorPanel

      JPanel getUnderlineColorPanel(List<org.languagetool.rules.Rule> rules)