All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.ui.WarningIndicator

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----guinea.ui.WarningIndicator

public class WarningIndicator
extends Canvas
implements Runnable, PropertyLoader, Serializable
A warning component that indicates that time is about to run out. It also shows a countdown that shows how much time is still left.


Constructor Index

· WarningIndicator()
Construct a new warning indicator.

Method Index

· finalize()
Finalize component.
· getPreferredSize()
Gets the preferred size of this component.
· paint(Graphics)
Draw the component.
· propertyLoad(Properties, String)
· reset()
Reset the indicator to default state.
· run()
· setEnabled(boolean)
Enable or disable indicator.
· setTimes(int)
Set the timeout time.
· setTimes(int, int)
Set the timeout time and warning time of the indicator.
· setTimesAbsolute(long)
Set the timeout time.
· setTimesAbsolute(long, int)
Set the timeout time and warning time.
· start()
Start the countdown display.

Constructors

· WarningIndicator
 public WarningIndicator()
Construct a new warning indicator.

Methods

· getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this component.

Overrides:
getPreferredSize in class Component
· paint
 public void paint(Graphics g)
Draw the component.

Overrides:
paint in class Canvas
· reset
 public void reset()
Reset the indicator to default state.

· run
 public synchronized void run()
· setTimes
 public void setTimes(int timeoutTime)
Set the timeout time. No warning is shown before going directly to timeout.

Parameters:
timeoutTime - How much time there is to answer before the timeout expires. The timeout is in milliseconds.
· setTimesAbsolute
 public void setTimesAbsolute(long timeoutTime)
Set the timeout time. No warning is shown before going directly to timeout.

Parameters:
timeoutTime - The point of time when the indicator is to timeout (in milliseconds).
· setTimes
 public synchronized void setTimes(int timeoutTime,
                                   int warningTime)
Set the timeout time and warning time of the indicator.

Parameters:
timeoutTime - How much time there is to answer before the timeout expires. The timeout is in milliseconds.
warningTime - When to show that time is about to run out. It is the number of milliseconds before the timeout.
See Also:
start
· setTimesAbsolute
 public synchronized void setTimesAbsolute(long timeoutTime,
                                           int warningTime)
Set the timeout time and warning time.

Parameters:
timeoutTime - the point of time when the indicator is to timeout (in milliseconds).
warningTime - when to show that time is about to run out. It is the number of milliseconds before the timeout.
See Also:
currentTimeMillis
· start
 public void start()
Start the countdown display. Times have to have been initialized before starting.

· setEnabled
 public synchronized void setEnabled(boolean enable)
Enable or disable indicator.

Overrides:
setEnabled in class Component
· finalize
 protected void finalize()
Finalize component.

Overrides:
finalize in class Object
· propertyLoad
 public void propertyLoad(Properties p,
                          String name) throws IllegalArgumentException

All Packages  Class Hierarchy  This Package  Previous  Next  Index