All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eou.toolkit.gauge.InertialSynchronization
java.lang.Object
|
+----com.ibm.eou.toolkit.gauge.ImmediateSynchronization
|
+----com.ibm.eou.toolkit.gauge.InertialSynchronization
- public class InertialSynchronization
- extends ImmediateSynchronization
This class provides inertial behaviour appropriate to
mechanical gauges such as pointers and needle gauges.
-
InertialSynchronization()
- Create an InertialSynchronization with a
natural period of 20 and a
damping of 1 (critical damping).
-
InertialSynchronization(double, double)
- Create an InertialSynchronization with the specified
damping, minimum velocity, and time delays when
synchronized and when not synchronized.
-
InertialSynchronization(double, double, long, long)
- Create an InertialSynchronization with the specified
damping, minimum velocity, and time delays when
synchronized and when not synchronized.
-
copyright()
-
-
getDamping()
- Return the current damping.
-
getNaturalPeriod()
- Return the current natural period.
-
getNextValue(int, int, int, int, int, int)
- Return the next value for the gauge to show
to achieve the required synchronization.
-
isSynchronized(int, int, int, int, int, int)
- Return true if the gauge display is now synchronized.
-
resetSynchronization()
-
-
setDamping(double)
- Set the damping.
-
setNaturalPeriod(double)
- Set the natural period.
InertialSynchronization
public InertialSynchronization()
- Create an InertialSynchronization with a
natural period of 20 and a
damping of 1 (critical damping).
- See Also:
- setNaturalPeriod, setDamping
InertialSynchronization
public InertialSynchronization(double naturalPeriod,
double damping)
- Create an InertialSynchronization with the specified
damping, minimum velocity, and time delays when
synchronized and when not synchronized.
- See Also:
- setNaturalPeriod, setDamping
InertialSynchronization
public InertialSynchronization(double naturalPeriod,
double damping,
long synchronizedDelay,
long nonsynchronizedDelay)
- Create an InertialSynchronization with the specified
damping, minimum velocity, and time delays when
synchronized and when not synchronized.
- See Also:
- setNaturalPeriod, setDamping
copyright
public static String copyright()
resetSynchronization
public synchronized void resetSynchronization()
- Overrides:
- resetSynchronization in class ImmediateSynchronization
getNaturalPeriod
public double getNaturalPeriod()
- Return the current natural period.
- See Also:
- setNaturalPeriod
setNaturalPeriod
public synchronized void setNaturalPeriod(double naturalPeriod)
- Set the natural period. This is the number of gauge
updates which one complete oscillation will take if
the damping is zero, so smaller values cause faster
oscillations and larger values slower oscillations.
getDamping
public synchronized double getDamping()
- Return the current damping.
- See Also:
- setDamping
setDamping
public synchronized void setDamping(double damping)
- Set the damping. A damping of 1.0 gives critical
damping, so that the gauge synchronizes with no
overshoot. Values greater than 1.0 give overdamping,
which increases the time taken to synchronize. Values
less than 1.0 give underdamping, causing the gauge to
overshoot and oscillate toward the next value. Zero
damping causes endless oscillation, and the maximum
value of the damping is equal to the natural period:
damping values equal to or greater than the natural
period cause the gauge to be completely damped, and
the value never changes. In practice, the gauge value
will change extremely slowly, even with these values,
to minimize unpredictable side effects.
- See Also:
- setNaturalPeriod
isSynchronized
public synchronized boolean isSynchronized(int value,
int min,
int max,
int displayvalue,
int displaymin,
int displaymax)
- Return true if the gauge display is now synchronized.
- Overrides:
- isSynchronized in class ImmediateSynchronization
getNextValue
public synchronized int getNextValue(int value,
int min,
int max,
int previousdisplayvalue,
int previousmin,
int previousmax)
- Return the next value for the gauge to show
to achieve the required synchronization.
- Overrides:
- getNextValue in class ImmediateSynchronization
All Packages Class Hierarchy This Package Previous Next Index