Packagecom.yworks.canvas.model
Classpublic class FocusPaintManager
InheritanceFocusPaintManager Inheritance ModelManager Inheritance Object

A 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.



Public Properties
 PropertyDefined By
 Inheritedcanvas : 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
Protected Properties
 PropertyDefined By
 Inherited_canvas : CanvasComponent
The canvas instance this instance is managing.
ModelManager
Public Methods
 MethodDefined By
  
Creates an instance that for all selected items in the model dynamically installs a selection paint decoration.
FocusPaintManager
 Inherited
Adds an item to the canvas.
ModelManager
 Inherited
Checks whether this descriptor is currently being managed by this instance.
ModelManager
 Inherited
Removes the canvas objects associated with the given descriptor handle.
ModelManager
 Inherited
Updates the item in the canvas by uninstalling and reinstalling it into the canvas.
ModelManager
Protected Methods
 MethodDefined 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
 Inherited
uninstall(descriptor:IModelItemDescriptor, canvasObjects:Array):void
Simple implementation that removes all of the given canvasObjects.
ModelManager
Property Detail
enabledproperty
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.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
focusedItemproperty 
focusedItem:IModelItem

The focused item.

When set to a new item, the canvas will be updated and the corresponding property change event will be fired.

Can be null


Implementation
    public function get focusedItem():IModelItem
    public function set focusedItem(value:IModelItem):void
groupProviderproperty 
groupProvider:ICanvasGroupProvider

The group provider that will be used in install() to determine the canvas group where the selection paint should be installed into.


Implementation
    public function get groupProvider():ICanvasGroupProvider
    public function set groupProvider(value:ICanvasGroupProvider):void
inputModeContextproperty 
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.


Implementation
    public function get inputModeContext():IInputModeContext
    public function set inputModeContext(value:IInputModeContext):void
Constructor Detail
FocusPaintManager()Constructor
public function FocusPaintManager(canvas:CanvasComponent)

Creates an instance that for all selected items in the model dynamically installs a selection paint decoration.

Parameters
canvas:CanvasComponent — The canvas to add the selection marks to.
Method Detail
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.

Returns
IFocusPaintableInstaller — A focus paintable installer or null
install()method 
override protected function install(member:Object):Array

Installs the focus paintable for the given member.

Parameters

member:Object — The member to install the highlight paintable for.

Returns
Array — The canvas objects used.
onDisabled()method 
protected function onDisabled():void

Called when this mode gets disabled.

onEnabled()method 
protected function onEnabled():void

Called when this mode gets enabled.

onPropertyChanged()method 
protected function onPropertyChanged(property:Object, oldValue:Object, newValue:Object):void

Parameters

property:Object
 
oldValue:Object
 
newValue:Object