Packagecom.yworks.canvas.drawing
Interfacepublic interface IDisplayObjectCreator
Implementors AbstractInBetweenSnapResultPaintable, AbstractNodeStyleRenderer, AbstractSingleLineSnapResultPaintable, AbstractStyleRenderer, AbstractTextPaintable, ArrowPaintable, DefaultPortCandidateDescriptor, DelegatingStyleRenderer, EdgeSelectionDisplayObjectCreator, EqualSizePaintable, FixedDistanceSnapResultPaintable, GridPaintable, GridSnapResultPaintable, OverviewGraphDisplayObjectCreator, PaintableDisplayObjectCreator, ShapePaintable, SimplePortStyleRenderer, TableNodeStyleRenderer, TemplateLabelStyleRenderer, TemplateNodeStyleRenderer, VoidDisplayObjectCreator

Simple interface which is used by implementations that know how to create a DisplayObject for the given IDisplayObjectContext.

Implementors have to return a DisplayObject which will be added to a CanvasComponent's canvas object tree. The DisplayObject's size and location has to be set by the implementor.



Public Methods
 MethodDefined By
  
Creates a new DisplayObject from scratch.
IDisplayObjectCreator
  
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or creates a new one.
IDisplayObjectCreator
Method Detail
createDisplayObject()method
public function createDisplayObject(context:IDisplayObjectContext):DisplayObject

Creates a new DisplayObject from scratch.

Parameters

context:IDisplayObjectContext — The context for which the display object is created.

Returns
DisplayObject — A DisplayObject.
updateDisplayObject()method 
public function updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject

Updates the given DisplayObject or creates a new one.

Implementors can decide whether they update the given display object or create a new one. Updating can mean re-rendering or updating size and/or coordinates.

Parameters

oldDisplayObject:DisplayObject — The display object to update.
 
context:IDisplayObjectContext — The context for which the display object should be updated.

Returns
DisplayObject — The updated display object or a completely new display object.