示例#1
0
  /**
   * Method to set the default color scale. The source for the color scale can come from either an
   * xml file or from hard coded values in the absent of the file.
   *
   * @param colorScale The URI of the color xml file.
   */
  public static void setDefault(final ColorScale colorScale) {
    _colorScale = colorScale;

    if (_colorScale == null) {
      _colorScale = new ColorScale();
      _colorScale.setDefaultValues();
    }
  }
示例#2
0
 /**
  * Method returns a default color scale.
  *
  * @return ColorScale An object representing the color scale.
  */
 public static ColorScale createDefault() {
   // Make sure the color scale has been initiated before returning
   if (_colorScale == null || _colorScale.isEmpty()) {
     _colorScale = new ColorScale();
     _colorScale.setDefaultValues();
   }
   return (ColorScale) _colorScale.clone();
 }