Default renderer implementation that can be used for TableNodeStyle instances.
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.styles.TableNodeStyleRenderer
Properties
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.
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
Get the background style that is currently used by this renderer.
Remarks
Returns
- ↪INodeStyle
- The background style that is currently used by this renderer.
Returns a tight rectangular area where the whole rendering would fit into.
Remarks
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- the context to calculate the bounds for
Returns
Implements
Gets an implementation of the IBoundsProvider interface that can handle the provided node and its associated style.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the calculating the painting bounds
Returns
- ↪IBoundsProvider
- An implementation that may be used to subsequently query the node's painting bounds. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations
Implements
Gets a temporary context instance that can be used to query additional information for the node's style.
Remarks
null
.Parameters
A map of options to pass to the method.
- node - INode
- The node to provide a context instance for.
- style - INodeStyle
- The style to use for the context.
Returns
- ↪ILookup
- An non-
null
lookup implementation.
See Also
Implements
Gets an implementation of the IHitTestable interface that can handle the provided node and its associated style.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the querying hit tests
Returns
- ↪IHitTestable
- An implementation that may be used to subsequently perform hit tests. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations. This method may return
null
to indicate that the node cannot be hit tested.
Implements
Returns the intersection for the given line with this shape's geometry.
Gets an implementation of the IMarqueeTestable interface that can handle the provided node and its associated style.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the querying marquee intersection test.
Returns
- ↪IMarqueeTestable
- An implementation that may be used to subsequently query the marquee intersections. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations
Implements
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
Gets an implementation of the IShapeGeometry interface that can handle the provided node and its associated style.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the rendering
Returns
- ↪IShapeGeometry
- An implementation that may be used to subsequently query geometry information from. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations
Implements
Get the TableRenderingOrder that is currently used by this renderer.
Remarks
Returns
- ↪TableRenderingOrder
- The TableRenderingOrder that is currently used by this renderer.
Gets an implementation of the IVisibilityTestable interface that can handle the provided node and its associated style.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the testing the visibility
Returns
- ↪IVisibilityTestable
- An implementation that may be used to subsequently query the node's visibility. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations
Implements
Gets an implementation of the IVisualCreator interface that can handle the provided node and its associated style.
Remarks
null
.Parameters
A map of options to pass to the method.
- node - INode
- The node to provide an instance for
- style - INodeStyle
- The style to use for the creation of the visual
Returns
- ↪IVisualCreator
- An implementation that may be used to subsequently create or update the visual for the node. Clients should not cache this instance and must always call this method immediately before using the value returned. This enables the use of the flyweight design pattern for implementations. This method may not return
null
but should yield a void implementation instead.
See Also
Implements
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 the corresponding item is considered to intersect the given rectangular box.
Remarks
This method may return false
if the item cannot be selected using a selection marquee or optionally if the item is only partially contained within the box.
Implementations should respect the hitTestRadius if marquee selections should behave differently on different zoom levels.
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
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
Determines whether an element might intersect the visible region for a given context.
Remarks
true
.Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The context to determine the visibility for.
- rectangle - Rect
- The visible region clip.
Returns
- ↪boolean
false
if and only if it is safe not to paint the element because it would not affect the given clipping region.
Implements
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Implements
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.