Package | com.yworks.canvas.input |
Class | public class CompositeHandle |
Inheritance | CompositeHandle Object |
IHandle
implementations appear to be synchronized.
This class wraps given IHandle
implementations
and synchronizes method calls to them automatically so that
if clients drag one of the wrapped handles, all handles will be dragged
synchronously.
Property | Defined By | ||
---|---|---|---|
handles : ICollectionModel [read-only]
Returns a live collection of IHandles that wrap the handles
added to this instance by addHandles. | CompositeHandle |
Method | Defined By | ||
---|---|---|---|
Constructs a new instance of this class. | CompositeHandle | ||
addHandles(tag:Object, handleArray:Array):void
Adds the array of handles so that they appear to be synchronized
with all other handles previously being added to this instance. | CompositeHandle | ||
removeHandles(tag:Object):void
Removes the handles from the handles collection that
have been added to this instance previously using addHandles tagged
with the same tag. | CompositeHandle | ||
wrap(position:uint, handle:IHandle, handleFactoryDelegate:Function = null, factoryDelegateContext:Object = null):IHandle
Wraps a given IHandle implementation so that it appears to be
synchronized with all handles that are used for the same position identifier. | CompositeHandle |
handles | property |
handles:ICollectionModel
[read-only]
Returns a live collection of IHandle
s that wrap the handles
added to this instance by addHandles
.
public function get handles():ICollectionModel
CompositeHandle | () | Constructor |
public function CompositeHandle()
Constructs a new instance of this class.
Using addHandles
and removeHandles
methods,
clients can modify the collection of handles wrapped by this instance.
The collection can be obtained usingn the handles
property.
addHandles | () | method |
public function addHandles(tag:Object, handleArray:Array):void
Adds the array of handles so that they appear to be synchronized with all other handles previously being added to this instance.
Parameters
tag:Object — The tag to use for removing the handles later on.
| |
handleArray:Array — The handles to add to this instance.
|
See also
removeHandles | () | method |
public function removeHandles(tag:Object):void
Removes the handles from the handles
collection that
have been added to this instance previously using addHandles
tagged
with the same tag.
Parameters
tag:Object — The tag used during the call to addHandles .
|
See also
wrap | () | method |
public function wrap(position:uint, handle:IHandle, handleFactoryDelegate:Function = null, factoryDelegateContext:Object = null):IHandle
Wraps a given IHandle
implementation so that it appears to be
synchronized with all handles that are used for the same position identifier.
The returned wrapped instances should be added to this instance. If the returned instance will be dragged by the user all other handles that have been wrapped by this instance using the same position identifier will be dragged synchronously.
Parameters
position:uint — One of the RectangleHandlePositions the given handle should be synchronized with.
| |
handle:IHandle — the handle to wrap.
| |
handleFactoryDelegate:Function (default = null ) — The factory method that will be called initially and each time a drag is initialized.
| |
factoryDelegateContext:Object (default = null ) — The context to pass as the parameter of the handleFactoryDelegate .
|
IHandle |
See also