public class ColorMap
extends java.lang.Object
| Constructor and Description | 
|---|
ColorMap()
Default ctor 
 | 
ColorMap(java.lang.String pattern,
        java.awt.Color c)
ctor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
applyProperties()
Apply the properties 
 | 
static java.util.List | 
applyProperties(java.util.List mappings)
Utility to call apply properties to a list of ColorMap-s
 This will return the ones that actually have a pattern. 
 | 
java.awt.Color | 
getColor()
Get the Color property. 
 | 
javax.swing.JComponent | 
getColorWidget()
Make the color widget 
 | 
visad.Real[] | 
getNumericRange()
tokenize the pattern string as a numeric range 
 | 
java.lang.String | 
getPattern()
Get the Pattern property. 
 | 
javax.swing.JTextField | 
getPatternWidget()
Pattern widget 
 | 
javax.swing.JComponent[] | 
getSwatchComps()
Get the color swatch components 
 | 
boolean | 
hasPattern()
Do we have a non-zero length, non-null pattern 
 | 
boolean | 
isNumericRange()
is the pattern string actually a numeric range of the form min,max 
 | 
boolean | 
match(visad.Data value)
Does the pattern match the given value 
 | 
void | 
setColor(java.awt.Color value)
Set the Color property. 
 | 
void | 
setPattern(java.lang.String value)
Set the Pattern property. 
 | 
public ColorMap()
public ColorMap(java.lang.String pattern,
                java.awt.Color c)
pattern - The patternc - The colorpublic static java.util.List applyProperties(java.util.List mappings)
mappings - List of ColorMap-spublic void applyProperties()
public javax.swing.JComponent[] getSwatchComps()
public javax.swing.JComponent getColorWidget()
public javax.swing.JTextField getPatternWidget()
public boolean hasPattern()
public boolean isNumericRange()
public visad.Real[] getNumericRange()
                             throws java.lang.Exception
java.lang.Exception - On badnesspublic boolean match(visad.Data value)
              throws java.lang.Exception
value - value to checkjava.lang.Exceptionpublic void setPattern(java.lang.String value)
value - The new value for Patternpublic java.lang.String getPattern()
public void setColor(java.awt.Color value)
value - The new value for Colorpublic java.awt.Color getColor()