|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.Marker
com.quinncurtis.chart3djava.DataCursor
public class DataCursor
This class extends the Marker class, extending the MouseListener class providing additional methods that allow markers to be moved around on a graph using the mouse.
Field Summary |
---|
Constructor Summary | |
---|---|
DataCursor()
The default DataCursor constructor. |
|
DataCursor(ChartView component,
PhysicalCoordinates transform,
double zpos,
int nmarkertype,
double rsize)
This constructor creates a new DataCursor object using the specified component, scale, type and size parameters. |
|
DataCursor(ChartView component,
PhysicalCoordinates transform,
int nmarkertype,
double rsize)
This constructor creates a new DataCursor object using the specified component, scale, type and size parameters. |
Method Summary | |
---|---|
void |
addDataCursorListener()
This method enables the data cursor object by adding it to the mouse listener list of the ChartView component. |
java.lang.Object |
clone()
Returns an object that is a clone of this DataCursor object. |
void |
copy(DataCursor source)
Copies the source data cursor object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the current data cursor object for common errors. |
int |
getButtonMask()
Returns the mouse button that is associated with data cursor movements. |
boolean |
getDataCursorEnable()
This returns True if the data cursor is enabled. |
void |
initDataCursor(ChartView component,
PhysicalCoordinates transform,
double zpos,
int nmarkertype,
double rsize)
Initializes the attributes of an DataCursor object. |
void |
mouseClicked(java.awt.event.MouseEvent event)
Dummy event listener for this object. |
void |
mouseDragged(java.awt.event.MouseEvent event)
The mouseDragged event listener for this object. |
void |
mouseEntered(java.awt.event.MouseEvent event)
Dummy event listener for this object. |
void |
mouseExited(java.awt.event.MouseEvent event)
Dummy event listener for this object. |
void |
mouseMoved(java.awt.event.MouseEvent event)
Dummy event listener for this object. |
void |
mousePressed(java.awt.event.MouseEvent event)
The mousePressed event listener for this object. |
void |
mouseReleased(java.awt.event.MouseEvent event)
The mouseReleased event listener for this object. |
void |
removeDataCursorListener()
This method disables the data cursor object by removing it from the mouse listener list of the ChartView component. |
void |
setButtonMask(int buttonmask)
Sets the mouse button that is associated with data cursor movements. |
void |
setDataCursorEnable(boolean enable)
This method enables the data cursor object. |
Methods inherited from class com.quinncurtis.chart3djava.Marker |
---|
checkIntersection, copy, getMarkerSize, getMarkerType, setMarkerSize, setMarkerType |
Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataCursor()
public DataCursor(ChartView component, PhysicalCoordinates transform, int nmarkertype, double rsize)
component
- A reference to the ChartView object that the chart is placed in.transform
- The PhysicalCoordinates object associated with the data cursor.nmarkertype
- The marker type. Use one of the DChartMarker marker type constants:
MARKER_VLINE .. MARKER_HVLINE.rsize
- The size in Java user coordinates of the MARKER_BOX and MARKER_CROSS style cursors.public DataCursor(ChartView component, PhysicalCoordinates transform, double zpos, int nmarkertype, double rsize)
component
- A reference to the ChartView object that the chart is placed in.transform
- The PhysicalCoordinates object associated with the data cursor.zpos
- The z-position of the data cursor.nmarkertype
- The marker type. Use one of the DChartMarker marker type constants:
MARKER_VLINE .. MARKER_HVLINE.rsize
- The size in Java user coordinates of the MARKER_BOX and MARKER_CROSS style cursors.Method Detail |
---|
public int errorCheck(int nerror)
errorCheck
in class Marker
nerror
- Current error state.
public void copy(DataCursor source)
source
- The source data cursor object.public java.lang.Object clone()
clone
in class Marker
public void initDataCursor(ChartView component, PhysicalCoordinates transform, double zpos, int nmarkertype, double rsize)
component
- A reference to the ChartView object that the chart is placed in.transform
- The PhysicalCoordinates object associated with the data cursor.zpos
- The z-position of the data cursor.nmarkertype
- The marker type. Use one of the DChartMarker marker type constants:
MARKER_VLINE .. MARKER_HVLINE.rsize
- The size in Java user coordinates of the MARKER_BOX and MARKER_CROSS style cursors.public void addDataCursorListener()
public void removeDataCursorListener()
public void setDataCursorEnable(boolean enable)
enable
- True enables the dta cursor object.public boolean getDataCursorEnable()
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
event
- The mouse event contains status information about the mouse.public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
event
- The mouse event contains status information about the mouse.public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
event
- The mouse event contains status information about the mouse.public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
event
- The mouse event contains status information about the mouse.public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
event
- The mouse event contains status information about the mouse.public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
event
- The mouse event contains status information about the mouse.public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
event
- The mouse event contains status information about the mouse.public void setButtonMask(int buttonmask)
buttonmask
- The mouse button that is to be associated with data cursor movements.
Use one of the MouseEvent button constants: MouseEvent.BUTTON1_MASK,
MouseEvent.BUTTON2_MASK, MouseEvent.BUTTON3_MASK.public int getButtonMask()
public void draw(java.awt.Graphics2D g2)
draw
in class Marker
g2
- The graphics context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |