Package adams.data
Class DecimalFormatString
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.data.DecimalFormatString
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,HelpProvider
,Serializable
,Comparable
public class DecimalFormatString extends AbstractBaseString implements HelpProvider
Wrapper for decimal formats.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT
the default value.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description DecimalFormatString()
Initializes the string with "0".DecimalFormatString(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHelpDescription()
Returns a long help description, e.g., used in tiptexts.String
getHelpIcon()
Returns the name of a help icon, e.g., used for buttons.String
getHelpTitle()
Returns a short title for the help, e.g., used for buttons.String
getHelpURL()
Returns a URL with additional information.String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
hasFavoritesSupport()
Whether this object should have favorites support.protected void
initialize()
Initializes the internal object.boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.DecimalFormat
toDecimalFormat()
Returns a configuredDecimalFormat
object.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, isEmpty, length, setValue, stringValue
-
Methods inherited from class adams.core.base.BaseObject
compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
-
-
-
-
Field Detail
-
DEFAULT
public static final String DEFAULT
the default value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DecimalFormatString
public DecimalFormatString()
Initializes the string with "0".
-
DecimalFormatString
public DecimalFormatString(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the internal object.- Overrides:
initialize
in classAbstractBaseString
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValid
in classAbstractBaseString
- Parameters:
value
- the string value to check- Returns:
- always true
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipText
in classAbstractBaseString
- Returns:
- the tool tip
-
toDecimalFormat
public DecimalFormat toDecimalFormat()
Returns a configuredDecimalFormat
object.- Returns:
- the configured object
-
getHelpURL
public String getHelpURL()
Returns a URL with additional information.- Specified by:
getHelpURL
in interfaceHelpProvider
- Returns:
- the URL, null if not available
-
getHelpDescription
public String getHelpDescription()
Returns a long help description, e.g., used in tiptexts.- Specified by:
getHelpDescription
in interfaceHelpProvider
- Returns:
- the help text, null if not available
-
getHelpTitle
public String getHelpTitle()
Returns a short title for the help, e.g., used for buttons.- Specified by:
getHelpTitle
in interfaceHelpProvider
- Returns:
- the short title, null if not available
-
getHelpIcon
public String getHelpIcon()
Returns the name of a help icon, e.g., used for buttons.- Specified by:
getHelpIcon
in interfaceHelpProvider
- Returns:
- the icon name, null if not available
-
hasFavoritesSupport
public boolean hasFavoritesSupport()
Whether this object should have favorites support.- Overrides:
hasFavoritesSupport
in classBaseObject
- Returns:
- true if to support favorites
-
-