TModelItem
- The type of the model item.public abstract class AbstractTemplateStyle<TModelItem extends IModelItem> extends Object implements ICloneable, Cloneable
Node
s.Modifier | Constructor and Description |
---|---|
protected |
AbstractTemplateStyle()
Constructs a new instance of this style with default values.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
Adds the given listener for the
PropertyChanged event that occurs when a property value changes. |
AbstractTemplateStyle<TModelItem> |
clone()
Performs a shallow clone of this instance, except for the value of
StyleTag which is cloned, too,
if it can be cloned. |
String |
getCanvasPropertyKey() |
static DelegatingClassLoader |
getClassLoader() |
String |
getContentPropertyKey() |
IContextLookup |
getContextLookup()
Gets an implementation of
IContextLookup that can be used to satisfy queries that are made to the implementation
which is returned by calls to INodeStyleRenderer.getContext(com.yworks.yfiles.graph.INode, com.yworks.yfiles.graph.styles.INodeStyle)
that are made on the style renderer that is associated with this style instance. |
static FXMLLoader |
getFXMLLoader() |
String |
getItemPropertyKey() |
Object |
getStyleTag()
Gets the tag that is associated with this style instance.
|
protected void |
onPropertyChanged(PropertyChangedEventArgs e)
Raises the
PropertyChanged event. |
void |
removePropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
Removes the given listener for the
PropertyChanged event that occurs when a property value changes. |
void |
setCanvasPropertyKey(String canvasPropertyKey) |
static void |
setClassLoader(DelegatingClassLoader classLoader) |
void |
setContentPropertyKey(String contentPropertyKey) |
void |
setContextLookup(IContextLookup value)
Sets an implementation of
IContextLookup that can be used to satisfy queries that are made to the implementation
which is returned by calls to INodeStyleRenderer.getContext(com.yworks.yfiles.graph.INode, com.yworks.yfiles.graph.styles.INodeStyle)
that are made on the style renderer that is associated with this style instance. |
void |
setItemPropertyKey(String itemPropertyKey) |
void |
setStyleTag(Object value)
Sets the tag that is associated with this style instance.
|
protected AbstractTemplateStyle()
public final void addPropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
PropertyChanged
event that occurs when a property value changes.propertyChangedEvent
- The listener to add.removePropertyChangedListener(IEventHandler)
public AbstractTemplateStyle<TModelItem> clone()
StyleTag
which is cloned, too,
if it can be cloned.clone
in interface ICloneable
clone
in class Object
Object.clone()
public String getCanvasPropertyKey()
public static DelegatingClassLoader getClassLoader()
public String getContentPropertyKey()
public final IContextLookup getContextLookup()
IContextLookup
that can be used to satisfy queries that are made to the implementation
which is returned by calls to INodeStyleRenderer.getContext(com.yworks.yfiles.graph.INode, com.yworks.yfiles.graph.styles.INodeStyle)
that are made on the style renderer that is associated with this style instance.
This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this
instance. E.g. it is possible to provide customized implementations of
ISelectionIndicatorInstaller
,
IHighlightIndicatorInstaller
, IHandleProvider
,
INodeSizeConstraintProvider
, and
INodeInsetsProvider
. Simple style implementations can use IContextLookup.EMPTY_CONTEXT_LOOKUP
but may not use null
for this property. The default value is IContextLookup.EMPTY_CONTEXT_LOOKUP
setContextLookup(IContextLookup)
public static FXMLLoader getFXMLLoader()
public String getItemPropertyKey()
public final Object getStyleTag()
The various style renderer implementations can use this tag to make it accessible in the context of the instantiated
templates and controls. The framework does not make any assumptions about the value of this property. It is there for
convenient use in the process of data binding the templates. This property supports property change notification
and can thus be data bound easily.
setStyleTag(Object)
protected void onPropertyChanged(PropertyChangedEventArgs e)
PropertyChanged
event.e
- The PropertyChangedEventArgs
instance containing the event data.public final void removePropertyChangedListener(IEventHandler<PropertyChangedEventArgs> propertyChangedEvent)
PropertyChanged
event that occurs when a property value changes.propertyChangedEvent
- The listener to remove.addPropertyChangedListener(IEventHandler)
public void setCanvasPropertyKey(String canvasPropertyKey)
public static void setClassLoader(DelegatingClassLoader classLoader)
public void setContentPropertyKey(String contentPropertyKey)
public final void setContextLookup(IContextLookup value)
IContextLookup
that can be used to satisfy queries that are made to the implementation
which is returned by calls to INodeStyleRenderer.getContext(com.yworks.yfiles.graph.INode, com.yworks.yfiles.graph.styles.INodeStyle)
that are made on the style renderer that is associated with this style instance.
This can be used to conveniently customize the lookup behavior of the style renderers that are associated with this
instance. E.g. it is possible to provide customized implementations of
ISelectionIndicatorInstaller
,
IHighlightIndicatorInstaller
, IHandleProvider
,
INodeSizeConstraintProvider
, and
INodeInsetsProvider
. Simple style implementations can use IContextLookup.EMPTY_CONTEXT_LOOKUP
but may not use null
for this property. The default value is IContextLookup.EMPTY_CONTEXT_LOOKUP
value
- The context implementation.getContextLookup()
public void setItemPropertyKey(String itemPropertyKey)
public final void setStyleTag(Object value)
The various style renderer implementations can use this tag to make it accessible in the context of the instantiated
templates and controls. The framework does not make any assumptions about the value of this property. It is there for
convenient use in the process of data binding the templates. This property supports property change notification
and can thus be data bound easily.
value
- The tag associated with this style instance.getStyleTag()