Packagecom.yworks.canvas.drawing
Classpublic class AbstractSingleLineSnapResultPaintable
InheritanceAbstractSingleLineSnapResultPaintable Inheritance Object
Implements IDisplayObjectCreator
Subclasses FixedLinePaintable, VariableLinePaintable

This abstract class contains some common properties that are used to visualize SnapLineSnapResults.



Public Properties
 PropertyDefined By
  orientation : SnapLineOrientation
The orientation of the SnapLine.
AbstractSingleLineSnapResultPaintable
  sourcePoint : IPoint
A position in world coordinates representing the source of the SnapLine.
AbstractSingleLineSnapResultPaintable
  stroke : IStroke
The stroke used in the paint method.
AbstractSingleLineSnapResultPaintable
  targetPoint : IPoint
The location in world coordinates where the target has snapped to the SnapLine.
AbstractSingleLineSnapResultPaintable
Public Methods
 MethodDefined By
  
Creates a new DisplayObject from scratch.
AbstractSingleLineSnapResultPaintable
  
This implementation does nothing and has to be overridden by it's subclasses.
AbstractSingleLineSnapResultPaintable
  
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject or creates a new one.
AbstractSingleLineSnapResultPaintable
Property Detail
orientationproperty
orientation:SnapLineOrientation

The orientation of the SnapLine.


Implementation
    public function get orientation():SnapLineOrientation
    public function set orientation(value:SnapLineOrientation):void
sourcePointproperty 
sourcePoint:IPoint

A position in world coordinates representing the source of the SnapLine.


Implementation
    public function get sourcePoint():IPoint
    public function set sourcePoint(value:IPoint):void

See also

SnapLine
SnapLineSnapResult
strokeproperty 
stroke:IStroke

The stroke used in the paint method.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void

See also

targetPointproperty 
targetPoint:IPoint

The location in world coordinates where the target has snapped to the SnapLine.


Implementation
    public function get targetPoint():IPoint
    public function set targetPoint(value:IPoint):void

See also

SnapLine
SnapLineSnapResult
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.
paint()method 
public function paint(g:YGraphics, ctx:IPaintContext):void

This implementation does nothing and has to be overridden by it's subclasses.

Parameters

g:YGraphics
 
ctx:IPaintContext

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.