public class InteractionState
extends java.lang.Object
| Constructor and Description |
|---|
InteractionState(DiagramItem currentItem,
AdjustmentHandle adjustmentHandle,
Action action)
Initializes a new InteractionState instance.
|
| Modifier and Type | Method and Description |
|---|---|
Action |
getAction()
Gets a value indicating what action is currently being performed.
|
AdjustmentHandle |
getAdjustmentHandle()
Gets the adjustment handle being dragged by the user.
|
DiagramItem |
getCurrentItem()
Gets the item being created or modified.
|
Diagram |
getDiagram()
Gets the current
Diagram instance. |
java.awt.geom.Rectangle2D |
getInvalidRect() |
DiagramNode |
getLinkTarget()
Gets the current target node when a link is being modified.
|
java.util.Map<DiagramItem,DiagramItemState> |
getOriginalStates() |
boolean |
getPointerMoved()
Gets a value indicating whether the mouse
pointer has moved since the user pressed down the mouse button
|
boolean |
getSkipSavingState()
Gets a value indicating whether diagram items should skip storing
their state for subsequent cancel.
|
java.awt.geom.Point2D.Float |
getStartPoint()
Gets the coordinates of the point where the modification has started.
|
void |
setLinkTarget(DiagramNode value)
Sets the current target node when a link is being modified
|
void |
setOriginalStates(java.util.Map<DiagramItem,DiagramItemState> value) |
void |
setPointerMoved(boolean value)
Sets a value indicating whether the mouse pointer
has moved since the user pressed down the mouse button
|
public InteractionState(DiagramItem currentItem, AdjustmentHandle adjustmentHandle, Action action)
currentItem - The DiagramItem to be created or modified.adjustmentHandle - The selection handle to be dragged with the mouse, defines what kind of modification to perform.action - A member of the Action enumeration, specifying what kind of action to perform.public DiagramItem getCurrentItem()
public Diagram getDiagram()
Diagram instance.Diagram class.public AdjustmentHandle getAdjustmentHandle()
AdjustmentHandle instance representing the dragged handle.public Action getAction()
Action enumeration.public java.awt.geom.Point2D.Float getStartPoint()
Point2D.Float object specifying
the start point coordinates.public java.awt.geom.Rectangle2D getInvalidRect()
public boolean getPointerMoved()
public void setPointerMoved(boolean value)
value - true if the mouse has moved; otherwise, falsepublic DiagramNode getLinkTarget()
DiagramNode that the currently modified DiagramLink
should connect to if the interaction completes at the current mouse position.public void setLinkTarget(DiagramNode value)
value - A DiagramNode that the currently modified DiagramLink
should connect to if the interaction completes at the current mouse position.public boolean getSkipSavingState()
public void setOriginalStates(java.util.Map<DiagramItem,DiagramItemState> value)
public java.util.Map<DiagramItem,DiagramItemState> getOriginalStates()