|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.symbol.ColorMap
public class ColorMap
This defines a mapping from a pattern to a color. The pattern is the value of a text point obs field.
| Constructor Summary | |
|---|---|
ColorMap()
Default ctor |
|
ColorMap(String pattern,
Color c)
ctor |
|
| Method Summary | |
|---|---|
void |
applyProperties()
Apply the properties |
static List |
applyProperties(List mappings)
Utility to call apply properties to a list of ColorMap-s This will return the ones that actually have a pattern. |
Color |
getColor()
Get the Color property. |
JComponent |
getColorWidget()
Make the color widget |
Real[] |
getNumericRange()
tokenize the pattern string as a numeric range |
String |
getPattern()
Get the Pattern property. |
JTextField |
getPatternWidget()
Pattern widget |
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(Data value)
Does the pattern match the given value |
void |
setColor(Color value)
Set the Color property. |
void |
setPattern(String value)
Set the Pattern property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorMap()
public ColorMap(String pattern,
Color c)
pattern - The patternc - The color| Method Detail |
|---|
public static List applyProperties(List mappings)
mappings - List of ColorMap-s
public void applyProperties()
public JComponent[] getSwatchComps()
public JComponent getColorWidget()
public JTextField getPatternWidget()
public boolean hasPattern()
public boolean isNumericRange()
public Real[] getNumericRange()
throws Exception
Exception - On badness
public boolean match(Data value)
throws Exception
value - value to check
Exceptionpublic void setPattern(String value)
value - The new value for Patternpublic String getPattern()
public void setColor(Color value)
value - The new value for Colorpublic Color getColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||