public interface IVisualCreator
Node
s for rendering into a given
IRenderContext
.CanvasControl
,
ICanvasObjectDescriptor
,
ICanvasObject
Modifier and Type | Method and Description |
---|---|
Node |
createVisual(IRenderContext context)
This method is called by the framework to create a
Node that will be included into the IRenderContext . |
Node |
updateVisual(IRenderContext context,
Node oldVisual)
This method updates or replaces a previously created
Node for inclusion in the IRenderContext . |
Node createVisual(IRenderContext context)
Node
that will be included into the IRenderContext
.
CanvasControl
uses this interface through the ICanvasObjectDescriptor
to populate the visual canvas object tree.
context
- The context that describes where the visual will be used.null
.updateVisual(IRenderContext, Node)
Node updateVisual(IRenderContext context, Node oldVisual)
Node
for inclusion in the IRenderContext
.
The CanvasControl
uses this method to give implementations a chance to update an existing
Visual that has previously been created by the same instance during a call to createVisual(IRenderContext)
.
Implementation may update the oldVisual
and return that same reference, or create a new visual and return the
new instance or null
.
context
- The context that describes where the visual will be used in.oldVisual
- The visual instance that had been returned the last time the createVisual(IRenderContext)
method was called on
this instance.oldVisual
, if this instance modified the visual, or a new visual that should replace the existing one in the
canvas object visual tree.createVisual(IRenderContext)
,
ICanvasObjectDescriptor
,
CanvasControl