Package org.languagetool.gui
Class Tools
java.lang.Object
org.languagetool.gui.Tools
GUI-related tools.
- Author:
- Daniel Naber
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcenterDialog(JDialog dialog) Set dialog location to the center of the screenstatic voidconfigureFromRules(org.languagetool.JLanguageTool langTool, Configuration config) static StringReturns translation of the UI element without the control character&.static chargetMnemonic(String label) Returns mnemonic of a UI element.static StringshortenComment(String comment) LibO shortens menu items with more than ~100 characters by dropping text in the middle.
-
Method Details
-
shortenComment
LibO shortens menu items with more than ~100 characters by dropping text in the middle. That isn't really sensible, so we shorten the text here in order to preserve the important parts. -
getLabel
Returns translation of the UI element without the control character&. To have&in the UI, use&&.- Parameters:
label- Label to convert.- Returns:
- String UI element string without mnemonics.
-
getMnemonic
Returns mnemonic of a UI element.- Parameters:
label- String Label of the UI element- Returns:
- Mnemonic of the UI element, or
-