All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.ibm.eou.toolkit.gauge.GaugeSynchronization

public interface GaugeSynchronization
This interface is designed to provide a common protocol for classes which are to control the display behaviour for a gauge. Many gauges will not immediately display a new value when set, but will commence some animation until the display is synchronized with the value set. The methods provided by this interface allow such display effects to be controlled in a general manner.


Variable Index

 o copyright
Ensures that the short copyright string appears in the class file.
 o INDEFINITE_WAIT
The value which indicates an indefinite wait, causing no new value to be displayed until the gauge value next changes.
 o NO_WAIT
The value which indicates no wait, causing the next new value to be displayed at once.

Method Index

 o getNextValue(int, int, int, int, int, int)
Return the next value which the gauge display will show.
 o getNextValueDelay(boolean)
Return the time interval in milliseconds after which the next value is to be displayed by the gauge.
 o isSynchronized(int, int, int, int, int, int)
Return true if the gauge considers the current display to be fully synchronized.
 o resetSynchronization()
Reset the synchronization to its initial state, clearing all the internal variables.

Variables

 o copyright
 public static final String copyright
Ensures that the short copyright string appears in the class file.

 o INDEFINITE_WAIT
 public static final long INDEFINITE_WAIT
The value which indicates an indefinite wait, causing no new value to be displayed until the gauge value next changes.

 o NO_WAIT
 public static final long NO_WAIT
The value which indicates no wait, causing the next new value to be displayed at once.

Methods

 o getNextValue
 public abstract int getNextValue(int gaugeValue,
                                  int gaugeMinimum,
                                  int gaugeMaximum,
                                  int currentDisplayValue,
                                  int currentDisplayMinimum,
                                  int currentDisplayMaximum)
Return the next value which the gauge display will show.

Parameters:
gaugeValue - the current value for the gauge.
gaugeMinimum - the minimum of the current gauge range.
gaugeMaximum - the maximum of the current gauge range.
currentDisplayValue - the value currently displaying.
currentDisplayMinimum - the minimum of the range the current display value is in.
currentDisplayMaximum - the maximum of the range the current display value is in.
Returns:
the next value to display in the current gauge range.
 o isSynchronized
 public abstract boolean isSynchronized(int gaugeValue,
                                        int gaugeMinimum,
                                        int gaugeMaximum,
                                        int currentDisplayValue,
                                        int currentDisplayMinimum,
                                        int currentDisplayMaximum)
Return true if the gauge considers the current display to be fully synchronized.

Parameters:
gaugeValue - the current value for the gauge.
gaugeMinimum - the minimum of the current gauge range.
gaugeMaximum - the maximum of the current gauge range.
currentDisplayValue - the value currently displaying.
currentDisplayMinimum - the minimum of the range the current display value is in.
currentDisplayMaximum - the maximum of the range the current display value is in.
 o getNextValueDelay
 public abstract long getNextValueDelay(boolean isSynchronized)
Return the time interval in milliseconds after which the next value is to be displayed by the gauge. If the gauge value changes during the time interval, the delay is cancelled and the next value calculated and displayed at once. The time interval specified can also be
INDEFINITE_WAIT
causing no new value to be displayed until the gauge value next changes.
NO_WAIT
causing the next new value to be displayed at once.

Parameters:
isSynchronized - true if the gauge display is synchronized.
See Also:
INDEFINITE_WAIT, NO_WAIT
 o resetSynchronization
 public abstract void resetSynchronization()
Reset the synchronization to its initial state, clearing all the internal variables.


All Packages  Class Hierarchy  This Package  Previous  Next  Index