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 Stringprivate static final Stringprivate Stringprivate final Configurationprivate booleanprivate JTree[]private JDialogprivate Stringprivate JPanelprivate JPanelprivate booleanprivate final booleanprivate final Imageprivate static final intprivate final ResourceBundleprivate static final Stringprivate final Configurationprivate final Frameprivate booleanprivate booleanprivate DefaultMutableTreeNode[]private Ruleprivate JCheckBoxprivate JTextFieldprivate JCheckBoxprivate static final intprivate static final intprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationDialog(Frame owner, boolean insideOffice, Image ltImage, String title, Configuration config) ConfigurationDialog(Frame owner, boolean insideOffice, Configuration config) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate StringaddColonToMessageString(String message) (package private) voidaddExtraPanel(JPanel panel) Add extra JPanel to this dialog.private voidaddNgramPanel(GridBagConstraints cons, JPanel panel) private voidaddOfficeLanguageElements(GridBagConstraints cons, JPanel portPanel) private voidaddOfficeTextruleElements(GridBagConstraints cons, JPanel portPanel) voidclose()private voidcreateNonOfficeElements(GridBagConstraints cons, JPanel portPanel) private voidcreateOfficeElements(GridBagConstraints cons, JPanel portPanel) private DefaultMutableTreeNodecreateTree(List<Rule> rules, boolean isStyle, String tabName, DefaultMutableTreeNode root) private JPanelgetChangedRulesPanel(List<Rule> rules, boolean enabledRules, JPanel panel) Panel to select disabled default rulesprivate booleangetEnabledState(Rule rule) private LanguagegetLanguageForLocalizedName(String languageName) Get the Language object for the given localized language name.private JPanelprivate MouseAdapterprivate JPanelprivate JPanelprivate JPanelprivate String[]getPossibleLanguages(boolean addNoSeletion) private JPanelgetProfilePanel(List<Rule> rules) private JPanelgetRuleOptionsPanel(int num) Panel to choose underline Colors and rule options (if exists)private JPanelgetTreeButtonPanel(int num) private DefaultTreeModelgetTreeModel(DefaultMutableTreeNode rootNode, List<Rule> rules) (package private) JPanelgetUnderlineColorPanel(List<Rule> rules) Panel to choose underline Colorsprivate intgetUnderlineType(String category, String ruleId) private String[]private voidsetUnderlineType(int index, String category, String ruleId) booleanbooleanprivate intshowRemoteServerHint(Component component, boolean otherServer) private voidupdateProfileRules(List<Rule> rules) Update display of profile rulesprivate voidupdateRulesTrees(List<Rule> rules) Update display of rules tree
-
Field Details
-
NO_SELECTED_LANGUAGE
- See Also:
-
ACTION_COMMAND_OK
- See Also:
-
ACTION_COMMAND_CANCEL
- See Also:
-
MAX_PORT
private static final int MAX_PORT- See Also:
-
SHIFT1
private static final int SHIFT1- See Also:
-
SHIFT2
private static final int SHIFT2- See Also:
-
SHIFT3
private static final int SHIFT3- See Also:
-
messages
-
original
-
config
-
owner
-
insideOffice
private final boolean insideOffice -
ltImage
-
dialogTitle
-
configChanged
private boolean configChanged -
profileChanged
private boolean profileChanged -
restartShow
private boolean restartShow -
firstSelection
private boolean firstSelection -
dialog
-
serverCheckbox
-
serverPortField
-
configTree
-
rootNode
-
serverSettingsCheckbox
-
disabledRulesPanel
-
enabledRulesPanel
-
extraPanels
-
configurableRules
-
category
-
rule
-
-
Constructor Details
-
ConfigurationDialog
-
ConfigurationDialog
public ConfigurationDialog(Frame owner, boolean insideOffice, Image ltImage, String title, Configuration config)
-
-
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<Rule> rules, boolean isStyle, String tabName, DefaultMutableTreeNode root) -
getEnabledState
-
show
-
close
public void close() -
showPanel
-
createNonOfficeElements
-
addOfficeLanguageElements
-
addOfficeTextruleElements
-
getOfficeTechnicalElements
-
createOfficeElements
-
showRemoteServerHint
-
getTreeModel
-
getMouseAdapter
-
getTreeButtonPanel
-
getProfilePanel
-
addColonToMessageString
-
getMotherTonguePanel
-
getNgramPanel
-
addNgramPanel
-
getPossibleLanguages
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
getLanguageForLocalizedName
Get the Language object for the given localized language name.- Parameters:
languageName- e.g.EnglishorGerman(case is significant)- Returns:
- a Language object or
nullif the language could not be found
-
updateRulesTrees
Update display of rules tree -
updateProfileRules
Update display of profile rules -
getChangedRulesPanel
Panel to select disabled default rules- Since:
- 5.4
-
getUnderlineTypes
-
getUnderlineType
-
setUnderlineType
-
getUnderlineColorPanel
Panel to choose underline Colors- Since:
- 4.2
-
getRuleOptionsPanel
Panel to choose underline Colors and rule options (if exists)- Since:
- 5.3
-
getOfficeAiElements
-