- 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 (nullnot permitted).anchor- the anchor (nullnot permitted).orientation- the legend orientation (nullnot permitted).style- the style (nullnot permitted).- Returns:
- A legend (possibly
null). - Since:
- 1.2
-