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. |
android.graphics.RectF |
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 touch
position has changed since the user touched the screen.
|
boolean |
getSkipSavingState()
Gets a value indicating whether diagram items should skip storing
their state for subsequent cancel.
|
android.graphics.PointF |
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 touch position
has changed since the user touched the screen.
|
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 android.graphics.PointF getStartPoint()
PointF
object specifying
the start point coordinates.public android.graphics.RectF getInvalidRect()
public boolean getPointerMoved()
public void setPointerMoved(boolean value)
value
- true if the pointer has moved; otherwise, falsepublic DiagramNode getLinkTarget()
DiagramNode
that the currently modified DiagramLink
should connect to if the interaction completes at the current pointer position.public void setLinkTarget(DiagramNode value)
value
- A DiagramNode
that the currently modified DiagramLink
should connect to if the interaction completes at the current pointer position.public boolean getSkipSavingState()
public void setOriginalStates(java.util.Map<DiagramItem,DiagramItemState> value)
public java.util.Map<DiagramItem,DiagramItemState> getOriginalStates()