lt.monarch.chart.legend.symbols
Class LegendBarSymbol

java.lang.Object
  extended by lt.monarch.chart.engine.LegendSymbol
      extended by lt.monarch.chart.legend.symbols.LegendBarSymbol
All Implemented Interfaces:
java.io.Serializable

public class LegendBarSymbol
extends LegendSymbol

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.engine.LegendSymbol
paintStyle
 
Constructor Summary
Constructor and Description
LegendBarSymbol(Shape2D shape, Style style)
          Constructs a new BarSeriesLegendSymbol object.
LegendBarSymbol(java.lang.String tag, Shape2D shape, Style style)
          Constructs a new BarSeriesLegendSymbol object.
 
Method Summary
Modifier and Type Method and Description
 void draw(AbstractGraphics g, Style legendStyle, Rectangle2D r, PaintMode paintMode)
          Renders the symbol.
 int getPreferredHeight(AbstractGraphics g)
          Gets the preferred height of this legend symbol.
 int getPreferredWidth(AbstractGraphics g)
          Gets the preferred width of this legend symbol.
 void setShape(Shape2D shape)
          Sets shape of the bar
 
Methods inherited from class lt.monarch.chart.engine.LegendSymbol
getReferencedEntity, setReferencedEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegendBarSymbol

public LegendBarSymbol(Shape2D shape,
                       Style style)
Constructs a new BarSeriesLegendSymbol object.

Parameters:
shape -
style - bar style

LegendBarSymbol

public LegendBarSymbol(java.lang.String tag,
                       Shape2D shape,
                       Style style)
Constructs a new BarSeriesLegendSymbol object.

Parameters:
tag -
shape -
style - bar style
Method Detail

setShape

public void setShape(Shape2D shape)
Sets shape of the bar

Parameters:
shape - bar shape

getPreferredHeight

public int getPreferredHeight(AbstractGraphics g)
Gets the preferred height of this legend symbol.

Specified by:
getPreferredHeight in class LegendSymbol
Parameters:
g - graphics context for which the preferred height is to be calculated
Returns:
preferred height of the symbol

getPreferredWidth

public int getPreferredWidth(AbstractGraphics g)
Gets the preferred width of this legend symbol.

Specified by:
getPreferredWidth in class LegendSymbol
Parameters:
g - graphics context for which the preferred width is to be calculated
Returns:
this symbols's preferred width

draw

public void draw(AbstractGraphics g,
                 Style legendStyle,
                 Rectangle2D r,
                 PaintMode paintMode)
Description copied from class: LegendSymbol
Renders the symbol.

Specified by:
draw in class LegendSymbol
Parameters:
g - graphics context
legendStyle - legend stylesheet for common attributes, such a box symbol border
r - symbol bounds
paintMode - paint mode