public class CategoryUtil extends Object
Modifier and Type | Field and Description |
---|---|
static DecimalFormat |
valueFormat
Specifies how the category values should look.
|
Modifier and Type | Method and Description |
---|---|
static String |
formatValue(double value)
Format an RTC value the way we want it.
|
static String |
getCategoryClass(Category category)
Determine the CSS class to use for a given category value and thresholds.
|
static String |
getCategoryClass(Category category,
double value)
Determine the CSS color to use for a given value and the given category's
thresholds.
|
static String |
getCategoryClass(double normal,
double warning,
double value)
Determine the CSS class to use for a given value and thresholds.
|
public static final DecimalFormat valueFormat
Note this value is currently public, but consider this temporary. To hide
the implementation (so we can change it later), please call
formatValue
instead.
public static String formatValue(double value)
value
- a double.String
object.public static String getCategoryClass(Category category) throws IOException
category
- a Category
object.String
object.IOException
- if any.public static String getCategoryClass(Category category, double value) throws IOException
category
- a Category
object.value
- a double.String
object.IOException
- if any.Copyright © 2020. All rights reserved.