Package adams.data
Class DateFormatString
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.data.DateFormatString
-
- All Implemented Interfaces:
CloneHandler<BaseObject>,HelpProvider,Serializable,Comparable
public class DateFormatString extends AbstractBaseString implements HelpProvider
Wrapper for date/time formats.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description DateFormatString()Initializes the string withConstants.DATE_FORMAT.DateFormatString(String s)Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHelpDescription()Returns a long help description, e.g., used in tiptexts.StringgetHelpIcon()Returns the name of a help icon, e.g., used for buttons.StringgetHelpTitle()Returns a short title for the help, e.g., used for buttons.StringgetHelpURL()Returns a URL with additional information.StringgetTipText()Returns a tool tip for the GUI editor (ignored if null is returned).booleanhasFavoritesSupport()Whether this object should have favorites support.protected voidinitialize()Initializes the internal object.booleanisValid(String value)Checks whether the string value is a valid presentation for this class.DateFormattoDateFormat()Returns a configuredDateFormatobject.DateFormattoDateFormat(TimeZone tz)Returns a configuredDateFormatobject.-
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
-
-
-
-
Constructor Detail
-
DateFormatString
public DateFormatString()
Initializes the string withConstants.DATE_FORMAT.
-
DateFormatString
public DateFormatString(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:
initializein classAbstractBaseString
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValidin 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:
getTipTextin classAbstractBaseString- Returns:
- the tool tip
-
toDateFormat
public DateFormat toDateFormat()
Returns a configuredDateFormatobject.- Returns:
- the configured object
-
toDateFormat
public DateFormat toDateFormat(TimeZone tz)
Returns a configuredDateFormatobject.- Parameters:
tz- the timezone to use- Returns:
- the configured object
-
getHelpURL
public String getHelpURL()
Returns a URL with additional information.- Specified by:
getHelpURLin interfaceHelpProvider- Returns:
- the URL, null if not available
-
getHelpDescription
public String getHelpDescription()
Returns a long help description, e.g., used in tiptexts.- Specified by:
getHelpDescriptionin 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:
getHelpTitlein 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:
getHelpIconin interfaceHelpProvider- Returns:
- the icon name, null if not available
-
hasFavoritesSupport
public boolean hasFavoritesSupport()
Whether this object should have favorites support.- Overrides:
hasFavoritesSupportin classBaseObject- Returns:
- true if to support favorites
-
-