|
|||||||||
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
com.quinncurtis.chart3djava.MoveData
public class MoveData
The MoveData class extends the DataCursor class, providing additional methods that allow the user to move individual points in data based objects using the mouse.
Field Summary |
---|
Constructor Summary | |
---|---|
MoveData()
The default MoveData constructor. |
|
MoveData(ChartView component,
PhysicalCoordinates transform)
This constructor creates a new MoveData object using the specified component and scale. |
|
MoveData(ChartView component,
PhysicalCoordinates transform,
int buttonmask)
This constructor creates a new MoveData object using the specified component and scale. |
Method Summary | |
---|---|
void |
addMouseMoveDataListener()
This method installs the MoveData object by adding it to the mouse listener list of the ChartView component. |
void |
copy(MoveData source)
Copies the source MoveData. |
int |
errorCheck(int nerror)
Checks the MoveData object for common errors. |
ChartPlot |
findObj(ChartPoint3D testpoint)
This method finds the moveable plot object nearest the test point. |
ChartPlot |
findObj2(ChartPoint3D testpoint)
This method finds the moveable plot object nearest the test point. |
boolean |
getDataMoveEnable()
This method returns True if this object is enabled. |
double |
getHitTestThreshold()
Returns the threshold distance used to determine if the test point is close enough to at data point to be considered a hit. |
int |
getMoveMode()
Returns the move mode that is associated with moving points. |
boolean |
getXYDatasetSwap()
Returns the dataset xy swap mode. |
boolean |
isMoveableGroupPlotObj(GraphObj chartobj)
This method checks and returns true if a group plot object has moveable group data. |
boolean |
isMoveablePolarPlotObj(GraphObj chartobj)
This method checks and returns true if a polar plot object has moveable data. |
boolean |
isMoveableSimplePlotObj(GraphObj chartobj)
This method checks and returns true if an simple plot object has moveable data. |
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 |
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 |
removeMouseMoveDataListener()
This method disables the data cursor object by removing it to/from the mouse listener list of the ChartView component. |
void |
setDataMoveEnable(boolean enable)
Once the MoveData object is created and installed using the addMouseMoveDataListener() method, it can be turned on/off using this method. |
void |
setHitTestThreshold(double nearvalue)
A data point must be within a threshold distance of the test point, in DEV_POS coordinates in order for it to be considered a hit. |
void |
setMoveMode(int movemode)
Sets the move mode that is associated with moving points. |
void |
setXYDatasetSwap(boolean dataswap)
Sets the dataset xy swap mode. |
Methods inherited from class com.quinncurtis.chart3djava.DataCursor |
---|
addDataCursorListener, clone, copy, draw, getButtonMask, getDataCursorEnable, initDataCursor, mouseEntered, mouseExited, mouseMoved, removeDataCursorListener, setButtonMask, setDataCursorEnable |
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 MoveData()
public MoveData(ChartView component, PhysicalCoordinates transform)
component
- A reference to the ChartView object that the chart is placed in.transform
- The PhysicalCoordinates object associated with the MoveData object.public MoveData(ChartView component, PhysicalCoordinates transform, int buttonmask)
component
- A reference to the ChartView object that the chart is placed in.transform
- The PhysicalCoordinates object associated with the MoveData object.buttonmask
- Specifies the mouse button that is trapped to invoke a move.Method Detail |
---|
public int errorCheck(int nerror)
errorCheck
in class DataCursor
nerror
- Current error state.
public void copy(MoveData source)
source
- The source MoveData object.public void setDataMoveEnable(boolean enable)
enable
- True turns the mouse listener on.public boolean getDataMoveEnable()
public void addMouseMoveDataListener()
public void removeMouseMoveDataListener()
public boolean isMoveableSimplePlotObj(GraphObj chartobj)
chartobj
- A chart object.
public boolean isMoveableGroupPlotObj(GraphObj chartobj)
chartobj
- A chart object.
public boolean isMoveablePolarPlotObj(GraphObj chartobj)
chartobj
- A chart object.
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class DataCursor
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
mouseClicked
in class DataCursor
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
mouseDragged
in class DataCursor
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
mouseReleased
in class DataCursor
event
- The mouse event contains status information about the mouse.public ChartPlot findObj(ChartPoint3D testpoint)
testpoint
- The current position of the mouse in Java user coordinates.
public ChartPlot findObj2(ChartPoint3D testpoint)
testpoint
- The current position of the mouse in Java user coordinates.
public void setMoveMode(int movemode)
movemode
- The move mode that is to be associated with moving objects.
Use one of the move mode constants: MOVE_X, MOVE_Y or MOVE_XY.public int getMoveMode()
setMoveMode(int)
public void setHitTestThreshold(double nearvalue)
nearvalue
- A data point must be within this threshold distance of the test point, in DEV_POS coordinates
in order for it to be considered a hit.public double getHitTestThreshold()
setHitTestThreshold(double)
public boolean getXYDatasetSwap()
public void setXYDatasetSwap(boolean dataswap)
dataswap
- Set to true if source data values have been swapped.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |