- All Known Implementing Classes:
ColorScaleLegendBuilder
,StandardLegendBuilder
public interface LegendBuilder
A legend builder is responsible for creating a legend for a chart. The API
has been kept to a minimum intentionally, so as not to overly constrain
developers that want to implement a custom legend builder. The
get/setItemFont()
methods have been added for convenience
because changing the font of the legend item text is a very common
operation.
Classes that implement this interface should also implement
java.io.Serializable
if you intend to serialize and deserialize
chart objects.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateLegend
(Plot3D plot, Anchor2D anchor, Orientation orientation, ChartStyle style) Creates a legend for the specified plot.
-
Method Details
-
createLegend
Creates a legend for the specified plot. If this method returnsnull
, no legend will be displayed.- Parameters:
plot
- the plot (null
not permitted).anchor
- the anchor (null
not permitted).orientation
- the legend orientation (null
not permitted).style
- the style (null
not permitted).- Returns:
- A legend (possibly
null
). - Since:
- 1.2
-