|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.controls.ControlAdapter
prefuse.controls.DragControl
public class DragControl
Changes a node's location when dragged on screen. Other effects include fixing a node's position when the mouse if over it, and changing the mouse cursor to a hand when the mouse passes over an item.
| Field Summary | |
|---|---|
protected java.lang.String |
action
|
protected java.awt.geom.Point2D |
down
|
protected boolean |
dragged
|
protected boolean |
repaint
|
protected boolean |
resetItem
|
protected java.awt.geom.Point2D |
temp
|
protected boolean |
wasFixed
|
| Fields inherited from interface prefuse.controls.Control |
|---|
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON |
| Constructor Summary | |
|---|---|
DragControl()
Creates a new drag control that issues repaint requests as an item is dragged. |
|
DragControl(boolean repaint)
Creates a new drag control that optionally issues repaint requests as an item is dragged. |
|
DragControl(boolean repaint,
boolean fixOnMouseOver)
Creates a new drag control that optionally issues repaint requests as an item is dragged. |
|
DragControl(java.lang.String action)
Creates a new drag control that invokes an action upon drag events. |
|
DragControl(java.lang.String action,
boolean fixOnMouseOver)
Creates a new drag control that invokes an action upon drag events. |
|
| Method Summary | |
|---|---|
void |
itemDragged(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a VisualItem and then dragged. |
void |
itemEntered(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when the mouse enters a VisualItem. |
void |
itemExited(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when the mouse exits a VisualItem. |
void |
itemPressed(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a VisualItem. |
void |
itemReleased(VisualItem item,
java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a VisualItem. |
void |
setFixPositionOnMouseOver(boolean s)
Determines whether or not an item should have it's position fixed when the mouse moves over it. |
void |
tableChanged(Table t,
int start,
int end,
int col,
int type)
Notification that a table has changed. |
| Methods inherited from class prefuse.controls.ControlAdapter |
|---|
isEnabled, itemClicked, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String action
protected java.awt.geom.Point2D down
protected java.awt.geom.Point2D temp
protected boolean dragged
protected boolean wasFixed
protected boolean resetItem
protected boolean repaint
| Constructor Detail |
|---|
public DragControl()
public DragControl(boolean repaint)
repaint - indicates whether or not repaint requests are issued
as drag events occur. This can be set to false if other activities
(for example, a continuously running force simulation) are already
issuing repaint events.
public DragControl(boolean repaint,
boolean fixOnMouseOver)
repaint - indicates whether or not repaint requests are issued
as drag events occur. This can be set to false if other activities
(for example, a continuously running force simulation) are already
issuing repaint events.fixOnMouseOver - indicates if object positions should become
fixed (made stationary) when the mouse pointer is over an item.public DragControl(java.lang.String action)
action - the action to run when drag events occur.
public DragControl(java.lang.String action,
boolean fixOnMouseOver)
action - the action to run when drag events occurfixOnMouseOver - indicates if object positions should become
fixed (made stationary) when the mouse pointer is over an item.| Method Detail |
|---|
public void setFixPositionOnMouseOver(boolean s)
s - whether or not item position should become fixed upon
mouse over.
public void itemEntered(VisualItem item,
java.awt.event.MouseEvent e)
Control
itemEntered in interface ControlitemEntered in class ControlAdapterControl.itemEntered(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void itemExited(VisualItem item,
java.awt.event.MouseEvent e)
Control
itemExited in interface ControlitemExited in class ControlAdapterControl.itemExited(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void itemPressed(VisualItem item,
java.awt.event.MouseEvent e)
Control
itemPressed in interface ControlitemPressed in class ControlAdapterControl.itemPressed(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void itemReleased(VisualItem item,
java.awt.event.MouseEvent e)
Control
itemReleased in interface ControlitemReleased in class ControlAdapterControl.itemReleased(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void itemDragged(VisualItem item,
java.awt.event.MouseEvent e)
Control
itemDragged in interface ControlitemDragged in class ControlAdapterControl.itemDragged(prefuse.visual.VisualItem, java.awt.event.MouseEvent)
public void tableChanged(Table t,
int start,
int end,
int col,
int type)
TableListener
tableChanged in interface TableListenert - the table that has changedstart - the starting row index of the changed table regionend - the ending row index of the changed table regioncol - the column that has changed, or
EventConstants.ALL_COLUMNS if the operation affects all
columnstype - the type of modification, one of
EventConstants.INSERT, EventConstants.DELETE, or
EventConstants.UPDATE.TableListener.tableChanged(prefuse.data.Table, int, int, int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||