public class ColormapLegend extends ChartNode3D implements Serializable
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
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 and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
getAxisTitlePosition, getBoundingSphere, getChildren, getColorFunction, getConcatenatedViewport, getDataType, getLightingEnabled, getMarkerPulsingCycle, getMarkerPulsingCycleOffset, getMarkerPulsingMaximumScale, getMarkerPulsingMinimumScale, getMarkerRotatingAxis, getMarkerRotatingCycle, getMarkerRotatingCycleOffset, getMarkerType, getMaterial, getParent, getTitle, getViewport, getVirtualUniverse, getZ, setAxisTitlePosition, setBoundingSphere, setColorFunction, setDataType, setLightingEnabled, setMarkerPulsingCycle, setMarkerPulsingCycleOffset, setMarkerPulsingMaximumScale, setMarkerPulsingMinimumScale, setMarkerRotatingAxis, setMarkerRotatingCycle, setMarkerRotatingCycleOffset, setMarkerType, setMaterial, setTitle, setViewport, setViewport, setZ
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextColor, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, isBitSet, parseColor, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setCustomTransform, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextColor, setTextColor, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
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.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.Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.