jcontrol.ui.vole.meter
Class DigitalClock

java.lang.Object
  |
  +--jcontrol.ui.vole.Component
        |
        +--jcontrol.ui.vole.meter.DigitalClock

public class DigitalClock
extends Component

The class DigitalClock provides a digital alarm clock.

(C) DOMOLOGIC Home Automation GmbH 2003

Author:
Marcus Timmermann
See Also:
Time, RTC

Field Summary
static boolean NO
           
static boolean YES
           
 
Fields inherited from class jcontrol.ui.vole.Component
focusOwner, font, g, height, listener, parent, visible, width, x, y
 
Constructor Summary
DigitalClock(int x, int y, boolean showAlarm, boolean showDate)
          Constructor.
 
Method Summary
 void alarm(int ahour, int amin, int adow, int amode)
           
 void colon()
          Draws the colon between hours and minutes.
 void date(int year, int mon, int day, int dow)
          Draws the date.
 void paint()
          Paints this component.
 void time(int hour, int min)
          Draws the time.
 void update(boolean time1, boolean date, boolean alarm)
          Updates the clock.
 
Methods inherited from class jcontrol.ui.vole.Component
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setLocation, setParent, setVisible, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 

Field Detail

NO

public static final boolean NO
See Also:
Constant Field Values

YES

public static final boolean YES
See Also:
Constant Field Values
Constructor Detail

DigitalClock

public DigitalClock(int x,
                    int y,
                    boolean showAlarm,
                    boolean showDate)
Constructor.

Parameters:
x - the x coordinate
y - the y coordinate
showAlarm - if true, the alarm time is shown
showDate - if true, the date is shown
Method Detail

alarm

public void alarm(int ahour,
                  int amin,
                  int adow,
                  int amode)

colon

public void colon()
Draws the colon between hours and minutes.


date

public void date(int year,
                 int mon,
                 int day,
                 int dow)
Draws the date.

Parameters:
year - year
mon - month
day - day
dow - day of week

paint

public void paint()
Description copied from class: Component
Paints this component.

Overrides:
paint in class Component

time

public void time(int hour,
                 int min)
Draws the time.

Parameters:
hour - hours
min - minutes

update

public void update(boolean time1,
                   boolean date,
                   boolean alarm)
Updates the clock.

Parameters:
time1 - update the time (YES, NO).
date - update the date (YES, NO).
alarm - update the alarm (YES, NO).