public class TemplateStripeStyle extends AbstractTemplateStyle<IStripe> implements IStripeStyle
IStripeStyle implementation that can render complex Nodes for the visualization of IStripes
using a TemplateStripeStyleRenderer.
This style implementation provides the ability to use the control templating mechanism to create the
rendering for stripes. The StyleResourceKey is used to determine the Style that
will be applied to the Node. The style will be looked-up in the
CanvasControls the style is used in.
| Constructor and Description |
|---|
TemplateStripeStyle()
Creates a new instance with no style resource key and
TemplateStripeStyleRenderer as renderer. |
TemplateStripeStyle(String styleResourceKey)
Creates a new instance using the given resource key and
TemplateStripeStyleRenderer as renderer. |
TemplateStripeStyle(String styleResourceKey,
TemplateStripeStyleRenderer renderer)
Creates a new instance using the given resource key and a custom renderer instance.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
createControl(IRenderContext context,
IStripe stripe)
Factory method that is called by the
TemplateStripeStyleRenderer to create the control that will be used for the
display of the stripe. |
TemplateStripeStyleRenderer |
getRenderer()
Gets the renderer implementation that can be queried for implementations that provide details about the visual
appearance and visual behavior for a given stripe and this style instance.
|
protected Object |
getStyle(IRenderContext context,
IModelItem stripe)
Callback method that determines the
Style for the Node. |
String |
getStyleResourceKey()
|
void |
setStyleResourceKey(String value)
|
addPropertyChangedListener, clone, getCanvasPropertyKey, getClassLoader, getContentPropertyKey, getContextLookup, getFXMLLoader, getItemPropertyKey, getStyleTag, onPropertyChanged, removePropertyChangedListener, setCanvasPropertyKey, setClassLoader, setContentPropertyKey, setContextLookup, setItemPropertyKey, setStyleTagequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonepublic TemplateStripeStyle()
TemplateStripeStyleRenderer as renderer.public TemplateStripeStyle(String styleResourceKey)
TemplateStripeStyleRenderer as renderer.styleResourceKey - The key of the style resource that will be used for the Node.public TemplateStripeStyle(String styleResourceKey, TemplateStripeStyleRenderer renderer)
styleResourceKey - The key of the style resource that will be used for the Node.renderer - The custom renderer for this style instance.public Node createControl(IRenderContext context, IStripe stripe)
TemplateStripeStyleRenderer to create the control that will be used for the
display of the stripe.context - The context for which the control should be created.stripe - The stripe that will be rendered.public final TemplateStripeStyleRenderer getRenderer()
IStripeStyle
The idiom for retrieving, e.g. an IVisualCreator implementation for a given stripe is:
getRenderer in interface IStripeStyleprotected Object getStyle(IRenderContext context, IModelItem stripe)
Style for the Node.context - The context for which the style is needed.stripe - The stripe that will be rendered.null.public final String getStyleResourceKey()
null in which case the default template will be used.setStyleResourceKey(String)public final void setStyleResourceKey(String value)
value - The resource key for the style or null in which case the default template will be used.getStyleResourceKey()