An implementation of the INodeStyleRenderer interface that can render TemplateNodeStyleBase instances.
Type Details
- yfiles module
- styles-template
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.TemplateNodeStyleRenderer
See Also
Properties
Gets the layout of the node this renderer is currently configured for.
Remarks
Node.Layout
.Gets or sets the currently configured node.
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.
This is an empty implementation. Subclasses might have to override this method.
Creates the visual by delegating to createTemplate and then initializing the control with the context.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context for the creation.
Returns
- ↪Visual
- The visual that is used for rendering the node.
See Also
Implements
Returns the layout bounds as an upper bound for the painting bound.
Remarks
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- the context to calculate the bounds for
Returns
- ↪Rect
- the bounds or
null
to indicate an unbound area
Implements
Provides a bounds calculation implementation for the given style and node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to query the provider for.
- style - INodeStyle
- The style whose provider is queried.
Returns
- ↪IBoundsProvider
- An implementation that can calculate visual bounds.
Implements
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 context by delegating to contextLookup.
Provides a hit testing implementation for the given style and node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to query the tester for.
- style - INodeStyle
- The style whose tester is queried.
Returns
- ↪IHitTestable
- An implementation that can perform the hit testing.
See Also
Implements
Gets the insets by delegating to insets.
Tries to use the outline shape to perform the intersection calculation, otherwise reverts to default (rectangular) behavior.
Provides a marquee testing implementation for the given style and node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to query the tester for.
- style - INodeStyle
- The style whose tester is queried.
Returns
- ↪IMarqueeTestable
- An implementation that can test for marquee intersections.
See Also
Implements
Gets the minimum size by delegating to minimumSize.
Gets the normalized outline by delegating to normalizedOutline.
Tries to use the outline shape to create the outline shape path, otherwise reverts to default (rectangular) behavior.
Provides the geometry for the visual representation.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to query the geometry for.
- style - INodeStyle
- The style for which the geometry is queried.
Returns
- ↪IShapeGeometry
- An implementation that describes the outline geometry of the shape.
See Also
Implements
Configures the style
and node
parameters, does not call 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
Tries to use the outline shape to perform the hit test analysis, otherwise reverts to default (rectangular) behavior.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the context the hit test is performed in
- location - Point
- the hit point in world coordinates
Returns
- ↪boolean
- whether something has been hit
Implements
Tries to use the outline shape to perform the marquee intersection analysis, otherwise reverts to default (rectangular) behavior.
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 item is considered to be captured by the marquee
Implements
Tries to use the outline shape to perform the lasso intersection analysis, otherwise reverts to default (rectangular) behavior.
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
Tries to use the outline shape to perform the contains test, otherwise reverts to default (rectangular) behavior.
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
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
Implementation of the lookup method.
Remarks
type
.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type to query an instance for.
Returns
- ↪T
- The implementation or
null
.
See Also
Implements
Updates the component correspondingly.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context for the creation.
- oldVisual - Visual
- The currently rendered visual.
Returns
- ↪Visual
- The visual that is used for rendering the node.