com.steema.teechart.styles
Class SeriesPointer

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.SeriesPointer
Direct Known Subclasses:
Callout, GaugeSeriesPointer

public class SeriesPointer
extends TeeBase

Title: SeriesPointer class

Description: Some Series have a Pointer method which returns a SeriesPointer class. Pointers are shape figures drawn on each Y point coordinate.

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

Company: Steema Software SL


Field Summary
protected  boolean allowChangeSize
           
protected  boolean bVisible
           
protected  boolean defaultVisible
           
protected  boolean draw3D
           
protected  int xMinus
           
protected  int xPlus
           
protected  int yMinus
           
protected  int yPlus
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
SeriesPointer(IBaseChart c, ISeries s)
           
 
Method Summary
 void assign(SeriesPointer source)
           
protected  void calcHorizMargins(Margins margins)
           
protected  void calcVerticalMargins(Margins margins)
           
 void draw(IGraphics3D g, boolean is3D, int px, int py, int tmpHoriz, int tmpVert, Color colorValue, PointerStyle aStyle)
          Internal use.
 void draw(int px, int py, Color colorValue)
           
 void draw(int px, int py, Color colorValue, PointerStyle aStyle)
           
 void draw(Point p, Color colorValue)
           
 void draw(Point p, Color colorValue, PointerStyle style)
           
protected  void drawLegendShape(Color color, Rectangle rect, boolean drawPen)
           
protected  void drawLegendShape(IGraphics3D g, Color color, Rectangle rect, boolean drawPen)
           
 ChartBrush getBrush()
          Brush used to fill Series Pointers.
 Color getColor()
          The pointer color.
 boolean getDark3D()
          Fills pointer sides in 3D mode with darker color.
 boolean getDraw3D()
          Draws pointer in 3D mode.
 int getEndZ()
          For internal use.
 Gradient getGradient()
          Configures Gradient filling attributes.
 int getHorizSize()
          Horizontal size of pointer in pixels.
 boolean getInflateMargins()
          Expands axes to fit pointers.
 int getMiddleZ()
          For internal use.
 ChartPen getPen()
          Pen used to draw a frame around Series Pointers.
 ISeries getSeries()
           
 int getStartZ()
          For internal use.
 PointerStyle getStyle()
          The Pointer style.
 int getTransparency()
          The Percent of semiglass effect.
 int getVertSize()
          The Horizontal size of pointer in pixels.
 boolean getVisible()
          Shows or hides the pointer.
protected  void prepareCanvas(IGraphics3D g, Color colorValue)
           
protected  java.lang.Object readResolve()
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setColor(Color value)
          Sets the pointer color.
 void setDark3D(boolean value)
          Fills pointer sides in 3D mode with darker color.
 void setDraw3D(boolean value)
          Draws pointer in 3D mode.
 void setHorizSize(int value)
          Horizontal size of pointer in pixels.
 void setInflateMargins(boolean value)
          Expands axes to fit pointers.
 void setStyle(PointerStyle value)
          Sets the Pointer style.
 void setTransparency(int value)
          Sets Percent of semiglass effect.
 void setVertSize(int value)
          Sets Horizontal size of pointer in pixels.
 void setVisible(boolean value)
          Shows or hides the pointer.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bVisible

protected boolean bVisible

defaultVisible

protected transient boolean defaultVisible

allowChangeSize

protected boolean allowChangeSize

draw3D

protected boolean draw3D

xMinus

protected transient int xMinus

xPlus

protected transient int xPlus

yMinus

protected transient int yMinus

yPlus

protected transient int yPlus
Constructor Detail

SeriesPointer

public SeriesPointer(IBaseChart c,
                     ISeries s)
Method Detail

assign

public void assign(SeriesPointer source)

readResolve

protected java.lang.Object readResolve()

getDark3D

public boolean getDark3D()
Fills pointer sides in 3D mode with darker color.
Default value: true

Returns:
boolean

setDark3D

public void setDark3D(boolean value)
Fills pointer sides in 3D mode with darker color.
Default value: true

Parameters:
value - boolean

getDraw3D

public boolean getDraw3D()
Draws pointer in 3D mode.
Currently only rectangle points have 3D capability.
Default value: true

Returns:
boolean

setDraw3D

public void setDraw3D(boolean value)
Draws pointer in 3D mode.
Default value: true

Parameters:
value - boolean

getVisible

public boolean getVisible()
Shows or hides the pointer.
When using a Points series (or any Series class derived from Points series), setting Visible to false will not display anything.
Pointers can be useful with Line series or Area series.
When points are Visible, extra margins are applied to the four chart axes (Left, Right, Top and Bottom). This is to make points just at axis limits to be shown.
You can deactivate these extra margins by setting IPointer.InflateMargins to false.

Points are filled using IPointer.Brush.

Returns:
boolean

setVisible

public void setVisible(boolean value)
Shows or hides the pointer.

Parameters:
value - boolean

getHorizSize

public int getHorizSize()
Horizontal size of pointer in pixels.
Series that derive from Points series usually override the HorizSize and VertSize methods.
For example, Bubble series uses the Radius method to determine the correct HorizSize and VertSize, so these methods have no effect in that Series.
Default value: 4

Returns:
int

setHorizSize

public void setHorizSize(int value)
Horizontal size of pointer in pixels.
Default value: 4

Parameters:
value - int

getInflateMargins

public boolean getInflateMargins()
Expands axes to fit pointers.
When false, Chart Axis scales will be preserved and points close to the Axis limits will be partially displayed.
Default value: true

Returns:
boolean

setInflateMargins

public void setInflateMargins(boolean value)
Expands axes to fit pointers.
Default value: true

Parameters:
value - boolean

getStyle

public PointerStyle getStyle()
The Pointer style.
It defines the shape used to display the Series Points.
The default Rectangle style can be optionally in 3D mode by setting Pointer.Draw3D to true.
Series Pointer.Visible should be true.
Default value: rectangle

Returns:
PointerStyle

setStyle

public void setStyle(PointerStyle value)
Sets the Pointer style.
Default value: rectangle

Parameters:
value - PointerStyle

getSeries

public ISeries getSeries()

getVertSize

public int getVertSize()
The Horizontal size of pointer in pixels.
Series that derive from PointSeries usually override the HorizontalSize and VerticalSize methods.
For example, Bubble series uses the Radius property to determine the correct HorizSize and VertSize, so these methods have no effect in that Series.
Default value: 4

Returns:
int

setVertSize

public void setVertSize(int value)
Sets Horizontal size of pointer in pixels.
Default value: 4

Parameters:
value - int

getTransparency

public int getTransparency()
The Percent of semiglass effect.
Default valuie: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Sets Percent of semiglass effect.
Default valuie: 0

Example:


 bubbleSeries.getPointer().setTransparency(50); // -- 50 %
 

Parameters:
value - int

getGradient

public Gradient getGradient()
Configures Gradient filling attributes.
Default value: null

Example:


   bubbleSeries.getPointer().getGradient().setVisible(true);
 

Returns:
Gradient

getStartZ

public int getStartZ()
For internal use.

Returns:
int

getMiddleZ

public int getMiddleZ()
For internal use.

Returns:
int

getEndZ

public int getEndZ()
For internal use.

Returns:
int

getColor

public Color getColor()
The pointer color.

Returns:
Color

setColor

public void setColor(Color value)
Sets the pointer color.

Parameters:
value - Color

setChart

public void setChart(IBaseChart c)
Description copied from class: TeeBase
Chart associated with this object.

Overrides:
setChart in class TeeBase
Parameters:
c - IBaseChart

draw

public void draw(IGraphics3D g,
                 boolean is3D,
                 int px,
                 int py,
                 int tmpHoriz,
                 int tmpVert,
                 Color colorValue,
                 PointerStyle aStyle)
Internal use. Draw Pointer

Parameters:
g - IGraphics3D
is3D - boolean
px - int
py - int
tmpHoriz - int
tmpVert - int
colorValue - Color
aStyle - PointerStyle

draw

public void draw(Point p,
                 Color colorValue)

draw

public void draw(Point p,
                 Color colorValue,
                 PointerStyle style)

draw

public void draw(int px,
                 int py,
                 Color colorValue)

draw

public void draw(int px,
                 int py,
                 Color colorValue,
                 PointerStyle aStyle)

prepareCanvas

protected void prepareCanvas(IGraphics3D g,
                             Color colorValue)

getPen

public ChartPen getPen()
Pen used to draw a frame around Series Pointers.

Returns:
ChartPen

getBrush

public ChartBrush getBrush()
Brush used to fill Series Pointers.

Returns:
ChartBrush

drawLegendShape

protected void drawLegendShape(Color color,
                               Rectangle rect,
                               boolean drawPen)

drawLegendShape

protected void drawLegendShape(IGraphics3D g,
                               Color color,
                               Rectangle rect,
                               boolean drawPen)

calcHorizMargins

protected void calcHorizMargins(Margins margins)

calcVerticalMargins

protected void calcVerticalMargins(Margins margins)