public class ColorWindBarbSymbol extends WindBarbSymbol implements ColorEnhanced
ColorWindBarbSymbol
is similar to a normal wind
barb but it has the additional feature that barbs are colored
according to a color enhancement scheme based on the wind speed.SPEED_KNOTS, SPEED_METERS_PER_SECOND
feature
Constructor and Description |
---|
ColorWindBarbSymbol(int speedAtt,
int directionAtt,
int speedUnits,
EarthTransform2D trans,
Palette pal,
EnhancementFunction func)
Creates a new color wind barb symbol.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics gc,
int x,
int y) |
EnhancementFunction |
getFunction()
Gets the enhancement function.
|
java.awt.Color |
getMissingColor()
Gets the missing value color.
|
Palette |
getPalette()
Gets the enhancement color palette.
|
void |
setFunction(EnhancementFunction func)
Sets the enhancement function.
|
void |
setMissingColor(java.awt.Color missingColor)
Sets the missing value color.
|
void |
setPalette(Palette pal)
Sets the enhancement color palette.
|
drawVector, getDirection, getMagnitude, main
convertAngle, getDirectionIsFrom, setDirectionIsFrom
setFeature
public ColorWindBarbSymbol(int speedAtt, int directionAtt, int speedUnits, EarthTransform2D trans, Palette pal, EnhancementFunction func)
speedAtt
- the feature attribute for wind speed.directionAtt
- the feature attribute for wind direction.speedUnits
- the units of speed, either
SPEED_KNOTS
or SPEED_METERS_PER_SECOND
.trans
- the earth transform used for converting directions.pal
- the color palette for color enhancement.func
- the enhancement function.public Palette getPalette()
getPalette
in interface ColorEnhanced
public EnhancementFunction getFunction()
getFunction
in interface ColorEnhanced
public void setPalette(Palette pal)
setPalette
in interface ColorEnhanced
public void setMissingColor(java.awt.Color missingColor)
setMissingColor
in interface ColorEnhanced
public java.awt.Color getMissingColor()
getMissingColor
in interface ColorEnhanced
public void setFunction(EnhancementFunction func)
setFunction
in interface ColorEnhanced
public void draw(java.awt.Graphics gc, int x, int y)
draw
in class DirectionSymbol