StripeStyleBase<TVisualextends Visual>
An abstract base class that makes it possible to easily implement a custom IStripeStyle.
Remarks
The only method that needs to be implemented by subclasses is createVisual, however to improve rendering performance it is highly recommended to implement at least updateVisual, too.
This implementation differs from the straightforward IStripeStyle implementation in that there is no visible separation between the style and its IStripeStyleRenderer. Instead the renderer used by the base class is fixed and delegates all calls back to the style instance.
Type Parameters
- TVisual: Visual
- The optional type of the
created and updated by the and methods. This type argument can be omit, but specifying a more concrete type helps conveniently implementing with TypeScript.
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.styles.StripeStyleBase
See Also
Constructors
Initializes a new instance of the StripeStyleBase<TVisual> class.
Properties
Gets the renderer implementation for this instance.
Remarks
Implements
Methods
Creates a new object that is a copy of the current instance.
Remarks
this
.Returns
- ↪Object
- A new object that is a copy of this instance using memberwiseClone.
Implements
Creates the visual.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- stripe - IStripe
- The stripe to which this style instance is assigned.
Returns
- ↪TVisual
- The visual as required by the createVisual interface.
See Also
Performs the lookup operation for the getContext that has been queried from the renderer.
Remarks
This implementation yields null
for everything but:
For these interfaces an implementation will be returned that delegates to the methods in this instance.
Parameters
A map of options to pass to the method.
Returns
- ↪Object
- An implementation of the
type
ornull
.
Updates the visual previously created by createVisual.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- oldVisual - TVisual
- The visual that has been created in the call to createVisual.
- stripe - IStripe
- The stripe to which this style instance is assigned.
Returns
- ↪TVisual
- The visual as required by the createVisual interface.