Package org.jCharts
Class Legend
java.lang.Object
org.jCharts.Legend
- All Implemented Interfaces:
Serializable
,HTMLTestable
- Version:
- $Id: Legend.java,v 1.17 2003/04/19 01:39:17 nathaniel_auvil Exp $
- Author:
- Nathaniel Auvil, Sandor Dornbush, Sundar Balasubramanian
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Chart
private ArrayList
private float
private float
private ArrayList
private LegendProperties
private int
private int
private ArrayList
private ArrayList
private ArrayList
private TextProcessor
private float
private float
private float
private float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateDrawingValues
(IData iData) Calculates the width and height needed to display the Legend.void
computeLegendXY
(IAxisDataSeries iAxisDataSeries, float chartTitleHeight) private void
determineWidthAndHeight
(int numberOfLabels) Determines the dimensions needed for the Legend and creates the image for it.int
float
getWidth()
private void
processData
(IAxisDataSeries iAxisDataSeries) Central method for processing data; try to minimize looping.private void
processData
(IPieChartDataSet iPieChartDataSet) Central method for processing data; try to minimize looping.private void
processLegendLabels
(IAxisPlotDataSet iAxisPlotDataSet) Method for processing data for AxisPlot datasets; try to minimize looping.private void
processLegendLabels
(IPieChartDataSet iPieChartDataSet) Method for processing data for PieCharts; try to minimize looping.void
render()
Renders the legend.void
setX
(float x) void
setY
(float y) void
toHTML
(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.
-
Field Details
-
chart
-
legendProperties
-
iconSide
private float iconSide -
widestLabelAndColumnPadding
private float widestLabelAndColumnPadding -
numColumns
private int numColumns -
numRows
private int numRows -
textProcessor
-
x
private float x -
y
private float y -
width
private float width -
height
private float height -
labels
-
paints
-
shapes
-
fillPointsFlags
-
pointOutlinePaints
-
-
Constructor Details
-
Legend
Deprecated.- Parameters:
chart
-
-
Legend
- Parameters:
chart
-legendProperties
-
-
-
Method Details
-
setX
public void setX(float x) -
setY
public void setY(float y) -
computeLegendXY
- Parameters:
iAxisDataSeries
-chartTitleHeight
-
-
processData
Central method for processing data; try to minimize looping. 1) calculate the maximum height of labels 2) find the maximum label width- Parameters:
iAxisDataSeries
-
-
processData
Central method for processing data; try to minimize looping. 1) calculate the maximum height of labels 2) find the maximum label width- Parameters:
iPieChartDataSet
-
-
processLegendLabels
Method for processing data for AxisPlot datasets; try to minimize looping. 1) calculate the maximum height of labels 2) find the maximum label width- Parameters:
iAxisPlotDataSet
-
-
processLegendLabels
Method for processing data for PieCharts; try to minimize looping. 1) calculate the maximum height of labels 2) find the maximum label width- Parameters:
iPieChartDataSet
-
-
getLegendProperties
-
calculateDrawingValues
Calculates the width and height needed to display the Legend. Use the getWidth() and getHeight() methods to extract this information.- Parameters:
iData
- can pass either the IPieChartDataSet or the IChartDataSeries to this.
-
getWidth
public float getWidth() -
getHeight
public int getHeight() -
determineWidthAndHeight
private void determineWidthAndHeight(int numberOfLabels) Determines the dimensions needed for the Legend and creates the image for it. -
render
public void render()Renders the legend. -
toHTML
Enables the testing routines to display the contents of this Object.- Specified by:
toHTML
in interfaceHTMLTestable
- Parameters:
htmlGenerator
-
-