FocusIndicatorManager<Textends ILookup>
A ModelManager<T> implementation that manages the visual decoration of the focused element in a canvas.
Remarks
For the item that should be focused, this class uses the ILookup mechanism of the item to lookup an IFocusIndicatorInstaller implementation which will do the actual installation of the decoration in the canvas.
See GraphFocusIndicatorManager for a specialized subclass for graph items that uses item styles for the visualization.
Type Parameters
- T: ILookup
- The type of the items.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.FocusIndicatorManager
See Also
Constructors
Creates a new instance.
Remarks
If a new FocusIndicatorManager<T> instance is set to a GraphComponent's focusIndicatorManager property, the old instance is uninstalled and the new instance is installed automatically.
If a new FocusIndicatorManager<T> instance is not set via the focusIndicatorManager property, it is important to call the install life-cycle method.
Properties
Gets the canvas instance this instance is managing.
Remarks
Defined in
Gets or sets whether this ModelManager<T> is enabled.
Remarks
If the manager is disabled, it will not install the ICanvasObjects into the associated CanvasComponent.
The default is true
, i.e. this manager is enabled by default.
Defined in
Gets or sets a value indicating whether the container this manager is installed in currently is focused.
Gets or sets the focused item, updates the canvas and fires the corresponding property change event.
See Also
Gets or sets the show focus policy.
Methods
Overridden to do nothing.
Parameters
A map of options to pass to the method.
- item - T
- The item to add.
Returns
- ↪ICanvasObject
- The newly created canvas object or
null
if nothing was installed.
See Also
Overrides
Called by installItem to retrieve the installer for a given item.
Remarks
Parameters
A map of options to pass to the method.
- item - T
- The item to find a canvas object group for.
Returns
- ↪ICanvasObjectGroup
- An ICanvasObjectGroup or
null
See Also
Implements
Called by installItem to retrieve the installer for a given item.
Remarks
Parameters
A map of options to pass to the method.
- item - T
- The item to find an installer for.
Returns
- ↪ICanvasObjectInstaller
- An installer or
null
See Also
Implements
Installs this instance in the given CanvasComponent instance.
Remarks
If this manager instance is set to a CanvasComponent instance using one of the properties focusIndicatorManager, selectionIndicatorManager, or highlightIndicatorManager, this method is called automatically.
In all other cases, this method must be called before using this manager instance.
Overriders must either call the base implementation or set the canvasComponent.
Parameters
A map of options to pass to the method.
- canvas - CanvasComponent
- The CanvasComponent instance to install this manager instance in.
Throws
- Exception({ name: 'ArgumentError' })
- if
canvas
isnull
.
Defined in
Installs a member of the collection into the canvas using the ICanvasObjectDescriptor which is returned by getInstaller.
Parameters
A map of options to pass to the method.
- item - T
- The member to install.
Returns
- ↪ICanvasObject
- The canvas object that has been returned by the installer.
Defined in
Called when this manager gets disabled.
Called when this manager gets enabled.
Called when the focused property has changed.
See Also
Called when the focused item has changed.
Remarks
Parameters
A map of options to pass to the method.
- evt - PropertyChangedEventArgs
- a description of the event
See Also
Overridden to do nothing.
Parameters
A map of options to pass to the method.
- item - T
- The item to remove.
See Also
Overrides
Uninstalls this instance from the given CanvasComponent instance.
Remarks
If this manager instance has been set to a CanvasComponent instance using one of the properties focusIndicatorManager, selectionIndicatorManager, or highlightIndicatorManager, this method is called automatically when the property value is changed.
In all other cases, this method must be called when this manager instance is not used anymore.
Overriders must either call the base implementation or set the canvasComponent to null
.
Parameters
A map of options to pass to the method.
- canvas - CanvasComponent
- The CanvasComponent to remove this manager instance from.
Defined in
Removes the given ICanvasObject.
Parameters
A map of options to pass to the method.
- canvasObject - ICanvasObject
- The canvas objects that have been associated with the descriptor.
See Also
Defined in
Events
Occurs when the focusedItem property has been changed.
Overrides
Event Registration
addPropertyChangedListener(function(this, PropertyChangedEventArgs):void)
Event Deregistration
removePropertyChangedListener(function(this, PropertyChangedEventArgs):void)
Signature Details
function(sender: any, args: PropertyChangedEventArgs)
Parameters
- sender - any
- The object which dispatched the event.
- args - PropertyChangedEventArgs
- The arguments which define the change.