public class ColorScaleInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BOTTOM
Upper Right Placement
|
static int |
HORIZONTAL
Horizontal orientation
|
static java.lang.String |
LEFT
Lower Left Placement
|
static java.lang.String |
RIGHT
Upper Left Placement
|
static java.lang.String |
TOP
Upper Left Placement
|
static int |
VERTICAL
Vertical orientation
|
Constructor and Description |
---|
ColorScaleInfo()
default ctor
|
ColorScaleInfo(ColorScaleInfo that)
Create a color scale information object from another
|
ColorScaleInfo(java.lang.String name)
Create a ColorScaleInfo with a name
|
ColorScaleInfo(java.lang.String params,
boolean isParamString)
Create a color scale information object from the given param string
|
ColorScaleInfo(java.lang.String name,
int orient)
Construct a new
ColorScaleInfo with the given name
and orientation. |
ColorScaleInfo(java.lang.String name,
int orient,
float[][] palette)
Create a color scale information object with the given parameters.
|
ColorScaleInfo(java.lang.String name,
int orient,
float x,
float y,
java.awt.Font labelFont,
float[][] colorPalette)
Create a color scale information object with the given parameters.
|
ColorScaleInfo(java.lang.String name,
int orient,
float x,
float y,
java.awt.Font labelFont,
float[][] colorPalette,
java.awt.Color labelColor)
Create a color scale information object with the given parameters.
|
ColorScaleInfo(java.lang.String name,
int orient,
float x,
float y,
java.awt.Font labelFont,
float[][] colorPalette,
java.awt.Color labelColor,
boolean useAlpha)
Create a color scale information object with the given parameters.
|
ColorScaleInfo(java.lang.String name,
int orient,
java.lang.String placement)
Construct a new
ColorScaleInfo with the given name
and orientation and placement. |
ColorScaleInfo(java.lang.String name,
int orient,
java.lang.String placement,
java.awt.Font labelFont,
float[][] colorPalette)
Create a color scale information object with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
float[][] |
getColorPalette()
Get the color palette of the color scale.
|
boolean |
getIsVisible()
Get the visibility
|
java.awt.Color |
getLabelColor()
Get the label
Font of the color scale. |
java.awt.Font |
getLabelFont()
Get the label
Font of the color scale. |
int |
getLabelSide()
Get the color of the labels
|
boolean |
getLabelVisible()
Get the label visibility
|
java.lang.String |
getName()
Get the name of the color scale.
|
int |
getOrientation()
Get the orientation of the color scale.
|
static java.lang.String |
getParamStringFormat()
Get the param string format
|
java.lang.String |
getPlacement()
Get the placment of the color scale.
|
visad.Unit |
getUnit()
Gets the unit.
|
boolean |
getUseAlpha()
Gets the useAlpha property
|
float |
getX()
Get the x position of the color scale.
|
float |
getY()
Get the y position of the color scale.
|
boolean |
isUnitVisible()
Checks if is unit visible.
|
void |
setColorPalette(float[][] colorPalette)
Set the color palette of the color scale.
|
void |
setIsVisible(boolean show)
Set the visibility
|
void |
setLabelColor(java.awt.Color color)
Set the label
Color of the color scale. |
void |
setLabelFont(java.awt.Font font)
Set the label
Font of the color scale. |
void |
setLabelSide(int side)
Set the labelling side.
|
void |
setLabelVisible(boolean show)
Set the label visibility
|
void |
setName(java.lang.String name)
Set the name of the color scale.
|
void |
setOrientation(int orient)
Set the orientation of the color scale.
|
void |
setPlacement(java.lang.String place)
Set the placement of the color scale.
|
void |
setUnit(visad.Unit unit)
Sets the unit.
|
void |
setUnitVisible(boolean unitVisible)
Sets the unit visible.
|
void |
setUseAlpha(boolean useAlpha)
Sets the useAlpha property
|
void |
setX(float x)
Set the x position of the color scale.
|
void |
setY(float y)
Set the y position of the color scale.
|
java.lang.String |
toString()
To string
|
public static final int HORIZONTAL
public static final int VERTICAL
public static final java.lang.String TOP
public static final java.lang.String BOTTOM
public static final java.lang.String LEFT
public static final java.lang.String RIGHT
public ColorScaleInfo()
public ColorScaleInfo(java.lang.String name)
name
- the namepublic ColorScaleInfo(java.lang.String name, int orient)
ColorScaleInfo
with the given name
and orientation.name
- name for this color scale object.orient
- orientation for this ColorScale
public ColorScaleInfo(java.lang.String name, int orient, java.lang.String placement)
ColorScaleInfo
with the given name
and orientation and placement.name
- name for this color scale object.orient
- orientation for this ColorScale
placement
- the placementpublic ColorScaleInfo(java.lang.String name, int orient, float[][] palette)
name
- name of the ColorScaleorient
- orientation (HORIZONTAL, VERTICAL)palette
- color palette (rgb values)public ColorScaleInfo(java.lang.String name, int orient, float x, float y, java.awt.Font labelFont, float[][] colorPalette)
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)public ColorScaleInfo(java.lang.String name, int orient, java.lang.String placement, java.awt.Font labelFont, float[][] colorPalette)
name
- name of the ColorScaleorient
- orientation (HORIZONTAL, VERTICAL)placement
- placement (TOP, LEFT, etc)labelFont
- font used for labelscolorPalette
- color palette (rgb values)public ColorScaleInfo(java.lang.String name, int orient, float x, float y, java.awt.Font labelFont, float[][] colorPalette, java.awt.Color labelColor)
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 labelspublic ColorScaleInfo(java.lang.String name, int orient, float x, float y, java.awt.Font labelFont, float[][] colorPalette, java.awt.Color labelColor, boolean useAlpha)
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 scalepublic ColorScaleInfo(ColorScaleInfo that)
that
- the other ColorScaleInfopublic ColorScaleInfo(java.lang.String params, boolean isParamString)
params
- the param string. see getParamStringFormat for detailsisParamString
- true if this is a param stringpublic static java.lang.String getParamStringFormat()
public void setName(java.lang.String name)
name
- name to usepublic java.lang.String getName()
public void setOrientation(int orient)
orient
- orientation to usepublic int getOrientation()
public void setPlacement(java.lang.String place)
place
- placement to use (e.g. TOP)public java.lang.String getPlacement()
public void setX(float x)
x
- x position to usepublic float getX()
public void setY(float y)
y
- y position to usepublic float getY()
public void setLabelFont(java.awt.Font font)
Font
of the color scale.font
- font to usepublic java.awt.Font getLabelFont()
Font
of the color scale.public void setColorPalette(float[][] colorPalette)
colorPalette
- color palette to usepublic float[][] getColorPalette()
public void setLabelColor(java.awt.Color color)
Color
of the color scale.color
- Color to usepublic java.awt.Color getLabelColor()
Font
of the color scale.public void setLabelSide(int side)
side
- labelling side (PRIMARY, SECONDARY);public int getLabelSide()
public void setIsVisible(boolean show)
show
- true to be visiblepublic boolean getIsVisible()
public void setLabelVisible(boolean show)
show
- true to be label visiblepublic boolean getLabelVisible()
public boolean getUseAlpha()
public void setUseAlpha(boolean useAlpha)
useAlpha
- the useAlpha to setpublic java.lang.String toString()
toString
in class java.lang.Object
public void setUnit(visad.Unit unit)
unit
- the new unitpublic visad.Unit getUnit()
public boolean isUnitVisible()
public void setUnitVisible(boolean unitVisible)
unitVisible
- the new unit visible