Package | com.yworks.canvas.input |
Class | public class ReshapeHandlerHandle |
Inheritance | ReshapeHandlerHandle Object |
Implements | IHandle, IPoint |
IHandle
implementation that delegates to a IReshapeHandler
.
This class works on an IReshapeHandler
.
See also
Property | Defined By | ||
---|---|---|---|
cursor : Cursor
Gets or sets the cursor to display when the mouse hovers over or drags this handle. | ReshapeHandlerHandle | ||
location : IPoint [read-only]
Returns a view of the center of the handle. | ReshapeHandlerHandle | ||
maximumSize : ISize
Gets or sets the maximum size allowed for the reshapeable. | ReshapeHandlerHandle | ||
minimumEnclosedArea : IRectangle
Gets or sets the maximum size allowed for the reshapeable. | ReshapeHandlerHandle | ||
minimumSize : ISize
Gets or sets the minimum size allowed for the reshapeable. | ReshapeHandlerHandle | ||
type : uint
Gets or sets the type of the handle that can be used by the rendering engine to render types differently. | ReshapeHandlerHandle | ||
x : Number [read-only]
Gets the current x coordinate of this point. | ReshapeHandlerHandle | ||
y : Number [read-only]
Gets the current y coordinate of this point. | ReshapeHandlerHandle |
Property | Defined By | ||
---|---|---|---|
reshapeHandler : IReshapeHandler [read-only]
The reshapeable instance to write the changes to. | ReshapeHandlerHandle |
Method | Defined By | ||
---|---|---|---|
ReshapeHandlerHandle(position:uint, reshapeHandler:IReshapeHandler, minimumSize:ISize = null, maximumSize:ISize = null)
Subclass constructor that creates a handle for the given position using the location instance
as the location for the handle. | ReshapeHandlerHandle | ||
cancelDrag(context:IInputModeContext, originalX:Number, originalY:Number):void
Delegates the cancel request to the IReshapeHandler. | ReshapeHandlerHandle | ||
dragFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Delegates the finish request to the IReshapeHandler. | ReshapeHandlerHandle | ||
handleMove(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):Boolean
Delegates the move request to the IReshapeHandler.handleReshape method. | ReshapeHandlerHandle | ||
initializeDrag(context:IInputModeContext):void
This implementation does nothing. | ReshapeHandlerHandle |
cursor | property |
cursor:Cursor
Gets or sets the cursor to display when the mouse hovers over or drags this handle.
public function get cursor():Cursor
public function set cursor(value:Cursor):void
location | property |
location:IPoint
[read-only] Returns a view of the center of the handle. The point describes the current world coordinate of the element that can be modified by this handle.
public function get location():IPoint
maximumSize | property |
maximumSize:ISize
Gets or sets the maximum size allowed for the reshapeable. The value is stored by reference.
The default value is ImmutableSize#UNBOUND
.
public function get maximumSize():ISize
public function set maximumSize(value:ISize):void
minimumEnclosedArea | property |
minimumEnclosedArea:IRectangle
Gets or sets the maximum size allowed for the reshapeable. The value is stored by reference.
The default value is ImmutableSize.UNBOUND
.
public function get minimumEnclosedArea():IRectangle
public function set minimumEnclosedArea(value:IRectangle):void
minimumSize | property |
minimumSize:ISize
Gets or sets the minimum size allowed for the reshapeable. The value is stored by reference.
The default value is ImmutableSize#EMPTY
.
public function get minimumSize():ISize
public function set minimumSize(value:ISize):void
reshapeHandler | property |
reshapeHandler:IReshapeHandler
[read-only] The reshapeable instance to write the changes to.
protected function get reshapeHandler():IReshapeHandler
type | property |
type:uint
Gets or sets the type of the handle that can be used by the rendering engine to render types differently.
public function get type():uint
public function set type(value:uint):void
x | property |
x:Number
[read-only] Gets the current x coordinate of this point.
Depending on context the values returned may change over time.
public function get x():Number
y | property |
y:Number
[read-only] Gets the current y coordinate of this point.
Depending on context the values returned may change over time.
public function get y():Number
ReshapeHandlerHandle | () | Constructor |
public function ReshapeHandlerHandle(position:uint, reshapeHandler:IReshapeHandler, minimumSize:ISize = null, maximumSize:ISize = null)
Subclass constructor that creates a handle for the given position using the location instance as the location for the handle. The instance modifies the instances using the reshapeable interface and reads the current state using the rect. The handle will automatically trim changes of the rectangle to the specified minimum and maximum size.
Parametersposition:uint — The position of the handle.
| |
reshapeHandler:IReshapeHandler — The reshapeable to write the changes to.
| |
minimumSize:ISize (default = null ) — The minimum size allowed for the rectangle.
| |
maximumSize:ISize (default = null ) — The maximum size allowed for the rectangle.
|
cancelDrag | () | method |
public function cancelDrag(context:IInputModeContext, originalX:Number, originalY:Number):void
Delegates the cancel request to the IReshapeHandler
.
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 .
|
See also
dragFinished | () | method |
public function dragFinished(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):void
Delegates the finish request to the IReshapeHandler
.
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 .
|
See also
handleMove | () | method |
public function handleMove(context:IInputModeContext, originalX:Number, originalY:Number, newX:Number, newY:Number):Boolean
Delegates the move request to the IReshapeHandler.handleReshape
method.
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.
|
See also
initializeDrag | () | method |
public function initializeDrag(context:IInputModeContext):void
This implementation does nothing.
Parameters
context:IInputModeContext |