Package | com.yworks.graph.model |
Class | public class EdgeSelectionDisplayObjectCreator |
Inheritance | EdgeSelectionDisplayObjectCreator Object |
Implements | ISelectionPaintable, IHighlightPaintableInstaller, IFocusPaintableInstaller, IDisplayObjectCreator |
The drawing is separated in drawing the edge path and the edge's bends to allow easier customization.
Property | Defined By | ||
---|---|---|---|
stroke : IStroke
Gets or sets the stroke used to draw the edge path and the edge's bends. | EdgeSelectionDisplayObjectCreator |
Property | Defined By | ||
---|---|---|---|
edge : IEdge [read-only]
The edge this display object creator is used for. | EdgeSelectionDisplayObjectCreator |
Method | Defined By | ||
---|---|---|---|
Creates a new instance for the passed edge. | EdgeSelectionDisplayObjectCreator | ||
createDisplayObject(context:IDisplayObjectContext):DisplayObject
Creates a new DisplayObject from scratch. | EdgeSelectionDisplayObjectCreator | ||
Creates and installs one or more canvas objects into the canvas that indicate the focus decoration for
an item. | EdgeSelectionDisplayObjectCreator | ||
installHighlightPaintables(context:IInputModeContext, highlightGroup:ICanvasObjectGroup, item:Object):Array
Creates and installs one or more canvas objects into the canvas that indicate a selection decoration for
an item. | EdgeSelectionDisplayObjectCreator | ||
installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Creates and installs
one or more canvas objects into the canvas that indicate a selection decoration for
an item. | EdgeSelectionDisplayObjectCreator | ||
Performs the actual painting into the given graphics context. | EdgeSelectionDisplayObjectCreator | ||
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or creates a new one. | EdgeSelectionDisplayObjectCreator |
Method | Defined By | ||
---|---|---|---|
Draws the bend assuming that the graphics context is correctly configured so that the bend is located at (0, 0). | EdgeSelectionDisplayObjectCreator | ||
Transforms the graphics context to paint in view coordinates and iterates over the edge's bends. | EdgeSelectionDisplayObjectCreator | ||
Looks up the IPathGeometry of the edge and draws its path. | EdgeSelectionDisplayObjectCreator |
edge | property |
edge:IEdge
[read-only] The edge this display object creator is used for.
protected function get edge():IEdge
stroke | property |
stroke:IStroke
Gets or sets the stroke used to draw the edge path and the edge's bends.
public function get stroke():IStroke
public function set stroke(value:IStroke):void
EdgeSelectionDisplayObjectCreator | () | Constructor |
public function EdgeSelectionDisplayObjectCreator(edge:IEdge)
Creates a new instance for the passed edge.
Parametersedge:IEdge — The edge this display object creator is used for.
|
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.
|
DisplayObject — A DisplayObject .
|
installFocusPaintables | () | method |
public function installFocusPaintables(context:IInputModeContext, focusGroup:ICanvasObjectGroup, item:Object):Array
Creates and installs one or more canvas objects into the canvas that indicate the focus decoration for an item.
Parameters
context:IInputModeContext — The context to add the IDisplayObjectCreator for the focus indicator.
| |
focusGroup:ICanvasObjectGroup — The canvas object group to add the items to.
| |
item:Object — The item to install the indicator for.
|
Array — An array of canvas objects this instance has installed into the CanvasComponent .
|
installHighlightPaintables | () | method |
public function installHighlightPaintables(context:IInputModeContext, highlightGroup:ICanvasObjectGroup, item:Object):Array
Creates and installs one or more canvas objects into the canvas that indicate a selection decoration for an item.
Parameters
context:IInputModeContext — The context to add the IDisplayObjectCreator for the highlighting.
| |
highlightGroup:ICanvasObjectGroup — The canvas object group to add the items to.
| |
item:Object — The item to create a highlight for.
|
Array — An array of canvas objects this instance has installed into the CanvasComponent .
|
installSelectionPaintables | () | method |
public function installSelectionPaintables(userObject:Object, canvas:CanvasComponent, selectionGroup:ICanvasObjectGroup):Array
Creates and installs one or more canvas objects into the canvas that indicate a selection decoration for an item.
Parameters
userObject:Object — The item to create a selection for.
| |
canvas:CanvasComponent — The canvas to add the selection visualization to.
| |
selectionGroup:ICanvasObjectGroup — The canvas object group to add the items to.
|
Array — An array of canvas objects this instance has installed into the canvas.
|
paint | () | method |
public function paint(g:YGraphics, ctx:IPaintContext):void
Performs the actual painting into the given graphics context.
This implementation applies the set stroke
and delegates the rendering to paintPath
and paintBends
.
Parameters
g:YGraphics — The graphics context.
| |
ctx:IPaintContext — The paint context.
|
See also
paintBend | () | method |
protected function paintBend(g:YGraphics, ctx:IPaintContext, bend:IBend):void
Draws the bend assuming that the graphics context is correctly configured so that the bend is located at (0, 0).
Parameters
g:YGraphics — The graphics context.
| |
ctx:IPaintContext — The paint context.
| |
bend:IBend — The bend to draw.
|
paintBends | () | method |
protected function paintBends(g:YGraphics, ctx:IPaintContext):void
Transforms the graphics context to paint in view coordinates and iterates over the edge's bends. For each
bend the graphics context is translated to the bend coordinates and the painting is delegated to
paintBend
.
Parameters
g:YGraphics — The graphics context.
| |
ctx:IPaintContext — The paint context.
|
See also
paintPath | () | method |
protected function paintPath(g:YGraphics, ctx:IPaintContext):void
Looks up the IPathGeometry
of the edge and draws its path.
Parameters
g:YGraphics — The graphics context.
| |
ctx:IPaintContext — The paint context.
|
See also
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.
|
DisplayObject — The updated display object or a completely new display object.
|