public class DragControl extends ControlAdapter implements TableListener
| Modifier and Type | Field and Description |
|---|---|
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 |
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
isEnabled, itemClicked, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabledprotected 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
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.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)
ControlitemEntered in interface ControlitemEntered in class ControlAdapterControl.itemEntered(prefuse.visual.VisualItem, java.awt.event.MouseEvent)public void itemExited(VisualItem item, java.awt.event.MouseEvent e)
ControlitemExited in interface ControlitemExited in class ControlAdapterControl.itemExited(prefuse.visual.VisualItem, java.awt.event.MouseEvent)public void itemPressed(VisualItem item, java.awt.event.MouseEvent e)
ControlitemPressed in interface ControlitemPressed in class ControlAdapterControl.itemPressed(prefuse.visual.VisualItem, java.awt.event.MouseEvent)public void itemReleased(VisualItem item, java.awt.event.MouseEvent e)
ControlitemReleased in interface ControlitemReleased in class ControlAdapterControl.itemReleased(prefuse.visual.VisualItem, java.awt.event.MouseEvent)public void itemDragged(VisualItem item, java.awt.event.MouseEvent e)
ControlitemDragged 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)
TableListenertableChanged 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)