| Overview | Package | Class | Tree | Index | Help | NetCharts Pro (Applets) 7.0 | ||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--netcharts.graphics.NFDraggable
| Constructor Summary | |
| NFDraggable()
Constructor for NFDraggable class | |
| Method Summary | |
| boolean | abortPreDrag(double[] curCoords,
double[] newCoords)
Check with the observers to see if we can drag. |
| void | addObserver(java.lang.Object observer)
This method can be called to add an NFDragObserver to the dragging process. |
| boolean | dragTo(double[] coords)
This method is called after the observers have approved the new drag location provided in the coords[] array. |
| double[] | getCoords()
This method should return the current coordinates for the object being dragged. |
| boolean | isDraggable(java.awt.Event evt,
int x,
int y)
This method should return true if the given coordinate is inside of something that can be dragged. |
| boolean | mouseDown(java.awt.Event evt,
int x,
int y)
This method handles all mouseDown events for dragging purposes. |
| boolean | mouseDrag(java.awt.Event evt,
int x,
int y)
This method handles all mouseDrag events for dragging purposes. |
| boolean | mouseUp(java.awt.Event evt,
int x,
int y)
This method handles all mouseUp events for dragging purposes. |
| double[] | moveRelative(java.awt.Event evt,
int dx,
int dy)
This method is called when the draggable item needs to be moved by the given amount. |
| void | notifyPostDrag()
Notify the observers of the drag. |
| void | removeObserver(java.lang.Object observer)
This method is used to remove an NFDragObserver from the dragging process. |
| Constructor Detail |
public NFDraggable()
| Method Detail |
public abstract boolean isDraggable(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.public abstract double[] getCoords()
The curCoord[] array can be used for the return value.
public abstract double[] moveRelative(java.awt.Event evt,
int dx,
int dy)
The newCoord[] array can be used for the return value.
evt
- The Event.
dx
- The change in the X coordinate.
dy
- The change in the Y coordinate.public abstract boolean dragTo(double[] coords)
If true is returned, the new mouse location is recorded, otherwise the drag operation is completely ignored.
coords
- The coordinates to drag to.public void addObserver(java.lang.Object observer)
observer
- The Observer to add.public void removeObserver(java.lang.Object observer)
observer
- The Observer to remove.
public boolean mouseDown(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.
public boolean mouseDrag(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.
public boolean mouseUp(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.
public boolean abortPreDrag(double[] curCoords,
double[] newCoords)
curCoords
- The current coordinates.
newCoords
- The new coordinates.public void notifyPostDrag()
| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2010 |
Last Modified: Jun 29, 2010 |