com.odesys.chart
Class LegendItem
java.lang.Object
|
+--com.odesys.chart.LegendItem
- Direct Known Subclasses:
- LineLegendItem
- public class LegendItem
- extends java.lang.Object
LegendItem represens a single item in the LegendView.
Constructor Summary |
LegendItem(LegendView view,
Series series)
Creates a new LegendItem instance for the specified LegendView and Series. |
Method Summary |
void |
drawSymbol(java.awt.Graphics g,
java.awt.Rectangle symbolRect)
Draws the symbol of this LegendItem. |
java.awt.Dimension |
getSize(java.awt.FontMetrics fm)
Calculates the size of this LegendItem bsed on the specified FontMetrics. |
void |
paint(java.awt.Graphics g)
Draws this LegendItem in the specified Graphics context |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LegendItem
public LegendItem(LegendView view,
Series series)
- Creates a new LegendItem instance for the specified LegendView and Series.
getSize
public java.awt.Dimension getSize(java.awt.FontMetrics fm)
- Calculates the size of this LegendItem bsed on the specified FontMetrics.
paint
public void paint(java.awt.Graphics g)
- Draws this LegendItem in the specified Graphics context
drawSymbol
public void drawSymbol(java.awt.Graphics g,
java.awt.Rectangle symbolRect)
- Draws the symbol of this LegendItem. The default symbol is a rectangle
with the color of the Series of this LegendItem. Some Charts may override
this method to draw specific symbols.