Remarks
See Also
Developer's Guide
API
- ILabelStyle, ILabel, INodeStyleRenderer, IEdgeStyleRenderer, IPortStyleRenderer
Members
Methods
Gets an implementation of the IBoundsProvider interface that can handle the provided label and its associated style.
Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for calculating the rendering bounds
Return Value
- IBoundsProvider
- An implementation that may be used to subsequently query the label's rendering 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
Gets a temporary context instance that can be used to query additional information for the label's style.
Implementations may return ILookup.EMPTY if they do not support this, but may not return null.
The main purpose of this context lookup is to provide a way for style implementations to customize behavior that is not associated to one of the interfaces that are directly available from the ILabelStyleRenderer interface. E.g. the context lookup of a custom style implementation might return a custom ISelectionRenderer<Object> implementation to change the visualization of the selected state for labels that use said custom style.
Returning null from this context lookup for a queried type cannot be used to "turn off" the default behavior for said type. To turn off the default behavior, either return an implementation of the required type that "does nothing" or LookupDecorator<TDecoratedType, TInterface>.hide the default implementation using an appropriate predicate.
Parameters
- label: ILabel
- The label to provide a context instance for.
- style: ILabelStyle
- The style to use for the context.
Return Value
- ILookup
- A non-
nulllookup implementation.
See Also
API
- ILookup
Gets an implementation of the IHitTestable interface that can handle the provided label and its associated style.
Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for calculating hit tests
Return Value
- 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
nullto indicate that the label cannot be hit tested.
Gets an implementation of the ILassoTestable interface that can handle the provided label and its associated style.
Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for calculating lasso intersection tests
Return Value
- ILassoTestable
- An implementation that may be used to subsequently query the lasso 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
Gets an implementation of the IMarqueeTestable interface that can handle the provided label and its associated style.
Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for calculating marquee intersection tests
Return Value
- 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
Calculates the ILabel.preferredSize of a given label using the associated style.
Parameters
- label: ILabel
- The label to determine the preferred size for
- style: ILabelStyle
- The style to use for calculating the preferred size
Return Value
- Size
- A size that can be used as the ILabel.preferredSize if this renderer renders the label using the associated style.
See Also
Developer's Guide
Gets an implementation of the IVisibilityTestable interface that can handle the provided label and its associated style.
Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for testing the visibility
Return Value
- IVisibilityTestable
- An implementation that may be used to subsequently query the label'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
Gets an implementation of the IVisualCreator interface that can handle the provided label and its associated style.
null.Parameters
- label: ILabel
- The label to provide an instance for
- style: ILabelStyle
- The style to use for creating the label visualization
Return Value
- IVisualCreator
- An implementation that may be used to subsequently create or update the visual for the label. 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
nullbut should yield a void implementation instead.