|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjplay.Time
public class Time
Class used to manipulate time.
Constructor Summary | |
---|---|
Time(int x,
int y,
boolean crescentTime)
Creates an instance of the class Time. |
|
Time(int hour,
int minute,
int second,
int x,
int y,
boolean crescentTime)
Creates an instance of the class Time. |
|
Time(int hour,
int minute,
int second,
int x,
int y,
java.awt.Font font,
java.awt.Color color,
boolean crescentTime)
Creates an instance of the class Time. |
Method Summary | |
---|---|
void |
draw()
Draws the time on the screen. |
void |
draw(java.lang.String message)
Draws a message before the time on the screen. |
int |
getHour()
Returns the hours. |
int |
getMinute()
Returns the minutes. |
int |
getSecond()
Returns the seconds. |
long |
getTotalSecond()
Returns the time in seconds. |
void |
setColor(java.awt.Color color)
Sets the color used to drawn the time on the screen. |
void |
setFont(java.awt.Font font)
Sets the font used to drawn the time on the screen. |
void |
setHour(int hour)
Sets the hours. |
void |
setMinute(int minute)
Sets the minutes. |
void |
setSecond(int second)
Sets the seconds. |
void |
setTime(int hour,
int minute,
int seconds)
Sets the current time. |
boolean |
timeEnded()
Returns true when the time comes to zero, false otherwise. |
java.lang.String |
toString()
Returns a string with the time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Time(int x, int y, boolean crescentTime)
x
- value of the coordinate X.y
- value of the coordinate Y.crescentTime
- true if the is crescent, false otherwise.public Time(int hour, int minute, int second, int x, int y, boolean crescentTime)
hour
- minute
- second
- x
- y
- crescentTime
- true if the is crescent, false otherwise.public Time(int hour, int minute, int second, int x, int y, java.awt.Font font, java.awt.Color color, boolean crescentTime)
hour
- minute
- second
- x
- y
- font
- color
- crescentTime
- True if the time is crescent, false otherwise.Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void draw(java.lang.String message)
message
- public void draw()
public void setColor(java.awt.Color color)
color
- public void setFont(java.awt.Font font)
color
- public boolean timeEnded()
boolean
- public void setHour(int hour)
hour
- public void setMinute(int minute)
minute
- public void setSecond(int second)
second
- public int getHour()
public int getMinute()
public int getSecond()
public long getTotalSecond()
public void setTime(int hour, int minute, int seconds)
hour
- minute
- seconds
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |