|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.ColorScale
public class ColorScale
Displayable for a color scale in a display. The scale can be horizontal or vertical and can have labels.
| Field Summary | |
|---|---|
static String |
BOTTOM
Bottom Placement |
static Color |
DEFAULT_LABEL_COLOR
default color |
static int |
HORIZONTAL_ORIENT
Key for displaying the scale horizonatally |
static String |
LEFT
Left Placement |
static int |
PRIMARY
Key for primary labeling side |
static String |
RIGHT
Right Placement |
static int |
SECONDARY
Key for secondary labeling side |
static String |
TOP
Top Placement |
static int |
VERTICAL_ORIENT
Key for displaying the scale vertically |
| Fields inherited from class ucar.visad.display.DisplayableData |
|---|
LINE_WIDTH, MANIPULABLE, VISIBLE |
| Fields inherited from class ucar.visad.display.Displayable |
|---|
DISPLAY, parent, SCALAR_MAP_SET |
| Constructor Summary | |
|---|---|
ColorScale(ColorScaleInfo info)
Construct a new ColorScale from the ColorScaleInfo |
|
ColorScale(String name)
Construct a new ColorScale with the given name
and default orientation. |
|
ColorScale(String name,
int orient)
Construct a new ColorScale with the given name
and orientation. |
|
ColorScale(String name,
int orient,
double x,
double y)
Construct a new ColorScale with the given name
and orientation and position. |
|
ColorScale(String name,
int orient,
double x,
double y,
float[][] table)
Construct a new ColorScale with the given name
and orientation and position, using the color table. |
|
ColorScale(String name,
int orient,
float[][] table)
Construct a new ColorScale with the given name
and orientation and color table. |
|
| Method Summary | |
|---|---|
Displayable |
cloneForDisplay()
Returns a clone of this instance suitable for another VisAD display. |
protected DataRenderer |
getDataRenderer()
Get the renderer for this ColorScale |
static int |
getDefaultOrient(String place)
Get the default orientation for the given placement |
static String |
getDefaultPlace(int orient)
Get the default place for the given orientation |
Font |
getFont()
Get the font used for rendering the labels |
Color |
getLabelColor()
Get the color of the labels |
int |
getLabelSide()
Get the color of the labels |
int |
getOrientation()
Get the orientation of the ColorScale. |
static float |
getX(int orient,
String placement)
Get the X position |
static float |
getY(int orient,
String placement)
Get the Y position |
void |
reDisplay()
Redisplay the colorbar using the defaults |
void |
setColorPalette(float[][] colorPalette)
This method sets the color palette according to the color table in argument; pair this method with setRange(lo,high) to get a fixed association of color table and range of values. |
void |
setColorScaleInfo(ColorScaleInfo info)
Set the parameters for this scale |
void |
setFont(Font font)
Set the font used for rendering the labels |
void |
setFont(HersheyFont font)
Set the font used for rendering the labels |
void |
setLabelColor(Color color)
Set the color of the labels. |
void |
setLabelSide(int side)
Set the labelling side. |
void |
setOrientation(int orient)
Set the orientation of the ColorScale. |
void |
setRangeForColor(double low,
double hi)
Set the range of values for the color table. |
void |
setUseFastRendering(boolean fastRender)
Set the flags for whether the Displayable uses it's methods to render quickly (eg, not account for projection seams). |
| Methods inherited from class ucar.visad.display.DisplayableData |
|---|
addAction, dataChange, destroy, getActive, getAnimationSet, getData, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setLineWidth, setManipulable, setPickable, setPointMode, setPointSize, setVisible, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int VERTICAL_ORIENT
public static final int HORIZONTAL_ORIENT
public static final int PRIMARY
public static final int SECONDARY
public static final String TOP
public static final String BOTTOM
public static final String LEFT
public static final String RIGHT
public static final Color DEFAULT_LABEL_COLOR
| Constructor Detail |
|---|
public ColorScale(String name)
throws VisADException,
RemoteException
ColorScale with the given name
and default orientation.
name - name for this color scale object.
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public ColorScale(String name,
int orient)
throws VisADException,
RemoteException
ColorScale with the given name
and orientation.
name - name for this color scale object.orient - orientation for this ColorScale
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public ColorScale(String name,
int orient,
float[][] table)
throws VisADException,
RemoteException
ColorScale with the given name
and orientation and color table.
name - name for this color scale object.orient - orientation for this ColorScaletable - color table that defines the image
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public ColorScale(String name,
int orient,
double x,
double y)
throws VisADException,
RemoteException
ColorScale with the given name
and orientation and position.
name - name for this color scale object.orient - orientation for this ColorScalex - X position on the screen, % away from upper left cornery - Y position on the screen, % away from upper left corner
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public ColorScale(String name,
int orient,
double x,
double y,
float[][] table)
throws VisADException,
RemoteException
ColorScale with the given name
and orientation and position, using the color table.
name - name for this color scale object.orient - orientation for this ColorScalex - X position on the screen, % away from upper left cornery - Y position on the screen, % away from upper left cornertable - color table that defines the image
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public ColorScale(ColorScaleInfo info)
throws VisADException,
RemoteException
ColorScale from the ColorScaleInfo
info - color scale info
RemoteException - Java RMI error
VisADException - problem creating VisAD object| Method Detail |
|---|
public void setRangeForColor(double low,
double hi)
throws VisADException,
RemoteException
setRangeForColor in class Displayablelow - minimum valuehi - maximum value
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic int getOrientation()
public void setOrientation(int orient)
throws RemoteException,
VisADException
orient - orientation (HORIZONTAL_ORIENT, VERTICAL_ORIENT)
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public void setColorScaleInfo(ColorScaleInfo info)
throws RemoteException,
VisADException
info - ColorScaleInfo
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public void setLabelColor(Color color)
throws RemoteException,
VisADException
color - color for labels
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic Color getLabelColor()
public void setLabelSide(int side)
throws RemoteException,
VisADException
side - labelling side (PRIMARY, SECONDARY);
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic int getLabelSide()
public void setColorPalette(float[][] colorPalette)
throws RemoteException,
VisADException
setColorPalette in class DisplayablecolorPalette - the color table or color-alpha table desired
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
public Displayable cloneForDisplay()
throws RemoteException,
VisADException
cloneForDisplay in class DisplayableDataVisADException - VisAD failure.
RemoteException - Java RMI failure.public void reDisplay()
protected DataRenderer getDataRenderer()
throws VisADException
getDataRenderer in class DisplayableDataVisADException - problem creating rendererpublic void setFont(Font font)
font - new font to usepublic void setFont(HersheyFont font)
font - new font to usepublic Font getFont()
public void setUseFastRendering(boolean fastRender)
throws VisADException,
RemoteException
setUseFastRendering in class DisplayableDatafastRender - Should the rendering be quick (and possibly
inaccurate)
VisADException - VisAD failure.
RemoteException - Java RMI failure.public static String getDefaultPlace(int orient)
orient - orientation
public static int getDefaultOrient(String place)
place - placement
public static float getX(int orient,
String placement)
orient - orientationplacement - placement
public static float getY(int orient,
String placement)
orient - orientationplacement - placement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||