java.lang.Object
org.knowm.xchart.internal.chartpart.Legend_<ST,S>
- All Implemented Interfaces:
ChartPart
- Direct Known Subclasses:
Legend_Bubble, Legend_HeatMap, Legend_Marker, Legend_OHLC, Legend_Pie
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Rectangle2D(package private) static final int(package private) static final intprivate static final intprivate static final int(package private) double(package private) doubleFields inherited from interface ChartPart
SOLID_STROKE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprivate Rectangle2Ddetermine the width and height of the chart legend with horizontal layoutprivate Rectangle2Ddetermine the width and height of the chart legend(package private) floatgetLegendEntryHeight(Map<String, Rectangle2D> seriesTextBounds, int markerSize) (package private) floatgetLegendEntryWidth(Map<String, Rectangle2D> seriesTextBounds, int markerSize) protected abstract doublegetSeriesLegendRenderGraphicHeight(S series) (package private) Map<String, Rectangle2D> getSeriesTextBounds(S series) Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n".voidpaint(Graphics2D g) (package private) voidpaintSeriesText(Graphics2D g, Map<String, Rectangle2D> seriesTextBounds, int markerSize, double x, double starty)
-
Field Details
-
BOX_SIZE
static final int BOX_SIZE- See Also:
-
BOX_OUTLINE_WIDTH
static final int BOX_OUTLINE_WIDTH- See Also:
-
LEGEND_MARGIN
private static final int LEGEND_MARGIN- See Also:
-
MULTI_LINE_SPACE
private static final int MULTI_LINE_SPACE- See Also:
-
chart
-
xOffset
double xOffset -
yOffset
double yOffset -
bounds
-
-
Constructor Details
-
Legend_
-
-
Method Details
-
getSeriesLegendRenderGraphicHeight
-
doPaint
-
paint
-
getBoundsHintVertical
determine the width and height of the chart legend -
getBoundsHintHorizontal
determine the width and height of the chart legend with horizontal layout -
getSeriesTextBounds
Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n". This method returns a Map for each single legend entry, which is normally just a Map with one single entry.- Parameters:
series-- Returns:
-
getLegendEntryHeight
-
getLegendEntryWidth
-
paintSeriesText
void paintSeriesText(Graphics2D g, Map<String, Rectangle2D> seriesTextBounds, int markerSize, double x, double starty) -
getBounds
-