ru.igis.omtab
Class Clock

java.lang.Object
  extended by ru.igis.omtab.Clock
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class Clock
extends java.lang.Object
implements java.awt.event.ActionListener

Time pulses generator

Author:
srp

Constructor Summary
Clock(RuNA runa)
          Creates a new instance of Clock
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Timer events handler
 long getClock()
           
static double getCurrentTime()
          Return current time in hours
static long getDay()
          Return current day
static long getHour()
          Return current hour
static long getMinute()
          Return current minute
static long getSecond()
          Return current second
 float getTimeScale()
           
 void setClock(long clock)
           
 void setRunaControlPanel(RunaControlPanel rcp)
          Set Runa Control Panel as GUI for Clock object
 void setTimeScale(float ts)
          Method to change time scale
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Clock

public Clock(RuNA runa)
Creates a new instance of Clock

Parameters:
runa - - RuNA object
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Timer events handler

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

setTimeScale

public void setTimeScale(float ts)
Method to change time scale

Parameters:
ts - - new time scale

getCurrentTime

public static double getCurrentTime()
Return current time in hours

Returns:
- hour and fraction of hour

getDay

public static long getDay()
Return current day

Returns:
- current day number

getHour

public static long getHour()
Return current hour

Returns:
- current hour number

getMinute

public static long getMinute()
Return current minute

Returns:
- current minute number

getSecond

public static long getSecond()
Return current second

Returns:
- current second number

setRunaControlPanel

public void setRunaControlPanel(RunaControlPanel rcp)
Set Runa Control Panel as GUI for Clock object

Parameters:
rcp - - Runa Control Panel

getClock

public long getClock()
Returns:
Returns the clock.

setClock

public void setClock(long clock)
Parameters:
clock - The clock to set.

getTimeScale

public float getTimeScale()
Returns:
Returns the timeScale.