Package org.languagetool.gui
Class ConfigurationDialog
java.lang.Object
org.languagetool.gui.ConfigurationDialog
- All Implemented Interfaces:
ActionListener
,EventListener
Dialog that offers the available rules so they can be turned on/off
individually.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private Configuration
private boolean
private JTree[]
private final List
<org.languagetool.rules.Rule> private JDialog
private boolean
private final boolean
private static final int
private final ResourceBundle
private static final String
private final Configuration
private final Frame
private boolean
private boolean
private JCheckBox
private JTextField
private JCheckBox
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationDialog
(Frame owner, boolean insideOffice, Configuration config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
(package private) void
addExtraPanel
(JPanel panel) Add extra JPanel to this dialog.private void
createNonOfficeElements
(GridBagConstraints cons, JPanel portPanel) private void
createOfficeElements
(GridBagConstraints cons, JPanel portPanel) private DefaultMutableTreeNode
createTree
(List<org.languagetool.rules.Rule> rules, boolean isStyle, String tabName) private boolean
getEnabledState
(org.languagetool.rules.Rule rule) private @Nullable org.languagetool.Language
getLanguageForLocalizedName
(String languageName) Get the Language object for the given localized language name.private @NotNull JPanel
private @NotNull MouseAdapter
private JPanel
private String[]
private @NotNull JPanel
getProfilePanel
(GridBagConstraints cons, List<org.languagetool.rules.Rule> rules) private JPanel
private @NotNull JPanel
getTreeButtonPanel
(int num) private @NotNull DefaultTreeModel
getTreeModel
(DefaultMutableTreeNode rootNode) (package private) JPanel
getUnderlineColorPanel
(List<org.languagetool.rules.Rule> rules) private JPanel
boolean
boolean
private int
showRemoteServerHint
(Component component, boolean otherServer)
-
Field Details
-
NO_MOTHER_TONGUE
- See Also:
-
ACTION_COMMAND_OK
- See Also:
-
ACTION_COMMAND_CANCEL
- See Also:
-
MAX_PORT
private static final int MAX_PORT- See Also:
-
messages
-
original
-
config
-
owner
-
insideOffice
private final boolean insideOffice -
configChanged
private boolean configChanged -
profileChanged
private boolean profileChanged -
restartShow
private boolean restartShow -
firstSelection
private boolean firstSelection -
dialog
-
serverCheckbox
-
serverPortField
-
configTree
-
serverSettingsCheckbox
-
extraPanels
-
configurableRules
-
-
Constructor Details
-
ConfigurationDialog
-
-
Method Details
-
addExtraPanel
Add extra JPanel to this dialog. If the panel implements , this dialog will callSavablePanel.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
-
showPanel
-
createNonOfficeElements
-
createOfficeElements
-
showRemoteServerHint
-
getTreeModel
-
getMouseAdapter
-
getTreeButtonPanel
-
getProfilePanel
@NotNull private @NotNull JPanel getProfilePanel(GridBagConstraints cons, List<org.languagetool.rules.Rule> rules) -
getMotherTonguePanel
-
getNgramPanel
-
getWord2VecPanel
-
getPossibleMotherTongues
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
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
orGerman
(case is significant)- Returns:
- a Language object or
null
if the language could not be found
-
getSpecialRuleValuePanel
-
getUnderlineColorPanel
-