Package | com.yworks.graph.input |
Class | public class CompoundMovePortHandle |
Inheritance | CompoundMovePortHandle Object |
Implements | IHandle |
PortRelocationHandle
to reassign an edge to
a different port or to a handle that moves a port.
The active handle delegate is determined by the alternativeHandleRecognizer
property event recognizer function.
Property | Defined By | ||
---|---|---|---|
alternativeHandleRecognizer : Function [read-only]
The event recognizer function that determines which delegate handle will be active. | CompoundMovePortHandle | ||
alternativeHandlerRecognizer : Function [write-only] | CompoundMovePortHandle | ||
cursor : Cursor [read-only]
Provides the cursor to display when the mouse hovers over or drags this
handle. | CompoundMovePortHandle | ||
type : uint [read-only]
Returns the type of the handle that can be used by the rendering engine
to render types differently. | CompoundMovePortHandle | ||
x : Number [read-only]
Returns the x coordinate of the current position of the element. | CompoundMovePortHandle | ||
y : Number [read-only]
Returns the y coordinate of the current position of the element. | CompoundMovePortHandle |
Method | Defined By | ||
---|---|---|---|
CompoundMovePortHandle(edge:IEdge, sourceHandle:Boolean)
Creates a new instance of the compound handle. | CompoundMovePortHandle | ||
cancelDrag(context:IInputModeContext, originalX:Number, originalY:Number):void
Called by clients to indicate that the dragging has been canceled by the user. | CompoundMovePortHandle | ||
dragFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Called by clients to indicate that the repositioning has just been finished. | CompoundMovePortHandle | ||
handleMove(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):Boolean
Called by clients to indicate that the element has been dragged and its position
should be updated. | CompoundMovePortHandle | ||
initializeDrag(context:IInputModeContext):void
Called by clients to indicate that the element is going to be dragged. | CompoundMovePortHandle |
alternativeHandleRecognizer | property |
alternativeHandleRecognizer:Function
[read-only] The event recognizer function that determines which delegate handle will be active.
public function get alternativeHandleRecognizer():Function
alternativeHandlerRecognizer | property |
alternativeHandlerRecognizer:Function
[write-only] public function set alternativeHandlerRecognizer(value:Function):void
cursor | property |
cursor:Cursor
[read-only] Provides the cursor to display when the mouse hovers over or drags this handle.
public function get cursor():Cursor
type | property |
type:uint
[read-only] Returns the type of the handle that can be used by the rendering engine to render types differently.
public function get type():uint
x | property |
x:Number
[read-only] Returns the x coordinate of the current position of the element.
The point describes the current world coordinate position of the element.
It is up to the implementation how this position is interpreted.
The values returned by this method will be used for the "originalX
" parameter
in the handleMove
, cancelDrag
and dragFinished
methods.
public function get x():Number
y | property |
y:Number
[read-only] Returns the y coordinate of the current position of the element.
The point describes the current world coordinate position of the element.
It is up to the implementation how this position is interpreted.
The values returned by this method will be used for the "originalY
" parameter
in the handleMove
, cancelDrag
and dragFinished
methods.
public function get y():Number
CompoundMovePortHandle | () | Constructor |
public function CompoundMovePortHandle(edge:IEdge, sourceHandle:Boolean)
Creates a new instance of the compound handle.
Parametersedge:IEdge — The edge to be changed through the handles
| |
sourceHandle:Boolean — whether to change the source port
|
cancelDrag | () | method |
public function cancelDrag(context:IInputModeContext, originalX:Number, originalY:Number):void
Called by clients to indicate that the dragging has been canceled by the user.
This method may be called after the initial initializeDrag
and zero or
more invocations of handleMove
.
Implementations should reset the position of the items they modify to their initial state.
Alternatively to this method the dragFinished
method might be called.
Parameters
context:IInputModeContext — The context to retrieve information about the drag from.
| |
originalX:Number — The value of the x property at the time of initializeDrag .
| |
originalY:Number — The value of the y property at the time of initializeDrag .
|
dragFinished | () | method |
public function dragFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Called by clients to indicate that the repositioning has just been finished.
This method may be called after the initial initializeDrag
and zero or
more invocations of handleMove
.
Alternatively to this method the cancelDrag
method might be called.
Parameters
context:IInputModeContext — The context to retrieve information about the drag from.
| |
originalX:Number — The value of the x property at the time of initializeDrag .
| |
originalY:Number — The value of the y property at the time of initializeDrag .
| |
newX:Number — The value of the x coordinate in the world coordinate system that the client wants the handle to be at.
Depending on the implementation the x and y properties or may not be modified to reflect the new value.
This is the same value as delivered in the last invocation of handleMove .
| |
newY:Number — The value of the y coordinate in the world coordinate system that the client wants the handle to be at.
Depending on the implementation the x and y properties or may not be modified to reflect the new value.
This is the same value as delivered in the last invocation of handleMove .
|
handleMove | () | method |
public function handleMove(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):Boolean
Called by clients to indicate that the element has been dragged and its position should be updated.
This method may be called more than once after an initial initializeDrag
and will be followed by either dragFinished
or cancelDrag
.
Parameters
context:IInputModeContext — The value of the x property at the time of initializeDrag .
| |
originalX:Number — The value of the y property at the time of initializeDrag .
| |
originalY:Number — The value of the x coordinate in the world coordinate system that the client wants the handle to be at.
Depending on the implementation the x property may or may not be modified to reflect the new value.
| |
newX:Number — The value of the y coordinate in the world coordinate system that the client wants the handle to be at.
Depending on the implementation the y property may or may not be modified to reflect the new value.
| |
newY:Number |
Boolean — Whether the move had any visual effect. This is a hint to the engine to optimize invalidation.
|
initializeDrag | () | method |
public function initializeDrag(context:IInputModeContext):void
Called by clients to indicate that the element is going to be dragged.
This call will be followed by one or more calls to handleMove
,
and a final dragFinished
or cancelDrag
.
Parameters
context:IInputModeContext — The context to retrieve information about the drag from.
|