public final class Threshold extends java.lang.Object implements IsThreshold
GaugeDataset.setThresholds(Threshold...)| Modifier and Type | Field and Description |
|---|---|
static IsColor |
DEFAULT_VALUE_COLOR
Default color value.
|
| Constructor and Description |
|---|
Threshold(java.lang.String name)
Creates a threshold with standard color (
DEFAULT_VALUE_COLOR) and value (Double.MAX_VALUE). |
Threshold(java.lang.String name,
double value)
Creates a threshold with standard color (
DEFAULT_VALUE_COLOR). |
Threshold(java.lang.String name,
double value,
IsColor color)
Creates a threshold
|
Threshold(java.lang.String name,
IsColor color)
Creates a threshold with standard value (
Double.MAX_VALUE). |
| Modifier and Type | Method and Description |
|---|---|
IsColor |
getColor()
Returns the color of threshold.
|
java.lang.String |
getName()
Returns the name of threshold.
|
double |
getValue()
Returns the value of threshold.
|
boolean |
isInRange(double valueToCheck,
double lowLimit)
Checks if the value passed is into threshold.
|
Threshold |
setColor(IsColor color) |
Threshold |
setValue(double value) |
public static final IsColor DEFAULT_VALUE_COLOR
GaugeThreshold.normalpublic Threshold(java.lang.String name)
DEFAULT_VALUE_COLOR) and value (Double.MAX_VALUE).name - name of thresholdpublic Threshold(java.lang.String name,
IsColor color)
Double.MAX_VALUE).name - name of thresholdcolor - color of thresholdpublic Threshold(java.lang.String name,
double value)
DEFAULT_VALUE_COLOR).name - name of thresholdvalue - value of thresholdpublic Threshold(java.lang.String name,
double value,
IsColor color)
name - name of thresholdvalue - value of thresholdcolor - color of thresholdpublic java.lang.String getName()
IsThresholdgetName in interface IsThresholdpublic double getValue()
IsThresholdgetValue in interface IsThresholdpublic IsColor getColor()
IsThresholdgetColor in interface IsThresholdpublic Threshold setValue(double value)
value - the value to setpublic Threshold setColor(IsColor color)
color - the color to setpublic boolean isInRange(double valueToCheck,
double lowLimit)
valueToCheck - value to checklowLimit - the low limittrue is the value is inside the range, otherwise false.