|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.klg.jclass.chart.JCChartLegendManager
JCChartLegend manages the populating and rendering of legend
items in a JClass Chart.
| Field Summary | |
protected com.klg.jclass.chart.CachedViewProps[] |
cachedView
Cached data views, series, and related data used by legend drawing. |
protected com.klg.jclass.chart.JCChart |
chart
The JCChart instance for which this class is managing. |
protected List |
legendItems
Legend vector -- contains all items in the legend, organized into subvectors representing one column (usually defined by one data view) of the legend. |
| Constructor Summary | |
JCChartLegendManager(com.klg.jclass.chart.JCChart c)
Internal constructor for legend. |
|
| Method Summary | |
protected void |
calcSymbolSize(com.klg.jclass.util.legend.JCLegendItem newItem,
com.klg.jclass.chart.JCChartStyle style,
int chartType)
Calculates the appropriate symbol size to be used for a legend item. |
void |
drawLegendItem(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
JCLegendRenderer method that is not used for this
implementation. |
void |
drawLegendItemSymbol(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
Draws one legend item based on the size and position given in it's JCLegendItem instance. |
void |
drawLegendItemText(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
Used for implementing custom text draws for a legend item. |
List |
getLegendItems(FontMetrics fm)
Creates the list of legend items from the chart's data views and populates the legend with it. |
Color |
getOutlineColor(com.klg.jclass.util.legend.JCLegendItem thisItem)
Retrieves the appropriate outline color for this legend item's symbol. |
protected boolean |
isFirst(int chartType)
This method returns true if the first visible data view is of
the specified chart type. |
boolean |
isTitleItem(com.klg.jclass.util.legend.JCLegendItem item)
Checks if the legend item is a title. |
void |
setFillGraphics(Graphics gc,
com.klg.jclass.util.legend.JCLegendItem thisItem)
Sets the supplied Graphics object with the appropriate drawing
properties for this legend item. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List legendItems
protected transient com.klg.jclass.chart.CachedViewProps[] cachedView
protected com.klg.jclass.chart.JCChart chart
JCChart instance for which this class is managing.
| Constructor Detail |
public JCChartLegendManager(com.klg.jclass.chart.JCChart c)
c - internal constructor| Method Detail |
protected boolean isFirst(int chartType)
true if the first visible data view is of
the specified chart type.
chartType -
true is the first visible data view is of the specified
chart type; false otherwisepublic List getLegendItems(FontMetrics fm)
getLegendItems in interface JCLegendPopulatorfm - the FontMetrics for this legend
protected void calcSymbolSize(com.klg.jclass.util.legend.JCLegendItem newItem,
com.klg.jclass.chart.JCChartStyle style,
int chartType)
newItem - the legend item in questionstyle - the style object used by this legend itemchartType - the chart type associated with this legend item
public void drawLegendItem(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
JCLegendRenderer method that is not used for this
implementation.
Just return.
drawLegendItem in interface JCLegendRenderergc - the graphics contextuseFont - the font used for this legendthisItem - the legend item to draw (a JCLegendItem
instance)
public void drawLegendItemSymbol(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
JCLegendItem instance. The symbol to be drawn is derived from
the chart type and the symbol style for the series.
drawLegendItemSymbol in interface JCLegendRenderergc - the graphics contextuseFont - the font used for this legendthisItem - the legend item to draw (a JCLegendItem
instance)
public void drawLegendItemText(Graphics gc,
Font useFont,
com.klg.jclass.util.legend.JCLegendItem thisItem)
String object.
drawLegendItemText in interface JCLegendRenderergc - Graphics object used to draw the legenduseFont - the font being used in this legendthisItem - the JCLegendItem object representing the
legend item to drawpublic Color getOutlineColor(com.klg.jclass.util.legend.JCLegendItem thisItem)
getOutlineColor in interface JCLegendRendererthisItem - the legend item in question
public void setFillGraphics(Graphics gc,
com.klg.jclass.util.legend.JCLegendItem thisItem)
Graphics object with the appropriate drawing
properties for this legend item. The actual draw will be done
by the legend class.
setFillGraphics in interface JCLegendRenderergc - the Graphics object to changethisItem - the legend item in questionpublic boolean isTitleItem(com.klg.jclass.util.legend.JCLegendItem item)
isTitleItem in interface JCLegendPopulatoritem - the legend item in question
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||