org.jfree.data
Class DefaultMeterDataset

java.lang.Object
  |
  +--org.jfree.data.AbstractDataset
        |
        +--org.jfree.data.DefaultMeterDataset
All Implemented Interfaces:
Dataset, MeterDataset, java.io.Serializable, Value

public class DefaultMeterDataset
extends AbstractDataset
implements MeterDataset, java.io.Serializable

A default implementation of the MeterDataset interface.

Author:
Hari
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jfree.data.MeterDataset
CRITICAL_DATA, FULL_DATA, NORMAL_DATA, WARNING_DATA
 
Constructor Summary
DefaultMeterDataset()
          Default constructor.
DefaultMeterDataset(java.lang.Number min, java.lang.Number max, java.lang.Number value, java.lang.String units)
          Creates a new dataset.
DefaultMeterDataset(java.lang.Number min, java.lang.Number max, java.lang.Number value, java.lang.String units, java.lang.Number minCritical, java.lang.Number maxCritical, java.lang.Number minWarning, java.lang.Number maxWarning, java.lang.Number minNormal, java.lang.Number maxNormal, int borderType)
          Creates a new dataset.
 
Method Summary
 int getBorderType()
          Returns the border 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.String getUnits()
          Returns the measurement units for the data.
 java.lang.Number getValue()
          Returns the value.
 boolean isValueValid()
          Returns true if the value is valid, and false otherwise.
 void setBorderType(int borderType)
          Sets the border type.
 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 setUnits(java.lang.String units)
          Sets the measurement unit description.
 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.
 
Methods inherited from class org.jfree.data.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

DefaultMeterDataset

public DefaultMeterDataset()
Default constructor.


DefaultMeterDataset

public DefaultMeterDataset(java.lang.Number min,
                           java.lang.Number max,
                           java.lang.Number value,
                           java.lang.String units)
Creates a new dataset.

Parameters:
min - the minimum value.
max - the maximum value.
value - the current value.
units - the unit description.

DefaultMeterDataset

public DefaultMeterDataset(java.lang.Number min,
                           java.lang.Number max,
                           java.lang.Number value,
                           java.lang.String units,
                           java.lang.Number minCritical,
                           java.lang.Number maxCritical,
                           java.lang.Number minWarning,
                           java.lang.Number maxWarning,
                           java.lang.Number minNormal,
                           java.lang.Number maxNormal,
                           int borderType)
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.
units - the unit description.
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.
borderType - the border type.
Method Detail

isValueValid

public boolean isValueValid()
Returns true if the value is valid, and false otherwise.

Specified by:
isValueValid in interface MeterDataset
Returns:
boolean.

getValue

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

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

setValue

public void setValue(double value)
Sets the value.

Parameters:
value - the new value.

setValue

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

Parameters:
value - the new value.

getMinimumValue

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

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

getMaximumValue

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

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

getMinimumNormalValue

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

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

getMaximumNormalValue

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

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

getMinimumWarningValue

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

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

getMaximumWarningValue

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

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

getMinimumCriticalValue

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

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

getMaximumCriticalValue

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

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

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.

Parameters:
min - the new minimum.
max - 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.

Parameters:
minNormal - the new minimum.
maxNormal - the new maximum.

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.

Parameters:
minWarning - the new minimum.
maxWarning - the new maximum.

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.

Parameters:
minCritical - the new minimum.
maxCritical - the new maximum.

getUnits

public java.lang.String getUnits()
Returns the measurement units for the data.

Specified by:
getUnits in interface MeterDataset
Returns:
The measurement units.

setUnits

public void setUnits(java.lang.String units)
Sets the measurement unit description.

Parameters:
units - the new description.

getBorderType

public int getBorderType()
Returns the border type.

Specified by:
getBorderType in interface MeterDataset
Returns:
the border type.

setBorderType

public void setBorderType(int borderType)
Sets the border type.

Parameters:
borderType - the new border type.