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.


Variable Index

 o day
The day in the range of 1 to the last day in the month.
 o hour
The hour in the range of 0 to 23.
 o millis
Milliseconds in the range of 0 to 999.
 o minute
The minute in the range of 0 to 59.
 o month
The month in the range of 1 to 12.
 o second
The second in the range of 0 to 59.
 o year
The year as its full set of digits (year 2010 is 2010).

Constructor Index

 o Time()
Allocates a Time object and intializes it to the current time.
 o Time(int, int, int, int, int, int, int)
Allocates a Date object specified by the year, month, and date arguments.

Method Index

 o run()
 o setFormat(String)
Format a given date to the default format
 o setLabel(Label)
Set the handle to the label to be updated
 o setTextField(TextField)
Set the handle to the label to be updated
 o setUpdateInterval(int)
Format a given date to the default format
 o timerTicked()

Variables

 o year
 public int year
The year as its full set of digits (year 2010 is 2010).

 o month
 public int month
The month in the range of 1 to 12.

 o day
 public int day
The day in the range of 1 to the last day in the month.

 o hour
 public int hour
The hour in the range of 0 to 23.

 o minute
 public int minute
The minute in the range of 0 to 59.

 o second
 public int second
The second in the range of 0 to 59.

 o millis
 public int millis
Milliseconds in the range of 0 to 999.

Constructors

 o Time
 public Time()
Allocates a Time object and intializes it to the current time.

 o 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.

Methods

 o 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)
 o 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
 o 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
 o 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
 o timerTicked
 public void timerTicked()
 o run
 public void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index