public class CursorTool extends ToolSeries
Title: CursorTool class
Description: Cursor tool.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Modifier and Type | Class and Description |
---|---|
class |
CursorTool.CursorEvent |
static interface |
CursorTool.CursorListener |
static interface |
CursorTool.CursorToolResolver |
class |
CursorTool.NearestPoint |
Tool.ToolListener
iSeries
bBrush, clickTolerance, listenerList, pPen
chart, InternalUse
Constructor and Description |
---|
CursorTool() |
CursorTool(IBaseChart c) |
CursorTool(Series s) |
Modifier and Type | Method and Description |
---|---|
void |
addCursorListener(CursorTool.CursorListener l) |
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) |
protected void |
fireMoved(CursorTool.CursorEvent e) |
java.lang.String |
getDescription()
Gets descriptive text.
|
boolean |
getFollowMouse()
Moves Cursor when moving the mouse.
Default value: false |
ChartPen |
getPen()
Element Pen characteristics.
|
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 |
CursorToolStyle |
getStyle()
Defines which lines of the CursorTool are shown.
Default value: CursorToolStyle.Both |
java.lang.String |
getSummary()
Gets detailed descriptive text.
|
boolean |
getUseChartRect()
The full Chart rectangle is displayed instead of the boundaries defined
by Series axis.
Default value: false |
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) |
CursorTool.NearestPoint |
nearestPoint(CursorToolStyle style)
Returns nearest point to Cursor and smallest distance value.
|
void |
removeAxisRectangleResolver() |
void |
removeCursorListener(CursorTool.CursorListener l) |
void |
setAxisRectangleResolver(CursorTool.CursorToolResolver resolver) |
void |
setFollowMouse(boolean value)
Moves Cursor when moving the mouse.
Default value: false |
void |
setSnap(boolean value)
Sets the TCursorTool to align with the nearest series point.
Default value: false |
void |
setStyle(CursorToolStyle value)
Defines which lines of the CursorTool are shown.
Default value: CursorToolStyle.Both |
void |
setUseChartRect(boolean value)
Sets to full Chart rectangle instead of the boundaries defined by Series
axis.
Default value: false |
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.
|
getHorizAxis, getSeries, getVertAxis, setSeries
addMouseMotionListener, addToolListener, dispose, fireActiveChanged, fireChanged, fireClicked, fireDragged, fireDragging, fireMouse, fireResized, getActive, getBitmapEditor, readResolve, removeMouseMotionListener, removeToolListener, setActive, setChart, toString
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
public CursorTool()
public CursorTool(IBaseChart c)
public CursorTool(Series s)
public void addCursorListener(CursorTool.CursorListener l)
public void removeCursorListener(CursorTool.CursorListener l)
protected void fireMoved(CursorTool.CursorEvent e)
public void setAxisRectangleResolver(CursorTool.CursorToolResolver resolver)
public void removeAxisRectangleResolver()
public boolean getFollowMouse()
public void setFollowMouse(boolean value)
value
- booleanpublic ChartPen getPen()
public CursorToolStyle getStyle()
public void setStyle(CursorToolStyle value)
value
- CursorToolStylepublic double getXValue()
public void setXValue(double value)
value
- doublepublic double getYValue()
public void setYValue(double value)
value
- doubleprotected void calcScreenPositions()
protected void changed(int snapPoint)
public void chartEvent(ChartDrawEvent ce)
chartEvent
in class Tool
public Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
mouseEvent
in class Tool
public CursorClicked clicked(int x, int y)
public CursorClicked clicked(Point p)
public CursorTool.NearestPoint nearestPoint(CursorToolStyle style)
style
- CursorToolStylepublic boolean getSnap()
public void setSnap(boolean value)
value
- booleanpublic int snapToPoint()
public java.lang.String getDescription()
getDescription
in class Tool
public java.lang.String getSummary()
getSummary
in class Tool
public boolean getUseChartRect()
public void setUseChartRect(boolean value)
value
- boolean