| Package | com.yworks.canvas.model |
| Class | public class FocusPaintManager |
| Inheritance | FocusPaintManager ModelManager Object |
ModelManager implementation that manages the visual decoration of the focused
element in a canvas.
For the item that should be focused this class uses the ILookup mechanism of
the item to lookup an IFocusPaintableInstaller implementation which will do
the actual installation of the decoration in the canvas.
| Property | Defined By | ||
|---|---|---|---|
![]() | canvas : CanvasComponent [read-only]
Gets the canvas instance this instance is managing. | ModelManager | |
| enabled : Boolean
Whether this FocusPaintManager is enabled. | FocusPaintManager | ||
| focusedItem : IModelItem
The focused item. | FocusPaintManager | ||
| groupProvider : ICanvasGroupProvider
The group provider that will be used in install() to determine the canvas
group where the selection paint should be installed into. | FocusPaintManager | ||
| inputModeContext : IInputModeContext
The IInputModeContext to use for this instance. | FocusPaintManager | ||
| Method | Defined By | ||
|---|---|---|---|
FocusPaintManager(canvas:CanvasComponent)
Creates an instance that for all selected items in the model dynamically installs a
selection paint decoration. | FocusPaintManager | ||
![]() | add(item:Object):IModelItemDescriptor
Adds an item to the canvas. | ModelManager | |
![]() | containsDescriptor(descriptor:IModelItemDescriptor):Boolean
Checks whether this descriptor is currently being managed by this instance. | ModelManager | |
![]() | removeDescriptor(descriptor:IModelItemDescriptor):void
Removes the canvas objects associated with the given descriptor handle. | ModelManager | |
![]() | updateDescriptor(descriptor:IModelItemDescriptor):Boolean
Updates the item in the canvas by uninstalling and reinstalling it
into the canvas. | ModelManager | |
| Method | Defined By | ||
|---|---|---|---|
Callback used by install() to retrieve the focus paintable installer for a given item. | FocusPaintManager | ||
install(member:Object):Array [override]
Installs the focus paintable for the given member. | FocusPaintManager | ||
onDisabled():void
Called when this mode gets disabled. | FocusPaintManager | ||
onEnabled():void
Called when this mode gets enabled. | FocusPaintManager | ||
onPropertyChanged(property:Object, oldValue:Object, newValue:Object):void | FocusPaintManager | ||
![]() | uninstall(descriptor:IModelItemDescriptor, canvasObjects:Array):void
Simple implementation that removes all of the given canvasObjects. | ModelManager | |
| enabled | property |
enabled:Boolean
Whether this FocusPaintManager is enabled.
If the manager is disabled, it will not install the ICanvasObjects into
the associated CanvasComponent.
The default value is true.
public function get enabled():Boolean public function set enabled(value:Boolean):void| focusedItem | property |
focusedItem:IModelItemThe focused item.
When set to a new item, the canvas will be updated and the corresponding property change event will be fired.
Can benull
public function get focusedItem():IModelItem public function set focusedItem(value:IModelItem):void| groupProvider | property |
groupProvider:ICanvasGroupProvider
The group provider that will be used in install() to determine the canvas
group where the selection paint should be installed into.
public function get groupProvider():ICanvasGroupProvider public function set groupProvider(value:ICanvasGroupProvider):void| inputModeContext | property |
inputModeContext:IInputModeContext
The IInputModeContext to use for this instance.
The value returned will be available via the lookup of IInstallerContext
passed to the IModelItemInstaller.install() method.
public function get inputModeContext():IInputModeContext public function set inputModeContext(value:IInputModeContext):void| FocusPaintManager | () | Constructor |
public function FocusPaintManager(canvas:CanvasComponent)Creates an instance that for all selected items in the model dynamically installs a selection paint decoration.
Parameterscanvas:CanvasComponent — The canvas to add the selection marks to.
|
| getFocusPaintableInstaller | () | method |
protected function getFocusPaintableInstaller(item:IModelItem):IFocusPaintableInstaller
Callback used by install() to retrieve the focus paintable installer for a given item.
This implementation uses the lookup of the item.
Parameters
item:IModelItem — The item to find a focus paintable installer for.
|
IFocusPaintableInstaller — A focus paintable installer or null
|
| install | () | method |
override protected function install(member:Object):ArrayInstalls the focus paintable for the given member.
Parameters
member:Object — The member to install the highlight paintable for.
|
Array — The canvas objects used.
|
| onDisabled | () | method |
protected function onDisabled():voidCalled when this mode gets disabled.
| onEnabled | () | method |
protected function onEnabled():voidCalled when this mode gets enabled.
| onPropertyChanged | () | method |
protected function onPropertyChanged(property:Object, oldValue:Object, newValue:Object):voidParameters
property:Object | |
oldValue:Object | |
newValue:Object |