Packagecom.yworks.canvas.input
Classpublic class ConstrainedHandle
InheritanceConstrainedHandle Inheritance ConstrainedDragHandler Inheritance Object
Implements IHandle

An abstract convenience implementation of the IHandle interface that can be used to constrain the handle of an item.

See also

ConstrainedDragHandler
ConstrainedDragHandler.constrainNewLocation


Public Properties
 PropertyDefined By
  cursor : Cursor
[read-only] Delegates to the delegateHandler's IHandle.cursor property.
ConstrainedHandle
 InheriteddelegateHandler : IDragHandler
[read-only] Gets the delegate handler to which calls will be ultimately delegated.
ConstrainedDragHandler
  type : uint
[read-only] Delegates to the delegateHandler's IHandle.type property.
ConstrainedHandle
 Inheritedx : Number
[read-only] Delegates to the delegateHandler's IDragHandler.x property.
ConstrainedDragHandler
 Inheritedy : Number
[read-only] Delegates to the delegateHandler's IDragHandler.y property.
ConstrainedDragHandler
Public Methods
 MethodDefined By
  
ConstrainedHandle(wrappedHandler:IHandle)
Initializes a new instance of the ConstrainedHandle class that delegates to the wrappedHandler.
ConstrainedHandle
 Inherited
cancelDrag(context:IInputModeContext, originalX:Number, originalY:Number):void
Cancels the move operation and calls onCanceled.
ConstrainedDragHandler
 Inherited
dragFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Handles the finish operation and invokes onFinished.
ConstrainedDragHandler
 Inherited
handleMove(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):Boolean
Handles the move operation and subsequently calls onMoved.
ConstrainedDragHandler
 Inherited
Initializes the drag operation and subsequently calls onInitialized.
ConstrainedDragHandler
Protected Methods
 MethodDefined By
 Inherited
constrainNewLocation(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):IPoint
Callback that needs to implement the constraints for the new location.
ConstrainedDragHandler
 Inherited
onCanceled(context:IInputModeContext, originalX:Number, originalY:Number):void
Called when the cancelDrag method has been called.
ConstrainedDragHandler
 Inherited
onFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Called when the dragFinished method has been called.
ConstrainedDragHandler
 Inherited
onInitialized(context:IInputModeContext, originalX:Number, originalY:Number):void
Called when the initializeDrag method has been called.
ConstrainedDragHandler
 Inherited
onMoved(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Called when the handleMove operation has been performed.
ConstrainedDragHandler
Property Detail
cursorproperty
cursor:Cursor  [read-only]

Delegates to the delegateHandler's IHandle.cursor property.


Implementation
    public function get cursor():Cursor

See also

delegateHandler
IHandle.cursor
typeproperty 
type:uint  [read-only]

Delegates to the delegateHandler's IHandle.type property.


Implementation
    public function get type():uint

See also

delegateHandler
IHandle.type
Constructor Detail
ConstrainedHandle()Constructor
public function ConstrainedHandle(wrappedHandler:IHandle)

Initializes a new instance of the ConstrainedHandle class that delegates to the wrappedHandler.

Parameters
wrappedHandler:IHandle — The handle to delegate to.