Default renderer implementation for GroupNodeStyle instances.
Type Details
- yfiles module
- styles-group
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.GroupNodeStyleRenderer
Properties
Gets or sets the node that is currently assigned to this renderer instance.
Gets or sets the currently configured style.
Methods
Prepares this instance for subsequent calls after the style and node have been initialized.
Remarks
Upon invocation the style and node properties have been populated by the getVisualCreator, getBoundsProvider, getHitTestable, or getMarqueeTestable methods.
Subclasses which override this method must call the base method.
Creates the visual representation for the node's collapse/expand icon.
Remarks
The default implementation returns an SVG g element that triggers TOGGLE_EXPANSION_STATE when clicked. The default implementation returns null
if the given bounds are empty.
When overriding this method, updateIconVisual should be overridden as well for better performance.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used.
- expanded - boolean
true
if the node is currently expanded;false
otherwise.- bounds - Rect
- The size and location of the icon. May be empty.
Returns
- ↪SVGGElement
- The visual representation for the node's collapse/expand icon or
null
if no icon should be shown.
See Also
This method is called by the framework to create a Visual that will be included into the IRenderContext.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used.
Returns
- ↪Visual
- The visual to include in the canvas object visual tree. This may be
null
.
See Also
Implements
Returns the union of the node's layout and area that shows the style's drop shadow.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- the context to calculate the bounds for
Returns
- ↪Rect
- Returns the union of the node's layout and area that shows the style's drop shadow.
Implements
Configures the style
and node
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to retrieve the bounds provider for. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IBoundsProvider
this
See Also
Implements
Gets the content area brush that is currently used by this renderer.
Remarks
Returns
- ↪Fill
- The content area brush that is currently used by this renderer.
Gets the content area insets that are currently used by this renderer.
Remarks
Returns
- ↪Insets
- The content area insets that are currently used by this renderer.
Configures the style
and node
parameters, does not call configure and returns this
.
Remarks
this
or an instance that depends on a correctly configured this
.Parameters
A map of options to pass to the method.
- node - INode
- The node to query the context for. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪ILookup
this
See Also
Implements
Gets the corner radius that is currently used by this renderer.
Remarks
Returns
- ↪number
- The corner radius that is currently used by this renderer.
Gets the folder icon type that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleIconType
- The folder icon type that is currently used by this renderer.
Gets the group icon type that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleIconType
- The group icon type that is currently used by this renderer.
Configures the style
and node
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to query hit test with. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IHitTestable
this
See Also
Implements
Gets the icon background brush that is currently used by this renderer.
Remarks
Returns
- ↪Fill
- The icon background brush that is currently used by this renderer.
Gets the icon background shape that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleIconBackgroundShape
- The icon background shape that is currently used by this renderer.
Gets the icon foreground brush that is currently used by this renderer.
Remarks
Returns
- ↪Fill
- The icon foreground brush that is currently used by this renderer.
Gets the icon offset that is currently used by this renderer.
Remarks
Returns
- ↪number
- The icon offset that is currently used by this renderer.
Gets the icon position that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleIconPosition
- The icon position that is currently used by this renderer.
Gets the icon size that is currently used by this renderer.
Remarks
Returns
- ↪number
- The icon size that is currently used by this renderer.
Returns the intersection for the given line with this shape's geometry.
Configures the style
and node
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to query marquee intersection tests. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IMarqueeTestable
this
See Also
Implements
Gets the minimum content area size that is currently used by this renderer.
Remarks
Returns
- ↪Size
- The minimum content area size that is currently used by this renderer.
Returns the outline of the shape or null
.
Remarks
null
is returned callers may assume the canonical outline as result. For nodes this is the node's layout.Returns
- ↪GeneralPath
- The outline or
null
if no outline can be provided.
Implements
Configures the style and node properties, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to retrieve the shape geometry for. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IShapeGeometry
this
See Also
Implements
Gets the tab background brush that is currently used by this renderer.
Remarks
Returns
- ↪Fill
- The tab background brush that is currently used by this renderer.
Gets the tab height that is currently used by this renderer.
Remarks
Returns
- ↪number
- The tab height that is currently used by this renderer.
Gets the tab inset that is currently used by this renderer.
Remarks
Returns
- ↪number
- The tab inset that is currently used by this renderer.
Gets the tab position that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleTabPosition
- The tab position that is currently used by this renderer.
Gets the tab size policy that is currently used by this renderer.
Remarks
Returns
- ↪GroupNodeStyleTabSizePolicy
- The tab size policy that is currently used by this renderer.
Gets the tab slope that is currently used by this renderer.
Remarks
Returns
- ↪number
- The tab slope that is currently used by this renderer.
Gets the tab width that is currently used by this renderer.
Remarks
Returns
- ↪number
- The tab width that is currently used by this renderer.
Configures the style
and node
parameters, calls configure and returns this
.
Remarks
Configure
in isVisible.Parameters
A map of options to pass to the method.
- node - INode
- The node to query visibility tests. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IVisibilityTestable
this
See Also
Implements
Configures the style
and node
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to retrieve the IVisualCreator for. The value will be stored in the node property.
- style - INodeStyle
- The style to associate with the node. The value will be stored in the style property.
Returns
- ↪IVisualCreator
this
See Also
Implements
Returns true
if this renderer is currently drawing a drop shadow; false
otherwise.
Remarks
Returns
- ↪boolean
true
if this renderer is currently drawing a drop shadow;false
otherwise.
Determines if something has been hit at the given coordinates in the world coordinate system.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the context the hit test is performed in
- location - Point
- the coordinates in world coordinate system
Returns
- ↪boolean
- whether something has been hit
Implements
Returns true
if this renderer is currently considering the content area to be hit transparent; false
otherwise.
Remarks
Returns
- ↪boolean
true
if this renderer is currently considering the content area to be hit transparent;false
otherwise.
Tests the node using the current style for an intersection with the given box.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the current input mode context
- rectangle - Rect
- the box describing the marquee's bounds
Returns
- ↪boolean
true
if the node is considered to be captured by the marquee
Implements
Tests the node using the current style for an intersection with the the given path.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the current input mode context
- lassoPath - GeneralPath
- the path describing the lasso selection bounds
Returns
- ↪boolean
true
if the item is considered to be captured by the lasso
Implements
Checks whether the given coordinate is deemed to lie within the shape's geometric bounds.
Parameters
A map of options to pass to the method.
- location - Point
- The point to test.
Returns
- ↪boolean
- True if the point lies within the shape.
Implements
Returns true
if this renderer is currently clipping the visualization to allow for a transparent content area; false
otherwise.
Remarks
Returns
- ↪boolean
true
if this renderer is currently allowing the content area to be rendered transparently;false
otherwise.
Returns true
if this renderer is currently showing the content area for collapsed nodes; false
otherwise.
Remarks
Returns
- ↪boolean
true
if this renderer is currently showing the content area for collapsed nodes;false
otherwise.
Determines visibility by checking for an intersection with the layout.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The context.
- rectangle - Rect
- The current clip
Returns
- ↪boolean
- Whether the layout is visible in the clip.
Implements
Implements the ILookup interface.
Remarks
this
as a result of a successful lookup. This implementation will check if Type.IsInstanceOfType(this) and will call configure on success and return this
.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type to query for.
Returns
- ↪T
- An implementation or
null
.
See Also
Implements
updateIconVisual
(context: IRenderContext, expanded: boolean, bounds: Rect, oldVisual: SVGGElement) : SVGGElementUpdates the visual representation for the node's collapse/expand icon previously created by createIconVisual.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used.
- expanded - boolean
true
if the node is currently expanded;false
otherwise.- bounds - Rect
- The size and location of the icon. May be empty.
- oldVisual - SVGGElement
- The visual instance that has been returned the last time createIconVisual has been called.
Returns
- ↪SVGGElement
- The visual representation for the node's collapse/expand icon or
null
if no icon should be shown.
See Also
This method updates or replaces a previously created Visual for inclusion in the IRenderContext.
Remarks
The CanvasComponent uses this method to give implementations a chance to update an existing Visual that has previously been created by the same instance during a call to createVisual. Implementation may update the oldVisual
and return that same reference, or create a new visual and return the new instance or null
.
I most cases oldVisual
is a visual instance that has been returned by the createVisual method of this instance. This is, however, not guaranteed. Implementations have to be aware of this.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used in.
- oldVisual - Visual
- The visual instance to be updated.
Returns
- ↪Visual
oldVisual
, if this instance modified the visual, or a new visual that should replace the existing one in the canvas object visual tree.