OpenNMS API 1.2.9

## org.opennms.web.category
Class CategoryUtil

    java.lang.Object
      org.opennms.web.category.CategoryUtil

public class CategoryUtil
extends java.lang.Object

Provides look and feel utilities for the JSPs presenting category (real time console) information.

Author:
  Lawrence Karnowski , OpenNMS

Field Summary
`static java.text.DecimalFormat` `valueFormat` Specifies how the category values should look.

Constructor Summary
`private` `CategoryUtil()` Private, empty constructor so this class will not be instantiated.

Method Summary
`static java.lang.String` `formatValue(double value)` Format an RTC value the way we want it.
`static java.lang.String` `getCategoryColor(Category category)` Determine the color to use for a given category value and thresholds.
`static java.lang.String` `getCategoryColor(Category category, double value)` Determine the color to use for a given value and the given category's thresholds.
`static java.lang.String` `getCategoryColor(double normal, double warning, double value)` Determine the color to use for a given value and thresholds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### valueFormat

    public static final java.text.DecimalFormat valueFormat

  Specifies how the category values should look.

  Note this value is currently public, but consider this temporary. To hide the implementation (so we can change it later), please call `formatValue`instead.

Constructor Detail

### CategoryUtil

    private CategoryUtil()

  Private, empty constructor so this class will not be instantiated.

Method Detail

### formatValue

    public static java.lang.String formatValue(double value)

  Format an RTC value the way we want it.

### getCategoryColor

    public static java.lang.String getCategoryColor(Category category)
                                             throws java.io.IOException,
                                                    org.exolab.castor.xml.MarshalException,
                                                    org.exolab.castor.xml.ValidationException

  Determine the color to use for a given category value and thresholds.

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### getCategoryColor

    public static java.lang.String getCategoryColor(Category category,
                                                    double value)
                                             throws java.io.IOException,
                                                    org.exolab.castor.xml.MarshalException,
                                                    org.exolab.castor.xml.ValidationException

  Determine the color to use for a given value and the given category's thresholds.

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### getCategoryColor

    public static java.lang.String getCategoryColor(double normal,
                                                    double warning,
                                                    double value)
                                             throws java.io.IOException,
                                                    org.exolab.castor.xml.MarshalException,
                                                    org.exolab.castor.xml.ValidationException

  Determine the color to use for a given value and thresholds.

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.