Package | com.yworks.graph.drawing |
Interface | public interface IStyleRenderer |
Implementors | AbstractStyleRenderer, AbstractVoidStyleRenderer |
IVisualStyle
implementations
that can be used to query the actual IDisplayObjectCreator
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.
Method | Defined 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 IDisplayObjectCreator that will create
the display object for the user object. | 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 |
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.
|
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.
|
ILookup — A context instance or Lookups.EMPTY
|
getDisplayObjectCreator | () | method |
public function getDisplayObjectCreator(item:IModelItem, style:IVisualStyle):IDisplayObjectCreator
Gets an implementation of IDisplayObjectCreator
that will create
the display object for the user object.
This method may always return the same instance. By contract, clients will not cache instances returned, but will always call this method before the methods on the instance will be called.
This contract enables the use of the fly-weight design pattern. Implementations of this class can always return the same instance and configure this instance upon each call to this method.
Parameters
item:IModelItem — The item to provide an instance for.
| |
style:IVisualStyle — The style to use for the painting.
|
IDisplayObjectCreator — An implementation or null
|
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
|
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.
|
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.
|