lt.monarch.chart.engine
Class LegendSymbol

java.lang.Object
  extended by lt.monarch.chart.engine.LegendSymbol
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Legend3DVectorSymbol, LegendBarSymbol, LegendBoxSymbol, LegendMarkerSymbol, LegendSegmentSymbol, LegendStockSymbol, LegendVectorSymbol, NullLegendSymbol

public abstract class LegendSymbol
extends java.lang.Object
implements java.io.Serializable

Legend symbol renderer.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  PaintStyle<SeriesPaintTags> paintStyle
          Color style object
 
Constructor Summary
Constructor and Description
LegendSymbol()
           
 
Method Summary
Modifier and Type Method and Description
abstract  void draw(AbstractGraphics g, Style style, Rectangle2D bounds, PaintMode paintMode)
          Renders the symbol.
abstract  int getPreferredHeight(AbstractGraphics g)
          Calculates the preferred height of the symbol.
abstract  int getPreferredWidth(AbstractGraphics g)
          Calculates the preferred width of the symbol.
 ChartEntity getReferencedEntity()
          Deprecated. use LegendEntry.getReferencedEntity
 void setReferencedEntity(ChartEntity referencedEntity)
          Deprecated. use LegendEntry.setReferencedEntity (ChartEntity)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paintStyle

protected PaintStyle<SeriesPaintTags> paintStyle
Color style object

Constructor Detail

LegendSymbol

public LegendSymbol()
Method Detail

setReferencedEntity

@Deprecated
public void setReferencedEntity(ChartEntity referencedEntity)
Deprecated. use LegendEntry.setReferencedEntity (ChartEntity)

Sets the referenced chart entity for the legend symbol.

Parameters:
referencedEntity - the referenced chart entity

getReferencedEntity

@Deprecated
public ChartEntity getReferencedEntity()
Deprecated. use LegendEntry.getReferencedEntity

Gets the chart entity referenced by the legend symbol.

Returns:
the chart entity referenced by the legend symbol

getPreferredHeight

public abstract int getPreferredHeight(AbstractGraphics g)
Calculates the preferred height of the symbol.

Parameters:
g - graphics context for which the preferred height is to be calculated
Returns:
preferred height of the symbol

getPreferredWidth

public abstract int getPreferredWidth(AbstractGraphics g)
Calculates the preferred width of the symbol.

Parameters:
g - graphics context for which the preferred width is to be calculated
Returns:
preferred width of the symbol

draw

public abstract void draw(AbstractGraphics g,
                          Style style,
                          Rectangle2D bounds,
                          PaintMode paintMode)
Renders the symbol.

Parameters:
g - graphics context
style - legend stylesheet for common attributes, such a box symbol border
bounds - symbol bounds
paintMode - paint mode