com.steema.teechart.drawing
Class ChartPen

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.drawing.ChartPen
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AxisLinePen, GridPen, PreviewChartPen, TicksPen

public class ChartPen
extends TeeBase

Title: ChartPen class

Description: Common Chart Pen. Pen used to draw lines and borders.

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

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
 Color color
           
 DashCap dashCap
           
 DashStyle dashStyle
           
protected  Color defaultColor
           
protected  LineCap defaultEndCap
           
protected  DashStyle defaultStyle
           
protected  boolean defaultVisible
           
 LineCap endCap
           
protected  boolean usesVisible
           
 boolean visible
           
 int width
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
ChartPen(ChartPen source)
           
ChartPen(Color c)
           
ChartPen(IBaseChart c)
           
ChartPen(IBaseChart c, boolean startVisible)
           
ChartPen(IBaseChart c, Color startColor)
           
ChartPen(IBaseChart c, Color startColor, boolean startVisible)
           
ChartPen(IBaseChart c, Color startColor, boolean startVisible, int startWidth, LineCap startEndCap, DashStyle startStyle)
           
ChartPen(IBaseChart c, Color startColor, boolean startVisible, LineCap cap)
           
ChartPen(IBaseChart c, Color startColor, DashStyle startStyle)
           
ChartPen(IBaseChart c, Color startColor, int startWidth)
           
 
Method Summary
 void assign(ChartPen p)
           
 void assign(ChartPen p, Color value)
           
 Color getColor()
          Determines the color used by the pen to draw lines on the Drawing.
 DashCap getDashCap()
          Defines segment ending style of dashed lines.
 LineCap getEndCap()
          Style of line endings.
 java.awt.Stroke getStroke()
           
 DashStyle getStyle()
          Determines the style in which the pen draw lines on the Drawing.
 int getTransparency()
          Sets Transparency level from 0 to 100%.
 boolean getVisible()
          Determines if the pen will draw lines or not.
 int getWidth()
          Determines the width of lines the pen draws.
 void internalAssign(ChartPen p)
           
 void invalidate()
          Use invalidate when the entire canvas needs to be repainted.
 void reset()
           
 void setColor(java.awt.Color value)
           
 void setColor(Color value)
           
 void setDashCap(DashCap value)
           
 void setDefaultColor(Color value)
           
 void setDefaultStyle(DashStyle value)
           
 void setDefaultVisible(boolean value)
           
 void setEndCap(LineCap value)
          Style of line endings.
 void setStyle(DashStyle value)
          Determines the style in which the pen draw lines on the Drawing.
 void setTransparency(int value)
          Sets Transparency level from 0 to 100%.
 void setUsesVisible(boolean value)
           
 void setVisible(boolean value)
          Determines if the pen will draw lines or not.
 void setWidth(int value)
          Determines the width of lines the pen draws.
protected  boolean shouldSerializeColor()
           
protected  boolean shouldSerializeEndCap()
           
protected  boolean shouldSerializeStyle()
           
protected  boolean shouldSerializeVisible()
           
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, 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

color

public Color color

dashStyle

public DashStyle dashStyle

width

public int width

endCap

public LineCap endCap

dashCap

public DashCap dashCap

visible

public boolean visible

defaultColor

protected transient Color defaultColor

defaultEndCap

protected transient LineCap defaultEndCap

defaultStyle

protected transient DashStyle defaultStyle

defaultVisible

protected transient boolean defaultVisible

usesVisible

protected transient boolean usesVisible
Constructor Detail

ChartPen

public ChartPen(ChartPen source)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor,
                boolean startVisible,
                int startWidth,
                LineCap startEndCap,
                DashStyle startStyle)

ChartPen

public ChartPen(IBaseChart c)

ChartPen

public ChartPen(Color c)

ChartPen

public ChartPen(IBaseChart c,
                boolean startVisible)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor,
                DashStyle startStyle)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor,
                boolean startVisible)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor,
                int startWidth)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor)

ChartPen

public ChartPen(IBaseChart c,
                Color startColor,
                boolean startVisible,
                LineCap cap)
Method Detail

reset

public void reset()

internalAssign

public void internalAssign(ChartPen p)

assign

public void assign(ChartPen p)

assign

public void assign(ChartPen p,
                   Color value)

setUsesVisible

public void setUsesVisible(boolean value)

shouldSerializeColor

protected boolean shouldSerializeColor()

setDefaultColor

public void setDefaultColor(Color value)

setColor

public void setColor(java.awt.Color value)

setColor

public void setColor(Color value)

setDefaultStyle

public void setDefaultStyle(DashStyle value)

setDefaultVisible

public void setDefaultVisible(boolean value)

shouldSerializeVisible

protected boolean shouldSerializeVisible()

getVisible

public final boolean getVisible()
Determines if the pen will draw lines or not.

Returns:
boolean

setVisible

public void setVisible(boolean value)
Determines if the pen will draw lines or not.

Parameters:
value - boolean

getTransparency

public int getTransparency()
Sets Transparency level from 0 to 100%.
Default value: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Sets Transparency level from 0 to 100%.
Default value: 0

Parameters:
value - int

getColor

public Color getColor()
Determines the color used by the pen to draw lines on the Drawing. It can be any valid color constant like Color.Red, Color.Green, etc.
A special color constant unique to TeeChart is: Color.EMPTY. This is the "default color".

Each TeeChart drawing object has a different default color. For example, the tChart.getFrame() property has a default color of Color.BLACK.

Returns:
Color

shouldSerializeEndCap

protected boolean shouldSerializeEndCap()

getEndCap

public LineCap getEndCap()
Style of line endings.

Returns:
LineCap

setEndCap

public void setEndCap(LineCap value)
Style of line endings.

Parameters:
value - LineCap

getStroke

public java.awt.Stroke getStroke()

invalidate

public void invalidate()
Description copied from class: TeeBase
Use invalidate when the entire canvas needs to be repainted.

Overrides:
invalidate in class TeeBase

getDashCap

public DashCap getDashCap()
Defines segment ending style of dashed lines.
Default value: DashCap.Flat

Returns:
DashCap

setDashCap

public void setDashCap(DashCap value)

getWidth

public int getWidth()
Determines the width of lines the pen draws.
Default value: 1

Returns:
int

setWidth

public void setWidth(int value)
Determines the width of lines the pen draws.
Default value: 1

Parameters:
value - int

shouldSerializeStyle

protected boolean shouldSerializeStyle()

getStyle

public DashStyle getStyle()
Determines the style in which the pen draw lines on the Drawing.

Returns:
DashStyle

setStyle

public void setStyle(DashStyle value)
Determines the style in which the pen draw lines on the Drawing.

Parameters:
value - DashStyle