All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.util.Time
java.lang.Object
|
+----com.bulletproof.util.Time
- public class Time
- extends Object
- implements TimerListener, Runnable
The class Time represents a specific instant
in time, with millisecond precision.
-
day
- The day in the range of 1 to the last day in the month.
-
hour
- The hour in the range of 0 to 23.
-
millis
- Milliseconds in the range of 0 to 999.
-
minute
- The minute in the range of 0 to 59.
-
month
- The month in the range of 1 to 12.
-
second
- The second in the range of 0 to 59.
-
year
- The year as its full set of digits (year 2010 is 2010).
-
Time()
- Allocates a
Time object
and intializes it to the current time.
-
Time(int, int, int, int, int, int, int)
- Allocates a
Date object
specified by the year, month, and
date arguments.
-
run()
-
-
setFormat(String)
- Format a given date to the default format
-
setLabel(Label)
- Set the handle to the label to be updated
-
setTextField(TextField)
- Set the handle to the label to be updated
-
setUpdateInterval(int)
- Format a given date to the default format
-
timerTicked()
-
year
public int year
- The year as its full set of digits (year 2010 is 2010).
month
public int month
- The month in the range of 1 to 12.
day
public int day
- The day in the range of 1 to the last day in the month.
hour
public int hour
- The hour in the range of 0 to 23.
minute
public int minute
- The minute in the range of 0 to 59.
second
public int second
- The second in the range of 0 to 59.
millis
public int millis
- Milliseconds in the range of 0 to 999.
Time
public Time()
- Allocates a
Time object
and intializes it to the current time.
Time
public Time(int year,
int month,
int day,
int hour,
int minute,
int second,
int millis)
- Allocates a
Date object
specified by the year, month, and
date arguments.
- Parameters:
- year - the year as its full set of digits (year 2010 is 2010).
- month - the month between 1-12.
- date - the day of the month between 1-31.
- hour - the hour between 0-23.
- minute - the minute between 0-59.
- second - the second between 0-59.
- millis - the milliseconds between 0-999.
setFormat
public void setFormat(String format)
- Format a given date to the default format
- Parameters:
- format - the format to display the date time e.g. yyyy/mm/dd hh:mn:ss am (omitting am will use 24 hour clock)
setLabel
public void setLabel(Label thisLabel)
- Set the handle to the label to be updated
- Parameters:
- label - the handle to the label to be updated
setTextField
public void setTextField(TextField thisTextField)
- Set the handle to the label to be updated
- Parameters:
- label - the handle to the label to be updated
setUpdateInterval
public void setUpdateInterval(int seconds)
- Format a given date to the default format
- Parameters:
- seconds - the number of seconds to wait before refreshing the time
timerTicked
public void timerTicked()
run
public void run()
All Packages Class Hierarchy This Package Previous Next Index