Package hec.gui
Class DSSI18n
java.lang.Object
hec.gui.DSSI18n
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureAction(Action action) voidconfigureButton(AbstractButton button) configure the button with the attributes specified by this I18n object.create aJCheckBoxMenuItemusing the attributes specified by the I18n objectcreate aJButtonusing the attributes specified by theI18nobjectcreate aJCheckBoxusing the attributes specified by theI18nobjectcreateJCheckBox(Object[] args) create aJCheckBoxusing the attributes specified by theI18nobject with the newJCheckBox's text formatted with argscreate aJLabelusing the attributes specified by theI18nobjectcreateJLabel(Object[] formatArgs) create aJLabelusing the attributes specified by theI18nobject with the newJLabel's text formatted with formatArgscreate aJRadioButtonusing the attributes specified by theI18nobjectcreateJRadioButton(Object[] args) create aJRadioButtonusing the attributes specified by theI18nobject with the newJRadioButton's text formatted with argscreate aJMenuItemusing the attributes specified by theI18nobjectcreateMenuItem(Object[] formatArgs) create aJMenuItemusing the attributes specified by theI18nobject with the newJMenuItems's text formatted with formatArgsreturn the text attribute formatted with argreturn the text attribute formatted with argsformatToolTipText(Object[] args) return the tooltip text attribute formatted with argsprotected StringgetArrayDelimiter(String key) get the delimiter String for the array specified bykey.delimiterget the backgroundColorobject (specified by .background) of thisI18nobjectbooleanreturn the text as a booleanprotected Stringdouble[]get an array of doubles specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key.get the foregroundColorobject (specified by .foreground) of thisI18nobjectgetHelp()get the Help String (specified by .help) of thisI18nobjectstatic DSSI18nstatic DSSI18ngetIcon()get theIcon(specified by .icon) of thisI18nobjectint[]get an array of ints specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key.intreturn the text as an intget theKeyStroke(specified by .keystroke) of thisI18nobjectgetLabel()Deprecated.use getText()intget the mnemonic attribute (specified by .mnemonic) of thisI18nobjectgetName()get the name (specified by .name) of thisI18nobjectget theIcon(specified by .selectedIcon) of thisI18nobjectprotected StringString[]get an array of Strings specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key.getText()get the text (specified by .text) of thisI18nobject.protected StringgetText(boolean returnNull) get the tooltip attribute (specified by .tooltip) of thisI18nobject
-
Field Details
-
DEFAULT_BUNDLE_NAME
- See Also:
-
-
Constructor Details
-
DSSI18n
-
-
Method Details
-
getI18n
-
getI18n
-
getLabel
Deprecated.use getText()get the label (specified by .label) of thisI18nobject- Returns:
- the text
-
getText
get the text (specified by .text) of thisI18nobject. if .text isn't defined then for backward compatibibility .label is tried.- Returns:
- the text
-
getText
-
getName
get the name (specified by .name) of thisI18nobject- Returns:
- the name or null
-
getHelp
get the Help String (specified by .help) of thisI18nobject- Returns:
- the help String or null
-
getForeground
get the foregroundColorobject (specified by .foreground) of thisI18nobject- Returns:
- the foreground
Coloror null
-
getBackground
get the backgroundColorobject (specified by .background) of thisI18nobject- Returns:
- the background
Coloror null
-
getString
-
getStringArray
get an array of Strings specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key. The default array separator can be defined by overridinggetDefaultArrayDelimiter()- Returns:
- an array of elements separated by the .array.delimiter
-
getDoubleArray
public double[] getDoubleArray()get an array of doubles specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key. The default array separator can be defined by overridinggetDefaultArrayDelimiter()
if an item in the .array can't be parsed as a double it will be set toRmaConst.UNDEF_DOUBLE- Returns:
- an array of elements separated by the .array.delimiter, if the
.array can't be found an array of zero length is returned
-
getIntArray
public int[] getIntArray()get an array of ints specified by .array of thisI18nobject
Array elements are by default separated by commas (,) but can be specified by the .array.delimiter key. The default array separator can be defined by overridinggetDefaultArrayDelimiter()
if an item in the .array can't be parsed as an int it will be set toRmaConst.UNDEF_INT- Returns:
- an array of elements separated by the .array.delimiter, if the
.array can't be found an array of zero length is returned
-
getArrayDelimiter
get the delimiter String for the array specified bykey.delimiter- Parameters:
key- the array property key- Returns:
- the array delimiter, if
key.delimiter isn't set then use the value returned bygetDefaultArrayDelimiter
-
getDefaultArrayDelimiter
-
getKeyStroke
get theKeyStroke(specified by .keystroke) of thisI18nobject- Returns:
- the Icon object or null
- See Also:
-
getIcon
get theIcon(specified by .icon) of thisI18nobject- Returns:
- the Icon object or null
-
getSelectedIcon
get theIcon(specified by .selectedIcon) of thisI18nobject- Returns:
- the Icon object or null
-
getToolTipText
get the tooltip attribute (specified by .tooltip) of thisI18nobject- Returns:
- the tooltip attribute or null
-
getMnemonic
public int getMnemonic()get the mnemonic attribute (specified by .mnemonic) of thisI18nobject- Returns:
- the mnemonic attribute or null
-
createJButton
create aJButtonusing the attributes specified by theI18nobject- Returns:
- the new
JButton
-
createJToggleButton
- Returns:
-
configureButton
configure the button with the attributes specified by this I18n object. This sets its:- mnemonic
- tooltip
- icon
- name
if the corresponding attribute is set- Parameters:
button- the button to configure.
-
createJRadioButton
create aJRadioButtonusing the attributes specified by theI18nobject- Returns:
- the new
JRadioButton
-
createJRadioButton
create aJRadioButtonusing the attributes specified by theI18nobject with the newJRadioButton's text formatted with args- Returns:
- the new
JRadioButton
-
createJCheckBox
create aJCheckBoxusing the attributes specified by theI18nobject- Returns:
- the new
JCheckBox
-
createJCheckBox
create aJCheckBoxusing the attributes specified by theI18nobject with the newJCheckBox's text formatted with args- Returns:
- the new
JCheckBox
-
createMenuItem
create aJMenuItemusing the attributes specified by theI18nobject with the newJMenuItems's text formatted with formatArgs- Returns:
- the new
JMenuItem
-
createMenuItem
create aJMenuItemusing the attributes specified by theI18nobject- Returns:
- the new
JMenuItem
-
createJLabel
create aJLabelusing the attributes specified by theI18nobject with the newJLabel's text formatted with formatArgs- Returns:
- the new
JLabel
-
createJLabel
create aJLabelusing the attributes specified by theI18nobject- Returns:
- the new
JLabel
-
createCheckBoxMenuItem
create aJCheckBoxMenuItemusing the attributes specified by the I18n object- Returns:
- the new
JCheckBoxMenuItem
-
format
return the text attribute formatted with args- Parameters:
args- the arguments to pass to the formatter- Returns:
- the formatted text attribute
-
format
return the text attribute formatted with arg- Parameters:
arg- the argument to pass to the formatter- Returns:
- the formatted text attribute
-
formatToolTipText
return the tooltip text attribute formatted with args- Parameters:
args- the arguments to pass to the formatter- Returns:
- the formatted tooltip text attribute
-
getIntValue
public int getIntValue()return the text as an int- Returns:
- the int value of getText() or undefined
- See Also:
-
getBooleanValue
public boolean getBooleanValue()return the text as a boolean- Returns:
- the boolean value of getText()
- See Also:
-
configureAction
-