Packagecom.yworks.graph.drawing
Interfacepublic interface IStyleRenderer
SubinterfacesIEdgeStyleRenderer, ILabelStyleRenderer, INodeStyleRenderer, IPortStyleRenderer
ImplementorsAbstractStyleRenderer

Generic interface used by IVisualStyle implementations that can be used to query the actual IPaintable and IBoundsProvider implementations for an IModelItem instance and its associated style instance.

Implementations of this interface should be designed to be sharable between multiple style instances and should therefore not contain style specific state.



Public Methods
 MethodDefined by
  
Gets an implementation of the IBoundsProvider interface that can handle the provided item and its associated style.
IStyleRenderer
  
Gets a temporary context instance that can be used to query additional information for the item's style.
IStyleRenderer
  
Gets an implementation of the IHitTestable interface that can handle the provided item and its associated style.
IStyleRenderer
  
Gets an implementation of the IMarqueeTestable interface that can handle the provided item and its associated style.
IStyleRenderer
  
Gets an implementation of the IPaintable interface that can handle the provided item and its associated style.
IStyleRenderer
Method detail
getBoundsProvider()method
public function getBoundsProvider(item:IModelItem, style:IVisualStyle):IBoundsProvider

Gets an implementation of the IBoundsProvider interface that can handle the provided item and its associated style.

This method may return a flyweight implementation.

Parameters
item:IModelItem — The item to provide an instance for.
 
style:IVisualStyle — The style to use for the calculating the painting bounds.

Returns
IBoundsProvider — An implementation that may be used to subsequently query the item'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.
getContext()method 
public function getContext(item:IModelItem, style:IVisualStyle):ILookup

Gets a temporary context instance that can be used to query additional information for the item's style.

Implementations may return Lookups.EMPTY if they don't support this, but may not return null.

Parameters
item:IModelItem — The item to provide a context instance for.
 
style:IVisualStyle — The style to use for the context.

Returns
ILookup — A context instance or Lookups.EMPTY
getHitTestable()method 
public function getHitTestable(item:IModelItem, style:IVisualStyle):IHitTestable

Gets an implementation of the IHitTestable interface that can handle the provided item and its associated style.

This method may return a flyweight implementation.

Parameters
item:IModelItem — The item to provide an instance for
 
style:IVisualStyle — 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 item cannot be hit tested.
getMarqueeTestable()method 
public function getMarqueeTestable(item:IModelItem, style:IVisualStyle):IMarqueeTestable

Gets an implementation of the IMarqueeTestable interface that can handle the provided item and its associated style.

This method may return a flyweight implementation.

Parameters
item:IModelItem — he item to provide an instance for
 
style:IVisualStyle — The style to use for the querying marquee intersection test.

Returns
IMarqueeTestable — 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.
getPaintable()method 
public function getPaintable(item:IModelItem, style:IVisualStyle):IPaintable

Gets an implementation of the IPaintable interface that can handle the provided item and its associated style.

This method may return a flyweight implementation.

Parameters
item:IModelItem — The item to provide an instance for.
 
style:IVisualStyle — The style to use for the painting.

Returns
IPaintable — An implementation that may be used to subsequently paint the item. 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