A FocusIndicatorManager<T> for graph items that supports using styles to indicate the focus.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.GraphFocusIndicatorManager
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.
Parameters
A map of options to pass to the method.
- nodeStyle - INodeStyle
The style to use for the node focus rendering. This option sets the nodeStyle property on the created object.
- edgeStyle - IEdgeStyle
The style to use for the edge focus rendering. This option sets the edgeStyle property on the created object.
- labelStyle - ILabelStyle
The style to use for the label focus rendering. This option sets the labelStyle property on the created object.
- portStyle - IPortStyle
The style to use for the port focus rendering. This option sets the portStyle property on the created object.
- focusedItem - IModelItem
The focused item, updates the canvas and fires the corresponding property change event. This option sets the focusedItem property on the created object.
- showFocusPolicy - ShowFocusPolicy
The show focus policy. This option sets the showFocusPolicy property on the created object.
- focused - boolean
- canvasComponent - CanvasComponent
The canvas instance this instance is managing. This option sets the canvasComponent property on the created object.
- enabled - boolean
Whether this ModelManager<T> is enabled. This option sets the enabled property on the created object.
Properties
Gets the canvas instance this instance is managing.
Remarks
Defined in
Gets or sets the style to use for the edge focus rendering.
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.
Defined in
Gets or sets the focused item, updates the canvas and fires the corresponding property change event.
Gets or sets the style to use for the label focus rendering.
Gets or sets the style to use for the node focus rendering.
Gets or sets the style to use for the port focus rendering.
Gets or sets the show focus policy.
Methods
Overridden to do nothing.
Parameters
A map of options to pass to the method.
- item - IModelItem
- 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 - IModelItem
- 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.
Parameters
A map of options to pass to the method.
- item - IModelItem
- The item to find an installer for.
Returns
- ↪ICanvasObjectInstaller
- An installer or
null
See Also
Overrides
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 - IModelItem
- 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.
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
Defined in
Overridden to do nothing.
Parameters
A map of options to pass to the method.
- item - IModelItem
- 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.