com.steema.teechart.tools
Class CursorTool

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.tools.Tool
          extended by com.steema.teechart.tools.ToolSeries
              extended by com.steema.teechart.tools.CursorTool

public class CursorTool
extends ToolSeries

Title: CursorTool class

Description: Cursor tool.

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

Company: Steema Software SL


Nested Class Summary
 class CursorTool.CursorEvent
           
static interface CursorTool.CursorToolResolver
           
 
Field Summary
 
Fields inherited from class com.steema.teechart.tools.ToolSeries
iSeries
 
Fields inherited from class com.steema.teechart.tools.Tool
bBrush, clickTolerance, listenerList, pPen
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
CursorTool()
           
CursorTool(IBaseChart c)
           
CursorTool(Series s)
           
 
Method Summary
protected  void calcScreenPositions()
           
protected  void changed(int snapPoint)
           
 void chartEvent(ChartDrawEvent ce)
           
 CursorClicked clicked(int x, int y)
           
 CursorClicked clicked(Point p)
           
protected  Rectangle doGetAxisRect(Rectangle tmpResult)
           
 java.lang.String getDescription()
          Gets descriptive text.
 boolean getFollowMouse()
          Moves Cursor when moving the mouse.
 ChartPen getPen()
          Element Pen characteristics.
 boolean getSnap()
          Aligns the TCursorTool with the nearest series point.
 CursorToolStyle getStyle()
          Defines which lines of the CursorTool are shown.
 java.lang.String getSummary()
          Gets detailed descriptive text.
 boolean getUseChartRect()
          The full Chart rectangle is displayed instead of the boundaries defined by Series axis.
 double getXValue()
          The X Value for vertical component of Cursor Tool.
 double getYValue()
          The Y Value for horizontal component of Cursor Tool.
 Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
           
 com.steema.teechart.tools.CursorTool.NearestPoint nearestPoint(CursorToolStyle style)
          Returns nearest point to Cursor and smallest distance value.
 void removeAxisRectangleResolver()
           
 void setAxisRectangleResolver(CursorTool.CursorToolResolver resolver)
           
 void setFollowMouse(boolean value)
          Moves Cursor when moving the mouse.
 void setSnap(boolean value)
          Sets the TCursorTool to align with the nearest series point.
 void setStyle(CursorToolStyle value)
          Defines which lines of the CursorTool are shown.
 void setUseChartRect(boolean value)
          Sets to full Chart rectangle instead of the boundaries defined by Series axis.
 void setXValue(double value)
          Sets X Value for vertical component of Cursor Tool.
 void setYValue(double value)
          Sets Y Value for horizontal component of Cursor Tool.
 int snapToPoint()
          Moves cursor to nearest Series point and returns point index.
 
Methods inherited from class com.steema.teechart.tools.ToolSeries
getHorizAxis, getSeries, getVertAxis, setSeries
 
Methods inherited from class com.steema.teechart.tools.Tool
dispose, fireChanged, fireClicked, fireDragged, fireDragging, fireMouse, fireResized, getActive, readResolve, setActive, setChart, toString
 
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, wait, wait, wait
 

Constructor Detail

CursorTool

public CursorTool()

CursorTool

public CursorTool(IBaseChart c)

CursorTool

public CursorTool(Series s)
Method Detail

setAxisRectangleResolver

public void setAxisRectangleResolver(CursorTool.CursorToolResolver resolver)

removeAxisRectangleResolver

public void removeAxisRectangleResolver()

doGetAxisRect

protected Rectangle doGetAxisRect(Rectangle tmpResult)

getFollowMouse

public boolean getFollowMouse()
Moves Cursor when moving the mouse.
Default value: false

Returns:
boolean

setFollowMouse

public void setFollowMouse(boolean value)
Moves Cursor when moving the mouse.
Default value: false

Parameters:
value - boolean

getPen

public ChartPen getPen()
Element Pen characteristics.

Returns:
ChartPen

getStyle

public CursorToolStyle getStyle()
Defines which lines of the CursorTool are shown.
Default value: CursorToolStyle.Both

Returns:
CursorToolStyle

setStyle

public void setStyle(CursorToolStyle value)
Defines which lines of the CursorTool are shown.
Default value: CursorToolStyle.Both

Parameters:
value - CursorToolStyle

getXValue

public double getXValue()
The X Value for vertical component of Cursor Tool.

Returns:
double

setXValue

public void setXValue(double value)
Sets X Value for vertical component of Cursor Tool.

Parameters:
value - double

getYValue

public double getYValue()
The Y Value for horizontal component of Cursor Tool.

Returns:
double

setYValue

public void setYValue(double value)
Sets Y Value for horizontal component of Cursor Tool.

Parameters:
value - double

calcScreenPositions

protected void calcScreenPositions()

changed

protected void changed(int snapPoint)

chartEvent

public void chartEvent(ChartDrawEvent ce)
Overrides:
chartEvent in class Tool

mouseEvent

public Cursor mouseEvent(FrameworkMouseEvent e,
                         Cursor c)
Overrides:
mouseEvent in class Tool

clicked

public CursorClicked clicked(int x,
                             int y)

clicked

public CursorClicked clicked(Point p)

nearestPoint

public com.steema.teechart.tools.CursorTool.NearestPoint nearestPoint(CursorToolStyle style)
Returns nearest point to Cursor and smallest distance value.

Parameters:
style - CursorToolStyle
Returns:
NearestPoint

getSnap

public boolean getSnap()
Aligns the TCursorTool with the nearest series point.
Snap has no effect unless a series is assigned to the Series method.
Default value: false

Returns:
boolean

setSnap

public void setSnap(boolean value)
Sets the TCursorTool to align with the nearest series point.
Default value: false

Parameters:
value - boolean

snapToPoint

public int snapToPoint()
Moves cursor to nearest Series point and returns point index.

Returns:
int

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Overrides:
getDescription in class Tool
Returns:
String

getSummary

public java.lang.String getSummary()
Gets detailed descriptive text.

Overrides:
getSummary in class Tool
Returns:
String

getUseChartRect

public boolean getUseChartRect()
The full Chart rectangle is displayed instead of the boundaries defined by Series axis.
Default value: false

Returns:
boolean

setUseChartRect

public void setUseChartRect(boolean value)
Sets to full Chart rectangle instead of the boundaries defined by Series axis.
Default value: false

Parameters:
value - boolean