java.lang.Object
org.jfree.chart3d.legend.ColorScaleLegendBuilder
- All Implemented Interfaces:
Serializable
,LegendBuilder
A legend builder that creates a legend representing a
The orientation and anchor point for the legend are properties of the
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
ColorScale
.
This builder will only create a legend if the plot uses a renderer
that implements the ColorScaleRenderer
interface.
The orientation and anchor point for the legend are properties of the
Chart3D
class.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- Since:
- 1.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLegend
(Plot3D plot, Anchor2D anchor, Orientation orientation, ChartStyle style) Creates a new color scale legend with the specified orientation.boolean
Tests this builder for equality with an arbitrary object.double
Returns the length of the bar displaying the color scale.double
Returns the width of the bar displaying the color scale.boolean
Returns the flag that controls whether or not aFixedColorScale
will be ignored for the purposes of generating a legend.void
setBarLength
(double length) Sets the length of the bar displaying the color scale.void
setBarWidth
(double width) Sets the width of the bar displaying the color scale.void
setIgnoreFixedColorScale
(boolean ignore) Sets the flag that controls whether or not aFixedColorScale
will be ignored for the purposes of generating a legend.
-
Constructor Details
-
ColorScaleLegendBuilder
public ColorScaleLegendBuilder()Creates a new instance.
-
-
Method Details
-
getBarWidth
Returns the width of the bar displaying the color scale.- Returns:
- The width (in Java2D units).
-
setBarWidth
Sets the width of the bar displaying the color scale.- Parameters:
width
- the width (in Java2D units).
-
getBarLength
Returns the length of the bar displaying the color scale.- Returns:
- The length (in Java2D units).
-
setBarLength
Sets the length of the bar displaying the color scale.- Parameters:
length
- the length (in Java2D units).
-
getIgnoreFixedColorScale
Returns the flag that controls whether or not aFixedColorScale
will be ignored for the purposes of generating a legend.- Returns:
- A boolean.
-
setIgnoreFixedColorScale
Sets the flag that controls whether or not aFixedColorScale
will be ignored for the purposes of generating a legend.- Parameters:
ignore
- the new flag value.
-
createLegend
public TableElement createLegend(Plot3D plot, Anchor2D anchor, Orientation orientation, ChartStyle style) Creates a new color scale legend with the specified orientation. If the plot does not use a renderer that implementsColorScaleRenderer
then this method will returnnull
and no legend will be drawn on the chart.- Specified by:
createLegend
in interfaceLegendBuilder
- Parameters:
plot
- the plot (null
not permitted).anchor
- the anchor (null
not permitted).orientation
- the orientation (null
not permitted).style
- the chart style (null
not permitted).- Returns:
- A color scale legend (possibly
null
).
-
equals
Tests this builder for equality with an arbitrary object.
-