public abstract class MovementInfo extends Object
GraphSnapContext
to describe the movement of entities during the
edit process.Modifier | Constructor and Description |
---|---|
protected |
MovementInfo(PointD originalLocation,
MoveTypes moveType,
IModelItem movedItem)
Initializes a new instance of the
MovementInfo class. |
Modifier and Type | Method and Description |
---|---|
abstract IPoint |
getCurrentLocation()
Gets the current location as a live point.
|
MovementInfo |
getHorizontalAnchor()
Gets the horizontal movement info to which this info is anchored horizontally.
|
IModelItem |
getMovedItem()
Gets the item that is being moved.
|
MoveTypes |
getMoveType()
Indicates the type of the movement for this instance.
|
PointD |
getOriginalLocation()
Gets the original location of the element at the time the editing started.
|
MovementInfo |
getVerticalAnchor()
Gets the vertical movement info to which this info is anchored vertically.
|
double |
getX(double dx)
Gets the new x coordinate of the element if the mouse has been moved by
dx during the gesture. |
double |
getY(double dy)
Gets the new y coordinate of the element if the mouse has been moved by
dy during the gesture. |
boolean |
isHorizontallyFixed()
Gets a value indicating whether the x coordinate of the item is fixed during the move operation.
|
boolean |
isVerticallyFixed()
Gets a value indicating whether the y coordinate of the item is fixed during the move operation.
|
boolean |
movesHorizontallySynchronizedWith(MovementInfo info)
Determines whether this instances moves synchronized with the provided info.
|
boolean |
movesVerticallySynchronizedWith(MovementInfo info)
Determines whether this instances moves synchronized with the provided info.
|
void |
setHorizontalAnchor(MovementInfo value)
Sets the horizontal movement info to which this info is anchored horizontally.
|
void |
setMoveType(MoveTypes value)
Indicates the type of the movement for this instance.
|
void |
setVerticalAnchor(MovementInfo value)
Sets the vertical movement info to which this info is anchored vertically.
|
protected MovementInfo(PointD originalLocation, MoveTypes moveType, IModelItem movedItem)
MovementInfo
class.originalLocation
- The original location.moveType
- The type of the move.movedItem
- The item that is being moved.public abstract IPoint getCurrentLocation()
public final MovementInfo getHorizontalAnchor()
This info can be declared to be implicitly anchored to another info. Method movesHorizontallySynchronizedWith(MovementInfo)
will try to match against the anchors to determine if two infos are moving synchronized.
null
.setHorizontalAnchor(MovementInfo)
public final IModelItem getMovedItem()
public final MoveTypes getMoveType()
setMoveType(MoveTypes)
public final PointD getOriginalLocation()
public final MovementInfo getVerticalAnchor()
This info can be declared to be implicitly anchored to another info. Method movesVerticallySynchronizedWith(MovementInfo)
will try to match against the anchors to determine if two infos are moving synchronized.
null
.setVerticalAnchor(MovementInfo)
public final double getX(double dx)
dx
during the gesture.
This takes the MoveType
and OriginalLocation
into account.
dx
- The delta x coordinate.public final double getY(double dy)
dy
during the gesture.
This takes the MoveType
and OriginalLocation
into account.
dy
- The delta y coordinate.public final boolean isHorizontallyFixed()
public final boolean isVerticallyFixed()
public boolean movesHorizontallySynchronizedWith(MovementInfo info)
info
- The info to check.getHorizontalAnchor()
public boolean movesVerticallySynchronizedWith(MovementInfo info)
info
- The info to check.getVerticalAnchor()
public final void setHorizontalAnchor(MovementInfo value)
This info can be declared to be implicitly anchored to another info. Method movesHorizontallySynchronizedWith(MovementInfo)
will try to match against the anchors to determine if two infos are moving synchronized.
value
- The horizontal anchor or null
.getHorizontalAnchor()
public final void setMoveType(MoveTypes value)
value
- The MoveType to set.getMoveType()
public final void setVerticalAnchor(MovementInfo value)
This info can be declared to be implicitly anchored to another info. Method movesVerticallySynchronizedWith(MovementInfo)
will try to match against the anchors to determine if two infos are moving synchronized.
value
- The vertical anchor or null
.getVerticalAnchor()