|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.util.CurrentDate
public class CurrentDate
CurrentDate
is a text model that updates itself with the current date.
The default update interval is one day.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Fields inherited from class com.sas.util.DateTimeMonitor |
---|
alarm, date, dateTimeFormat, defaultTimeZone |
Fields inherited from interface com.sas.util.TimeIntervals |
---|
ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK |
Constructor Summary | |
---|---|
CurrentDate()
Default constructor. |
|
CurrentDate(java.text.DateFormat dateFormat)
Custom constructor for non-Locale default date format and calendar. |
|
CurrentDate(java.text.DateFormat dateFormat,
java.util.Calendar calendar)
Deprecated. the calendar parameter is no longer used. Use
|
|
CurrentDate(int format)
Custom constructor for default date format |
|
CurrentDate(java.lang.String format)
Custom constructor for default date format |
Method Summary | |
---|---|
protected long |
getDelay()
Override the delay until the alarm should fire. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
long |
getInterval()
Return the interval at which the monitor updates the date/time and text properties. |
static long |
millisUntilMidnight(java.util.Calendar calendar)
Compute the number of milliseconds remaining until midnight, based on a Calendar object. |
Methods inherited from class com.sas.util.DateTimeMonitor |
---|
fireAlarm, getDateTime, getFormat, isAlarmRunning, newAlarm, setFormat, setInterval, start, stop, update, validateObject |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public CurrentDate()
CurrentDate
object which updates
it's text attribute when the date changes, using the
default Locale
specific date format.
public CurrentDate(java.text.DateFormat dateFormat, java.util.Calendar calendar)
CurrentDate(DateFormat dateFormat)
Locale
default date format.
dateFormat
- a date format with which the date is rendered.calendar
- a calendar with which time values are obtainedpublic CurrentDate(java.text.DateFormat dateFormat)
dateFormat
- a date format with which the date is rendered.public CurrentDate(int format)
format
- one of
DateFormat.SHORT
,
DateFormat.MEDIUM
,
DateFormat.LONG
, or
DateFormat.FULL
public CurrentDate(java.lang.String format)
format
- A format string used to construct a SimpleDateFormat
object which is used to format the date and time.
The default time zone is used.Method Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public static long millisUntilMidnight(java.util.Calendar calendar)
Calendar
object.
calendar
- a Calendar
object. If
null
,
the default calendar is used.protected long getDelay()
CurrentDate
,
it is the time until the next day (time until midnight)
getDelay
in class DateTimeMonitor
CurrentDate
should updatepublic long getInterval()
TimeIntervals.ONE_DAY
getInterval
in class DateTimeMonitor
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |