FocusIndicatorManager<T extends ILookup>
A ModelManager<T> implementation that manages the visual decoration of the focused element in a canvas.
Remarks
Type Parameters
- T: ILookup
- The type of the items.
Type Details
- yFiles module
- view
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 IRenderTreeElements into the associated CanvasComponent.
The default is true
, i.e. this manager is enabled by default.
Property Value
true
if enabled; false
otherwise.Defined in
Gets or sets a value indicating whether the container this manager is installed in currently is focused.
Property Value
true
if the container is currently focused; false
otherwise. Depending on the showFocusPolicy, this will influence the visibility of the rendering.Gets or sets the focused item, updates the canvas, and fires the corresponding event.
Property Value
null
, when no item has or should have focus.See Also
Gets or sets the policy for when the focus indicator should be visible.
Remarks
Property Value
See Also
Gets or sets a value that determines whether the user is currently using the keyboard to control the focusedItem.
Remarks
true
, too, in order for the indication to be displayed. This property gets automatically reset to false
, when the user interacts with a pointer device and pointer-down is triggered.See Also
Methods
Overridden to do nothing.
Parameters
A map of options to pass to the method.
- item - T
- The item to add, which is ignored in this implementation.
Returns
- ↪IRenderTreeElement?
- Always returns
null
as no action is performed.
See Also
Overrides
Called by installItem to retrieve the renderer for a given item.
Remarks
Parameters
A map of options to pass to the method.
- item - T
- The item to find a renderer for.
Returns
- ↪IObjectRenderer<T>?
- A renderer or
null
See Also
Implements
Called by installItem to retrieve the render tree group for a given item.
Remarks
Parameters
A map of options to pass to the method.
- item - T
- The item to find a render tree group for.
Returns
- ↪IRenderTreeGroup?
- An IRenderTreeGroup 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.
- canvasComponent - CanvasComponent
- The CanvasComponent instance to install this manager instance in.
Throws
- Exception({ name: 'ArgumentError' })
- if
canvasComponent
isnull
.
Overrides
Installs a member of the collection into the canvas using the IObjectRenderer<T> which is returned by getRenderer.
Parameters
A map of options to pass to the method.
- item - T
- The member to install.
Returns
- ↪IRenderTreeElement?
- The new render tree element or
null
if the item was not installed.
Defined in
Called when this manager gets disabled.
Called when this manager gets enabled.
Called when the focused property has changed.
Remarks
See Also
Called when the focused item has changed.
Remarks
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<T|null>
- a description of the event
See Also
Called when the usingKeyboard property has changed.
Remarks
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.
- canvasComponent - CanvasComponent
- The CanvasComponent to remove this manager instance from.
Overrides
Removes the given IRenderTreeElement.
Parameters
A map of options to pass to the method.
- renderTreeElement - IRenderTreeElement
- The render tree element that has been associated with the renderer.
See Also
Defined in
Events
Occurs when the focusedItem property has been changed.