public final class StandardLegendBuilder extends java.lang.Object implements LegendBuilder, java.io.Serializable
| Constructor and Description |
|---|
StandardLegendBuilder()
Creates a builder for a simple legend with no header and no footer.
|
StandardLegendBuilder(java.lang.String header,
java.lang.String footer)
Creates a builder for a simple legend with the specified header and/or
footer.
|
| Modifier and Type | Method and Description |
|---|---|
TableElement |
createLegend(Plot3D plot,
Anchor2D anchor,
Orientation orientation,
ChartStyle style)
Creates and returns a legend (instance of
TableElement) that
provides a visual key for the data series in the specified plot. |
boolean |
equals(java.lang.Object obj)
Tests this legend builder for equality with an arbitrary object.
|
VAlign |
getColumnAlignment()
Returns the column alignment.
|
java.lang.String |
getFooter()
Returns the footer text.
|
HAlign |
getFooterAlignment()
Returns the footer alignment.
|
java.lang.String |
getHeader()
Returns the header text.
|
HAlign |
getHeaderAlignment()
Returns the header alignment.
|
HAlign |
getRowAlignment()
Returns the row alignment.
|
void |
setColumnAlignment(VAlign alignment)
Sets the column alignment (to override the default alignment that is
derived from the legend anchor point).
|
void |
setFooter(java.lang.String footer)
Sets the footer text.
|
void |
setFooterAlignment(HAlign align)
Sets the footer alignment.
|
void |
setHeader(java.lang.String header)
Sets the header text.
|
void |
setHeaderAlignment(HAlign align)
Sets the header alignment.
|
void |
setRowAlignment(HAlign alignment)
Sets the row alignment (to override the default alignment that is
derived from the legend anchor point).
|
public StandardLegendBuilder()
public StandardLegendBuilder(java.lang.String header, java.lang.String footer)
header - the legend header (null permitted).footer - the legend footer (null permitted).public java.lang.String getHeader()
null).public void setHeader(java.lang.String header)
header - the header (null permitted).public HAlign getHeaderAlignment()
null).public void setHeaderAlignment(HAlign align)
align - the header alignment (null not permitted).public java.lang.String getFooter()
null).public void setFooter(java.lang.String footer)
footer - the footer (null permitted).public HAlign getFooterAlignment()
null).public void setFooterAlignment(HAlign align)
align - the footer alignment (null not permitted).public HAlign getRowAlignment()
null
which means that the row alignment is derived from the anchor point
(left aligned for anchors on the left side, center alignment for
anchors in the middle, and right aligned for anchors on the right side).null).public void setRowAlignment(HAlign alignment)
null.alignment - the row alignment (null permitted).public VAlign getColumnAlignment()
null
which means that the column alignment is derived from the anchor point
(top aligned for anchors at the top, center alignment for
anchors in the middle, and bottom aligned for anchors at the bottom).null).public void setColumnAlignment(VAlign alignment)
null.alignment - the column alignment (null permitted).public TableElement createLegend(Plot3D plot, Anchor2D anchor, Orientation orientation, ChartStyle style)
TableElement) that
provides a visual key for the data series in the specified plot. The
plot can be any of the built-in plot types: PiePlot3D,
CategoryPlot3D or XYZPlot.
createLegend in interface LegendBuilderplot - the plot (null not permitted).anchor - the anchor (null not permitted).orientation - the orientation (null not permitted).style - the chart style (null not permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).