Package ucar.visad.display
Class ColorScaleInfo
java.lang.Object
ucar.visad.display.ColorScaleInfo
Class to hold information about a ColorScale
- Version:
- $Revision: 1.10 $
- Author:
- IDV Development Team
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptiondefault ctorColorScaleInfo(String name) Create a ColorScaleInfo with a nameColorScaleInfo(String params, boolean isParamString) Create a color scale information object from the given param stringColorScaleInfo(String name, int orient) Construct a newColorScaleInfowith the given name and orientation.ColorScaleInfo(String name, int orient, float[][] palette) Create a color scale information object with the given parameters.ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette) Create a color scale information object with the given parameters.ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette, Color labelColor) Create a color scale information object with the given parameters.ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette, Color labelColor, boolean useAlpha) Create a color scale information object with the given parameters.ColorScaleInfo(String name, int orient, String placement) Construct a newColorScaleInfowith the given name and orientation and placement.ColorScaleInfo(String name, int orient, String placement, Font labelFont, float[][] colorPalette) Create a color scale information object with the given parameters.ColorScaleInfo(ColorScaleInfo that) Create a color scale information object from another -
Method Summary
Modifier and TypeMethodDescriptionfloat[][]Get the color palette of the color scale.booleanGet the visibilityGet the labelFontof the color scale.Get the labelFontof the color scale.intGet the color of the labelsbooleanGet the label visibilitygetName()Get the name of the color scale.intGet the orientation of the color scale.static StringGet the param string formatGet the placment of the color scale.getUnit()Gets the unit.booleanGets the useAlpha propertyfloatgetX()Get the x position of the color scale.floatgetY()Get the y position of the color scale.booleanChecks if is unit visible.voidsetColorPalette(float[][] colorPalette) Set the color palette of the color scale.voidsetIsVisible(boolean show) Set the visibilityvoidsetLabelColor(Color color) Set the labelColorof the color scale.voidsetLabelFont(Font font) Set the labelFontof the color scale.voidsetLabelSide(int side) Set the labelling side.voidsetLabelVisible(boolean show) Set the label visibilityvoidSet the name of the color scale.voidsetOrientation(int orient) Set the orientation of the color scale.voidsetPlacement(String place) Set the placement of the color scale.voidSets the unit.voidsetUnitVisible(boolean unitVisible) Sets the unit visible.voidsetUseAlpha(boolean useAlpha) Sets the useAlpha propertyvoidsetX(float x) Set the x position of the color scale.voidsetY(float y) Set the y position of the color scale.toString()To string
-
Field Details
-
HORIZONTAL
public static final int HORIZONTALHorizontal orientation- See Also:
-
VERTICAL
public static final int VERTICALVertical orientation- See Also:
-
TOP
Upper Left Placement- See Also:
-
BOTTOM
Upper Right Placement- See Also:
-
LEFT
Lower Left Placement- See Also:
-
RIGHT
Upper Left Placement- See Also:
-
-
Constructor Details
-
ColorScaleInfo
public ColorScaleInfo()default ctor -
ColorScaleInfo
Create a ColorScaleInfo with a name- Parameters:
name- the name
-
ColorScaleInfo
Construct a newColorScaleInfowith the given name and orientation.- Parameters:
name- name for this color scale object.orient- orientation for thisColorScale
-
ColorScaleInfo
Construct a newColorScaleInfowith the given name and orientation and placement.- Parameters:
name- name for this color scale object.orient- orientation for thisColorScaleplacement- the placement
-
ColorScaleInfo
Create a color scale information object with the given parameters.- Parameters:
name- name of the ColorScaleorient- orientation (HORIZONTAL, VERTICAL)palette- color palette (rgb values)
-
ColorScaleInfo
public ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette) Create a color scale information object with the given parameters.- Parameters:
name- name of the ColorScaleorient- orientation (HORIZONTAL, VERTICAL)x- x location (percent from left side of display)y- y location (percent from top side of display)labelFont- font used for labelscolorPalette- color palette (rgb values)
-
ColorScaleInfo
public ColorScaleInfo(String name, int orient, String placement, Font labelFont, float[][] colorPalette) Create a color scale information object with the given parameters.- Parameters:
name- name of the ColorScaleorient- orientation (HORIZONTAL, VERTICAL)placement- placement (TOP, LEFT, etc)labelFont- font used for labelscolorPalette- color palette (rgb values)
-
ColorScaleInfo
public ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette, Color labelColor) Create a color scale information object with the given parameters.- Parameters:
name- name of the ColorScaleorient- orientation (HORIZONTAL, VERTICAL)x- x location (percent from left side of display)y- y location (percent from top side of display)labelFont- font used for labelscolorPalette- color palette (rgb values)labelColor- color for labels
-
ColorScaleInfo
public ColorScaleInfo(String name, int orient, float x, float y, Font labelFont, float[][] colorPalette, Color labelColor, boolean useAlpha) Create a color scale information object with the given parameters.- Parameters:
name- name of the ColorScaleorient- orientation (HORIZONTAL, VERTICAL)x- x location (percent from left side of display)y- y location (percent from top side of display)labelFont- font used for labelscolorPalette- color palette (rgb values)labelColor- color for labelsuseAlpha- true to use alpha when drawing color scale
-
ColorScaleInfo
Create a color scale information object from another- Parameters:
that- the other ColorScaleInfo
-
ColorScaleInfo
Create a color scale information object from the given param string- Parameters:
params- the param string. see getParamStringFormat for detailsisParamString- true if this is a param string
-
-
Method Details
-
getParamStringFormat
Get the param string format- Returns:
- the param string format
-
setName
Set the name of the color scale.- Parameters:
name- name to use
-
getName
Get the name of the color scale.- Returns:
- name of color scale.
-
setOrientation
public void setOrientation(int orient) Set the orientation of the color scale.- Parameters:
orient- orientation to use
-
getOrientation
public int getOrientation()Get the orientation of the color scale.- Returns:
- orientation of color scale.
-
setPlacement
Set the placement of the color scale.- Parameters:
place- placement to use (e.g. TOP)
-
getPlacement
Get the placment of the color scale.- Returns:
- placement of color scale.
-
setX
public void setX(float x) Set the x position of the color scale.- Parameters:
x- x position to use
-
getX
public float getX()Get the x position of the color scale.- Returns:
- x position of color scale.
-
setY
public void setY(float y) Set the y position of the color scale.- Parameters:
y- y position to use
-
getY
public float getY()Get the y position of the color scale.- Returns:
- y position of color scale.
-
setLabelFont
Set the labelFontof the color scale.- Parameters:
font- font to use
-
getLabelFont
Get the labelFontof the color scale.- Returns:
- label Font of color scale.
-
setColorPalette
public void setColorPalette(float[][] colorPalette) Set the color palette of the color scale.- Parameters:
colorPalette- color palette to use
-
getColorPalette
public float[][] getColorPalette()Get the color palette of the color scale.- Returns:
- color palette color scale.
-
setLabelColor
Set the labelColorof the color scale.- Parameters:
color- Color to use
-
getLabelColor
Get the labelFontof the color scale.- Returns:
- label Font of color scale.
-
setLabelSide
public void setLabelSide(int side) Set the labelling side.- Parameters:
side- labelling side (PRIMARY, SECONDARY);
-
getLabelSide
public int getLabelSide()Get the color of the labels- Returns:
- label color
-
setIsVisible
public void setIsVisible(boolean show) Set the visibility- Parameters:
show- true to be visible
-
getIsVisible
public boolean getIsVisible()Get the visibility- Returns:
- visibility
-
setLabelVisible
public void setLabelVisible(boolean show) Set the label visibility- Parameters:
show- true to be label visible
-
getLabelVisible
public boolean getLabelVisible()Get the label visibility- Returns:
- label visibility
-
getUseAlpha
public boolean getUseAlpha()Gets the useAlpha property- Returns:
- the useAlpha
-
setUseAlpha
public void setUseAlpha(boolean useAlpha) Sets the useAlpha property- Parameters:
useAlpha- the useAlpha to set
-
toString
To string -
setUnit
Sets the unit.- Parameters:
unit- the new unit
-
getUnit
Gets the unit.- Returns:
- the unit
-
isUnitVisible
public boolean isUnitVisible()Checks if is unit visible.- Returns:
- true, if is unit visible
-
setUnitVisible
public void setUnitVisible(boolean unitVisible) Sets the unit visible.- Parameters:
unitVisible- the new unit visible
-