EchoPoint
1.0

echopoint.meter
Class DefaultMeterModel

java.lang.Object
  extended byechopoint.meter.DefaultMeterModel
All Implemented Interfaces:
MeterModel, java.io.Serializable

public class DefaultMeterModel
extends java.lang.Object
implements MeterModel, java.io.Serializable

The default implementation of the MeterModel interface.

Note that this model implementation will adjust the value so that it is always between the maximum and minimum range.

See Also:
Serialized Form

Field Summary
protected  nextapp.echo.event.EventListenerList listenerList
          The event listener support .
 
Constructor Summary
DefaultMeterModel()
          Default constructor.
DefaultMeterModel(java.lang.Number min, java.lang.Number max, java.lang.Number value)
          Creates a new dataset.
DefaultMeterModel(java.lang.Number min, java.lang.Number max, java.lang.Number value, java.lang.Number minCritical, java.lang.Number maxCritical, java.lang.Number minWarning, java.lang.Number maxWarning, java.lang.Number minNormal, java.lang.Number maxNormal)
          Creates a new dataset.
 
Method Summary
 void addChangeListener(nextapp.echo.event.ChangeListener l)
          Adds a ChangeListener to the button.
 void fireStateChanged()
          Notifies all listeners that have registered for this event type.
 java.lang.Number getMaximumCriticalValue()
          Returns the maximum critical value.
 java.lang.Number getMaximumNormalValue()
          Returns the maximum normal value.
 java.lang.Number getMaximumValue()
          Returns the maximum value.
 java.lang.Number getMaximumWarningValue()
          Returns the maximum warning value.
 java.lang.Number getMinimumCriticalValue()
          Returns the minimum critical value.
 java.lang.Number getMinimumNormalValue()
          Returns the minimum normal value.
 java.lang.Number getMinimumValue()
          Returns the minimum value.
 java.lang.Number getMinimumWarningValue()
          Returns the minimum warning value.
 java.lang.Number getValue()
          Returns the value.
 void removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from the button.
 void setCriticalRange(java.lang.Number minCritical, java.lang.Number maxCritical)
          Sets the critical range for the dataset.
 void setNormalRange(java.lang.Number minNormal, java.lang.Number maxNormal)
          Sets the normal range for the dataset.
 void setRange(java.lang.Number min, java.lang.Number max)
          Sets the range for the dataset.
 void setValue(double value)
          Sets the value.
 void setValue(java.lang.Number value)
          Sets the value for the dataset.
 void setWarningRange(java.lang.Number minWarning, java.lang.Number maxWarning)
          Sets the warning range for the dataset.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listenerList

protected nextapp.echo.event.EventListenerList listenerList
The event listener support .

Constructor Detail

DefaultMeterModel

public DefaultMeterModel()
Default constructor.


DefaultMeterModel

public DefaultMeterModel(java.lang.Number min,
                         java.lang.Number max,
                         java.lang.Number value)
Creates a new dataset.

Parameters:
min - the minimum value.
max - the maximum value.
value - the current value.

DefaultMeterModel

public DefaultMeterModel(java.lang.Number min,
                         java.lang.Number max,
                         java.lang.Number value,
                         java.lang.Number minCritical,
                         java.lang.Number maxCritical,
                         java.lang.Number minWarning,
                         java.lang.Number maxWarning,
                         java.lang.Number minNormal,
                         java.lang.Number maxNormal)
Creates a new dataset.

Parameters:
min - the lower bound for the overall range.
max - the upper bound for the overall range.
value - the current value.
minCritical - the minimum critical value.
maxCritical - the maximum critical value.
minWarning - the minimum warning value.
maxWarning - the maximum warning value.
minNormal - the minimum normal value.
maxNormal - the maximum normal value.
Method Detail

addChangeListener

public void addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the button.

Specified by:
addChangeListener in interface MeterModel
Parameters:
l - The ChangeListener to be added.

fireStateChanged

public void fireStateChanged()
Notifies all listeners that have registered for this event type.


getMaximumCriticalValue

public java.lang.Number getMaximumCriticalValue()
Returns the maximum critical value.

Specified by:
getMaximumCriticalValue in interface MeterModel
Returns:
the maximum critical value.

getMaximumNormalValue

public java.lang.Number getMaximumNormalValue()
Returns the maximum normal value.

Specified by:
getMaximumNormalValue in interface MeterModel
Returns:
the maximum normal value.

getMaximumValue

public java.lang.Number getMaximumValue()
Returns the maximum value.

Specified by:
getMaximumValue in interface MeterModel
Returns:
the maximum value.

getMaximumWarningValue

public java.lang.Number getMaximumWarningValue()
Returns the maximum warning value.

Specified by:
getMaximumWarningValue in interface MeterModel
Returns:
the maximum warning value.

getMinimumCriticalValue

public java.lang.Number getMinimumCriticalValue()
Returns the minimum critical value.

Specified by:
getMinimumCriticalValue in interface MeterModel
Returns:
the minimum critical value.

getMinimumNormalValue

public java.lang.Number getMinimumNormalValue()
Returns the minimum normal value.

Specified by:
getMinimumNormalValue in interface MeterModel
Returns:
the minimum normal value.

getMinimumValue

public java.lang.Number getMinimumValue()
Returns the minimum value.

Specified by:
getMinimumValue in interface MeterModel
Returns:
the minimum value.

getMinimumWarningValue

public java.lang.Number getMinimumWarningValue()
Returns the minimum warning value.

Specified by:
getMinimumWarningValue in interface MeterModel
Returns:
the minimum warning value.

getValue

public java.lang.Number getValue()
Returns the value.

Specified by:
getValue in interface MeterModel
Returns:
the value.

removeChangeListener

public void removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from the button.

Specified by:
removeChangeListener in interface MeterModel
Parameters:
l - The ChangeListener to be removed.

setCriticalRange

public void setCriticalRange(java.lang.Number minCritical,
                             java.lang.Number maxCritical)
Sets the critical range for the dataset. Registered listeners are notified of the change.

Specified by:
setCriticalRange in interface MeterModel
Parameters:
minCritical - the new minimum.
maxCritical - the new maximum.

setNormalRange

public void setNormalRange(java.lang.Number minNormal,
                           java.lang.Number maxNormal)
Sets the normal range for the dataset. Registered listeners are notified of the change.

Specified by:
setNormalRange in interface MeterModel
Parameters:
minNormal - the new minimum.
maxNormal - the new maximum.

setRange

public void setRange(java.lang.Number min,
                     java.lang.Number max)
Sets the range for the dataset. Registered listeners are notified of the change.

Specified by:
setRange in interface MeterModel
Parameters:
min - the new minimum.
max - the new maximum.

setValue

public void setValue(double value)
Sets the value.

Specified by:
setValue in interface MeterModel
Parameters:
value - the new value.

setValue

public void setValue(java.lang.Number value)
Sets the value for the dataset.

Specified by:
setValue in interface MeterModel
Parameters:
value - the new value.

setWarningRange

public void setWarningRange(java.lang.Number minWarning,
                            java.lang.Number maxWarning)
Sets the warning range for the dataset. Registered listeners are notified of the change.

Specified by:
setWarningRange in interface MeterModel
Parameters:
minWarning - the new minimum.
maxWarning - the new maximum.

toString

public java.lang.String toString()

EchoPoint
1.0