|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.redcarton.alarmclock.Time
| Constructor Summary | |
Time(TimeListener listener)
Instantiates a new instance of Time in 24hr format. |
|
Time(TimeListener listener,
boolean twentyFourHourFormat)
Instantiates a new instance of Time. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Do not call directly. |
int |
getHours()
Returns the current hour in the appropriate format (24hr or 12hr). |
int |
getMinutes()
Returns the current minutes from 0 through 59. |
int |
getSeconds()
Returns the current seconds from 0 through 59. |
boolean |
isAm()
Returns whether it is currently in the AM. |
boolean |
isTwentyFourHourFormat()
Returns whether the time is reported in 24hr format. |
void |
setTwentyFourHourFormat(boolean twentyFourHourFormat)
Sets whether to use 24hr format. |
void |
start()
Starts the time. |
void |
stop()
Stops the time. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Time(TimeListener listener)
Time in 24hr format.
listener - The listener to inform when the time changes
public Time(TimeListener listener,
boolean twentyFourHourFormat)
Time.
listener - The listener to inform when the time changestwentyFourHourFormat - true if it is in 24hr format,
false if it is in 12hr format| Method Detail |
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic int getHours()
public int getMinutes()
public int getSeconds()
public boolean isAm()
true if it is in the AM,
false if it is in the PMpublic boolean isTwentyFourHourFormat()
true if it is in 24hr format,
false if it is in 12hr formatpublic void setTwentyFourHourFormat(boolean twentyFourHourFormat)
twentyFourHourFormat - true if it is in 24hr format,
false if it is in 12hr formatpublic void start()
TimeListener will be informed of time
changes.
public void stop()
TimeListener will stop being informed
of time changes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||