com.steema.teechart.legend
Class LegendSymbol

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.legend.LegendSymbol
All Implemented Interfaces:
java.io.Serializable

public class LegendSymbol
extends TeeBase

Title: LegendSymbol class

Description: Legend item symbol characteristics

Copyright (c) 2005-2006 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
protected  boolean continuous
          Determines if legend symbol should display without separation from other legend item symbols.
protected  Legend legend
          Internal field pointing to parent legend class
protected  LegendSymbolPosition position
          Controls where to display the legend symbol related to symbol item.
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
LegendSymbol(Legend legend)
           
 
Method Summary
protected  int calcWidth(int value)
           
 boolean getContinuous()
          Adjoins the different legend color rectangles when true.
 boolean getDefaultPen()
          Uses series pen properties to draw a border around the coloured box legend symbol, when true.
 ChartPen getPen()
          pen used to draw a border around the color box legend symbols.
 LegendSymbolPosition getPosition()
          The position of the Legend color rectangles.
 boolean getSquared()
          Resizes the legend symbol to square shaped, when true.
 boolean getVisible()
          Shows or hides Legend symbols.
 int getWidth()
          Defines the width of the color rectangles (symbols).
 LegendSymbolSize getWidthUnits()
          Defines the Width units for the width of Symbol.
protected  java.lang.Object readResolve()
           
 void setContinuous(boolean value)
          Adjoins the different legend color rectangles when true.
 void setDefaultPen(boolean value)
          Uses series pen properties to draw a border around the coloured box legend symbol, when true.
 void setPosition(LegendSymbolPosition value)
          Sets the position of the Legend color rectangles.
 void setSquared(boolean value)
          Resizes the legend symbol to square shaped, when true.
 void setVisible(boolean value)
          Shows or hides Legend symbols.
 void setWidth(int value)
           
 void setWidthUnits(LegendSymbolSize value)
          Sets the Width units for the width of Symbol.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

continuous

protected boolean continuous
Determines if legend symbol should display without separation from other legend item symbols.


position

protected LegendSymbolPosition position
Controls where to display the legend symbol related to symbol item.


legend

protected transient Legend legend
Internal field pointing to parent legend class

Constructor Detail

LegendSymbol

public LegendSymbol(Legend legend)
Method Detail

readResolve

protected java.lang.Object readResolve()

getWidth

public int getWidth()
Defines the width of the color rectangles (symbols).
Default value: 20

Returns:
int

setWidth

public void setWidth(int value)

getPosition

public LegendSymbolPosition getPosition()
The position of the Legend color rectangles.
It can have one of the following values:
Left The color rectangles are placed left of the legend items
Right The color rectangles are placed right of the legend items
Default value: Left

Returns:
LegendSymbolPosition

setPosition

public void setPosition(LegendSymbolPosition value)
Sets the position of the Legend color rectangles.
Default value: Left

Parameters:
value - LegendSymbolPosition

getWidthUnits

public LegendSymbolSize getWidthUnits()
Defines the Width units for the width of Symbol.

- Percent is percentage of Legend box width
- Pixels is the width in standard pixels
Default value: Percent

Returns:
LegendSymbolSize

setWidthUnits

public void setWidthUnits(LegendSymbolSize value)
Sets the Width units for the width of Symbol.

Default value: Percent

Parameters:
value - LegendSymbolSize

getContinuous

public boolean getContinuous()
Adjoins the different legend color rectangles when true.
The color rectangles of the different items are drawn attached to each other (no vertical spacing). When false, the color rectangles are drawn as seperate rectangles.
Default value: false

Returns:
boolean

setContinuous

public void setContinuous(boolean value)
Adjoins the different legend color rectangles when true.
Default value: false

Parameters:
value - boolean

getDefaultPen

public boolean getDefaultPen()
Uses series pen properties to draw a border around the coloured box legend symbol, when true. When false, the Legend will use the legend symbol Pen property.
Default value: true

Returns:
boolean

setDefaultPen

public void setDefaultPen(boolean value)
Uses series pen properties to draw a border around the coloured box legend symbol, when true. When false, the Legend will use the legend symbol Pen property.
Default value: true

Parameters:
value - boolean

calcWidth

protected int calcWidth(int value)

getPen

public ChartPen getPen()
pen used to draw a border around the color box legend symbols.
By default this pen is not used. Instead, the appropiate Series pen is used to draw the symbols borders.
To use this Pen, first set DefaultPen to false.

Returns:
ChartPen

getSquared

public boolean getSquared()
Resizes the legend symbol to square shaped, when true.
When false, the legend symbol height is determined by the legend font size, and the symbol width is calculated using the Width and WidthUnits properties.
Default value: false

Returns:
boolean

setSquared

public void setSquared(boolean value)
Resizes the legend symbol to square shaped, when true.

Parameters:
value - boolean

getVisible

public boolean getVisible()
Shows or hides Legend symbols.
Default value: true

Returns:
boolean

setVisible

public void setVisible(boolean value)
Shows or hides Legend symbols.
Default value: true

Parameters:
value - boolean