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.booleanTests this builder for equality with an arbitrary object.doubleReturns the length of the bar displaying the color scale.doubleReturns the width of the bar displaying the color scale.booleanReturns the flag that controls whether or not aFixedColorScalewill be ignored for the purposes of generating a legend.voidsetBarLength(double length) Sets the length of the bar displaying the color scale.voidsetBarWidth(double width) Sets the width of the bar displaying the color scale.voidsetIgnoreFixedColorScale(boolean ignore) Sets the flag that controls whether or not aFixedColorScalewill 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 aFixedColorScalewill be ignored for the purposes of generating a legend.- Returns:
- A boolean.
-
setIgnoreFixedColorScale
Sets the flag that controls whether or not aFixedColorScalewill 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 implementsColorScaleRendererthen this method will returnnulland no legend will be drawn on the chart.- Specified by:
createLegendin interfaceLegendBuilder- Parameters:
plot- the plot (nullnot permitted).anchor- the anchor (nullnot permitted).orientation- the orientation (nullnot permitted).style- the chart style (nullnot permitted).- Returns:
- A color scale legend (possibly
null).
-
equals
Tests this builder for equality with an arbitrary object.
-