|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.chart.AbstractChartNode com.imsl.chart3d.ChartNode3D com.imsl.chart3d.ColormapLegend
public class ColormapLegend
Adds a legend for a Colormap gradient to the background of the canvas.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from class com.imsl.chart3d.ChartNode3D |
---|
AXIS_TITLE_AT_END, AXIS_TITLE_PARALLEL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, MARKER_TYPE_CUBE, MARKER_TYPE_CUSTOM, MARKER_TYPE_PLUS, MARKER_TYPE_SIMPLE_CUBE, MARKER_TYPE_SIMPLE_PLUS, MARKER_TYPE_SIMPLE_TETRAHEDRON, MARKER_TYPE_SPHERE, MARKER_TYPE_TETRAHEDRON |
Fields inherited from class com.imsl.chart.AbstractChartNode |
---|
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG |
Constructor Summary | |
---|---|
ColormapLegend(Chart3D chart,
Colormap colormap,
double[] ticks)
Creates a legend for a Colormap and adds it to the canvas. |
|
ColormapLegend(Chart3D chart,
Colormap colormap,
double min,
double max)
|
Method Summary | |
---|---|
protected void |
addToSceneGraph(Group parent)
Called to add this object to the scene graph. |
int[] |
getPosition()
Returns the position of the legend. |
double[] |
getTicks()
Returns the value of the "Ticks" attribute, if set. |
double[] |
getWindow()
Returns the window for a ColormapLegend. |
void |
remove()
Removes the node from its parents list of children. |
void |
setPosition(int x,
int y)
Sets the position of the legend. |
void |
setTicks(double[] ticks)
Sets the value of the "Ticks" attribute. |
void |
setWindow(double[] window)
Sets the window for a ColormapLegend. |
void |
setWindow(double min,
double max)
Sets the window for a ColormapLegend. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public ColormapLegend(Chart3D chart, Colormap colormap, double[] ticks)
The paint
method in Canvas3DChart.Paint
is written
into an image of size width
by height
.
Any whitespace around the image is trimmed. The trimmed image is then
used to paint onto the canvas.
chart
- is the Chart3D
object on which the legend is to be painted.colormap
- is the Colormap
for the legend.ticks
- is an array of values used to label the legend.
These should be equally spaced.public ColormapLegend(Chart3D chart, Colormap colormap, double min, double max)
Method Detail |
---|
protected void addToSceneGraph(Group parent)
ChartNode3D
addToSceneGraph
in class ChartNode3D
parent
- is the node in the scene graph at which this
object is to be added.public int[] getPosition()
public double[] getTicks()
double
value of the "Ticks" attribute, if
defined. Otherwise, the computed tick values are returned.public double[] getWindow()
public void remove()
remove
in class AbstractChartNode
public void setPosition(int x, int y)
x
- is the pixel position in the canvas of the left edge of the legend.
If x is negative then |x| is the distance from the right edge of the legend
to the right edge of the component.y
- is the pixel position in the canvas of the top edge of the legend.
If y is negative then |y| is the distance from the bottom edge of the legend
to the bottom edge of the component.public void setTicks(double[] ticks)
ticks
- an array of double
s which contain the
location, in user coordinates, of the major tick marks.
If set, this attribute overrides the automatic
computation of the tick values.public void setWindow(double[] window)
window
- is an array of length two containing the range
of this axis.public void setWindow(double min, double max)
min
- is the value of the bottom end of the colormap legend labels.max
- is the value of the top of the colormap legend labels.
|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |