public final class Threshold extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static IsColor | DEFAULT_VALUE_COLORDefault color value,  GaugeThreshold.NORMAL. | 
| Constructor and Description | 
|---|
| Threshold(String name)Creates a threshold with standard color ( DEFAULT_VALUE_COLOR) and value
 (Double.MAX_VALUE). | 
| Threshold(String name,
         double value)Creates a threshold with standard color ( DEFAULT_VALUE_COLOR). | 
| Threshold(String name,
         double value,
         IsColor color)Creates a threshold | 
| Threshold(String name,
         IsColor color)Creates a threshold with standard value ( Double.MAX_VALUE). | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | checkIfValid(org.pepstock.charba.client.impl.charts.IsThreshold threshold)Checks if threshold passed as argument is not  nulland its properties are notnull. | 
| IsColor | getColor()Returns the color of threshold. | 
| 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. | 
| static boolean | isValid(org.pepstock.charba.client.impl.charts.IsThreshold threshold)Returns  trueif threshold passed as argument is notnulland its properties are notnull. | 
| Threshold | setColor(IsColor color)Sets the color of threshold. | 
| Threshold | setValue(double value)Sets the value of threshold. | 
public static final IsColor DEFAULT_VALUE_COLOR
GaugeThreshold.NORMAL.public Threshold(String name)
DEFAULT_VALUE_COLOR) and value
 (Double.MAX_VALUE).name - name of thresholdpublic Threshold(String name, IsColor color)
Double.MAX_VALUE).name - name of thresholdcolor - color of thresholdpublic Threshold(String name, double value)
DEFAULT_VALUE_COLOR).name - name of thresholdvalue - value of thresholdpublic String getName()
public double getValue()
public IsColor getColor()
public 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.public static boolean isValid(org.pepstock.charba.client.impl.charts.IsThreshold threshold)
true if threshold passed as argument is not null and its properties are not
 null.threshold - threshold to be checkedtrue if threshold passed as argument is not null and its properties are not
         nullpublic static void checkIfValid(org.pepstock.charba.client.impl.charts.IsThreshold threshold)
null and its properties are not null. If not,
 throw a IllegalArgumentException.threshold - threshold to be checked