com.mentata.sg8
Class SG8UTCAttribute
java.lang.Object
com.mentata.l3d.L3DAttribute
com.mentata.sg8.SG8StringAttribute
com.mentata.sg8.SG8UTCAttribute
- All Implemented Interfaces:
- Comparator, SG8Attribute
- public class SG8UTCAttribute
- extends SG8StringAttribute
A Universal Time Code attribute for use with SG8 objects.
This attribute type represents Universal Time Code date/time signatures that are translated into localized, formatted strings for HTML output. Instances can be configured to use standard Java date and time styles in formatting.
- Since:
- 0.7
- Author:
- Jon Roberts
|
Constructor Summary |
SG8UTCAttribute()
Constructs an empty UTC attribute with the DateFormat.LONG style for the
date and time. |
SG8UTCAttribute(int style)
Constructs an empty UTC attribute with a given DateFormat style for the
date and the DateFormat.LONG style for the time. |
SG8UTCAttribute(int style,
int timestyle)
Constructs an empty UTC attribute with a given DateFormat style for the
date and time. |
|
Method Summary |
String[] |
getHTMLValues()
Returns the attribute values as translated to a formatted date/time stamp. |
| Methods inherited from class com.mentata.l3d.L3DAttribute |
addValue, compare, getAttribute, getBind, getContext, getLabel, getLengthThreshold, getName, getObject, getObject, getPrerequisites, getShortValues, getSize, getThreshold, getValues, initialize, isBound, isExceeded, isGenerated, isLengthExceeded, isMultivalue, isRequired, removeValue, same, setGenerated, setLabel, setLengthThreshold, setPrerequisites, setThreshold, setValues |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SG8UTCAttribute
public SG8UTCAttribute()
- Constructs an empty UTC attribute with the
DateFormat.LONG style for the
date and time.
SG8UTCAttribute
public SG8UTCAttribute(int style)
- Constructs an empty UTC attribute with a given
DateFormat style for the
date and the DateFormat.LONG style for the time.
- Parameters:
style - the date length pattern, like DateFormat.SHORT
SG8UTCAttribute
public SG8UTCAttribute(int style,
int timestyle)
- Constructs an empty UTC attribute with a given
DateFormat style for the
date and time.
- Parameters:
style - the date length pattern, like DateFormat.SHORTtimestyle - the time length pattern, like DateFormat.SHORT
getHTMLValues
public String[] getHTMLValues()
throws SG8Exception
- Returns the attribute values as translated to a formatted date/time stamp.
- Specified by:
getHTMLValues in interface SG8Attribute- Overrides:
getHTMLValues in class SG8StringAttribute
- Returns:
- formatted date/time stamps
- Throws:
SG8Exception