at.ac.tuwien.cs.ztimeview.time
Class Clock

java.lang.Object
  extended byjavax.swing.Timer
      extended byat.ac.tuwien.cs.ztimeview.time.Clock
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.io.Serializable

public class Clock
extends javax.swing.Timer
implements java.awt.event.ActionListener

Class representing a Clock

Version:
0.2 created: 2003-03-26 last change: 2003-04-03
Author:
Wolfgang Aigner
See Also:
Serialized Form

Field Summary
static java.awt.Color DEFAULT_COLOR
          default color
 
Fields inherited from class javax.swing.Timer
listenerList
 
Constructor Summary
Clock()
          Constructor
Clock(java.util.Date time)
          Constructor
Clock(java.util.Date time, int delay)
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Update time
 java.util.Date getTime()
          Get the clock's time
 void setTime(java.util.Date time)
          Set the clock's time
 
Methods inherited from class javax.swing.Timer
addActionListener, fireActionPerformed, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLOR

public static final java.awt.Color DEFAULT_COLOR
default color

Constructor Detail

Clock

public Clock()
Constructor


Clock

public Clock(java.util.Date time)
Constructor

Parameters:
time - actual time

Clock

public Clock(java.util.Date time,
             int delay)
Constructor

Parameters:
time - actual time
delay - time between notifications (ms)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Update time

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - event object

setTime

public void setTime(java.util.Date time)
Set the clock's time

Parameters:
time - actual time

getTime

public java.util.Date getTime()
Get the clock's time

Returns:
clock's actual time


Copyright © 2004 by Vienna University of Technology.