Package | com.yworks.graph.input |
Class | public class TableReshapeHandler |
Inheritance | TableReshapeHandler Object |
Implements | IReshapeHandler |
IReshapeHandler
implementation that constrains node resizes so that
minimum size constraints of an associated ITable
are satisfied and
which resizes the outer IStripe
s of such a table when the node is resized.
The constraints are applied in addition to any constraints imposed by the
IReshapeHandler
which is wrapped by this implementation.
Property | Defined By | ||
---|---|---|---|
bounds : IRectangle [read-only]
Returns a view of the bounds of the item. | TableReshapeHandler |
Method | Defined By | ||
---|---|---|---|
Creates a new instance of this Handler which wraps an existing instance of coreHandler
and uses table for additional constraints. | TableReshapeHandler | ||
Called by clients to indicate that the reshaping has been canceled by the user. | TableReshapeHandler | ||
handleReshape(inputModeContext:IInputModeContext, originalBounds:IRectangle, newBounds:IRectangle):Boolean
Called by clients to indicate that the element has been dragged and its position should be updated. | TableReshapeHandler | ||
initializeReshape(inputModeContext:IInputModeContext):void
Called by clients to indicate that the element is going to be reshaped. | TableReshapeHandler | ||
reshapeFinished(inputModeContext:IInputModeContext, originalBounds:IRectangle, newBounds:IRectangle):void
Called by clients to indicate that the reshaping has just been finished. | TableReshapeHandler |
bounds | property |
bounds:IRectangle
[read-only] Returns a view of the bounds of the item. The rectangle describes the current world coordinate of the element that can be modified by this handler.
public function get bounds():IRectangle
TableReshapeHandler | () | Constructor |
public function TableReshapeHandler(coreHandler:IReshapeHandler, tableNode:INode, table:ITable)
Creates a new instance of this Handler which wraps an existing instance of coreHandler
and uses table
for additional constraints. In addition, table
's
outer stripes are resized if necessary.
table
should be associated to tableNode
.
coreHandler:IReshapeHandler — The handler that is wrapped by this instance.
| |
tableNode:INode — The node for which this handler is used.
| |
table:ITable — The table that is used for additional constraints.
|
cancelReshape | () | method |
public function cancelReshape(inputModeContext:IInputModeContext, originalBounds:IRectangle):void
Called by clients to indicate that the reshaping has been canceled by the user.
This method may be called after the initial initializeReshape
and zero or more invocations
of handleReshape
.
Implementations should reset the bounds of the items they modify to their initial state.
Alternatively to this method the reshapeFinished
method might be called.
Parameters
inputModeContext:IInputModeContext — The context to retrieve information about the reshaping from.
| |
originalBounds:IRectangle — The value of the coordinate of the bounds property at the time of
initializeReshape .
|
handleReshape | () | method |
public function handleReshape(inputModeContext:IInputModeContext, originalBounds:IRectangle, newBounds:IRectangle):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 initializeReshape
and will
the final call will be followed by either one reshapeFinished
or one cancelReshape
call.
Parameters
inputModeContext:IInputModeContext — The context to retrieve information about the reshaping from.
| |
originalBounds:IRectangle — The value of the bounds property at the time of initializeReshape .
| |
newBounds:IRectangle — The coordinates of the bounds in the world coordinate system that the client wants the shape to be at.
Depending on the implementation the bounds may or may not be modified to reflect the new value.
|
Boolean — Whether the reshaping had any visual effect. This is a hint to the engine to optimize invalidation.
|
initializeReshape | () | method |
public function initializeReshape(inputModeContext:IInputModeContext):void
Called by clients to indicate that the element is going to be reshaped.
This call will be followed by one or more calls to handleReshape
and a final
reshapeFinished
or cancelReshape
.
Parameters
inputModeContext:IInputModeContext — The context to retrieve information about the drag from.
|
reshapeFinished | () | method |
public function reshapeFinished(inputModeContext:IInputModeContext, originalBounds:IRectangle, newBounds:IRectangle):void
Called by clients to indicate that the reshaping has just been finished.
This method may be called after the initial initializeReshape
and zero or
more invocations of handleReshape
.
Alternatively to this method the cancelReshape
method might be called.
Parameters
inputModeContext:IInputModeContext — The context to retrieve information about the drag from.
| |
originalBounds:IRectangle — The value of the coordinate of the bounds property at the time
of initializeReshape .
| |
newBounds:IRectangle — The coordinates of the bounds in the world coordinate system that the client wants the
shape to be at. Depending on the implementation the bounds may or may not be modified
to reflect the new value.
This is the same value as delivered in the last invocation of handleReshape
|