Package | com.yworks.graph.drawing |
Class | public class PolylineEdgeStyleRenderer |
Inheritance | PolylineEdgeStyleRenderer PathBasedEdgeStyleRenderer AbstractEdgeStyleRenderer AbstractStyleRenderer Object |
PolylineEdgeStyle
.
Property | Defined By | ||
---|---|---|---|
item : IModelItem [read-only]
Gets the currently configured item. | AbstractStyleRenderer | ||
selfLoopDistance : Number
Gets or sets the distance between the node's layout and its self loop control points. | PolylineEdgeStyleRenderer | ||
style : IVisualStyle [read-only]
Gets the currently configured style. | AbstractStyleRenderer | ||
styleDescriptor : ICanvasObjectDescriptor [read-only]
Gets the ICanvasObjectDescriptor to use for new installations. | AbstractStyleRenderer |
Property | Defined By | ||
---|---|---|---|
addBridges : Boolean [read-only]
Determines whether the rendered path should use the BridgeManager
to add bridges to it. | PathBasedEdgeStyleRenderer | ||
path : GeneralPath
The path instance that this instance is working with. | PathBasedEdgeStyleRenderer | ||
stroke : IStroke [read-only]
Gets the pen to use for painting the path. | PolylineEdgeStyleRenderer |
Method | Defined By | ||
---|---|---|---|
[override]
Returns a tight rectangular area where the whole rendering
would fit into. | PathBasedEdgeStyleRenderer | ||
createDisplayObject(context:IDisplayObjectContext):DisplayObject [override] | PathBasedEdgeStyleRenderer | ||
createRectangleSelfLoop(sx:Number, sy:Number, oppositeX:Number, oppositeY:Number, tx:Number, ty:Number):GeneralPath [static]
Static utility method that creates a rectangular self loop path. | PolylineEdgeStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
Configures the style and item parameters,
does not call configure and returns this. | AbstractStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
[override]
This method is overridden for performance reasons. | PathBasedEdgeStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
Yield the obstacles that the item that provided this instance
would add to the scene for the given IPaintContext. | PathBasedEdgeStyleRenderer | ||
[override]
Returns a representation of the visible path of the edge in form of a GeneralPath
| PathBasedEdgeStyleRenderer | ||
Returns an IDisplayObjectCreator for the given path and stroke. | PathBasedEdgeStyleRenderer | ||
Gets an implementation of the IPathGeometry interface that can
handle the provided edge and its associated style. | AbstractEdgeStyleRenderer | ||
getSegmentCount():int [override]
Returns the number of "segments" this edge's path consists of. | PolylineEdgeStyleRenderer | ||
[override]
Calculates the tangent on the edge's path at the given segment and ratio point. | PolylineEdgeStyleRenderer | ||
getSourceArrowAnchor(path:GeneralPath, arrow:IArrow, anchorPoint:IPointSetter, arrowDirection:IPointSetter):Boolean [static] | PathBasedEdgeStyleRenderer | ||
[override]
Calculates the tangent on the edge's path at the given ratio point. | PolylineEdgeStyleRenderer | ||
getTargetArrowAnchor(path:GeneralPath, arrow:IArrow, anchorPoint:IPointSetter, arrowDirection:IPointSetter):Boolean [static] | PathBasedEdgeStyleRenderer | ||
Installs the model in the canvas at the given group using the styleDescriptor. | AbstractStyleRenderer | ||
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean [override]
This method is overridden for performance reasons. | PathBasedEdgeStyleRenderer | ||
[override]
Returns true if the corresponding
item is considered to intersect the given rectangular box.
This method may return false if the item cannot be
selected using a selection marquee or optionally if the
item is only partially contained within the box. | PathBasedEdgeStyleRenderer | ||
[override]
Calls configure and tests the item using the style
for a visible intersection with the clip bounds. | PolylineEdgeStyleRenderer | ||
lookup(type:Class):Object [override]
Implements the ILookup interface. | PolylineEdgeStyleRenderer | ||
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject [override] | PathBasedEdgeStyleRenderer | ||
updatePathDisplayObjectCreator(creator:IDisplayObjectCreator, path:GeneralPath, stroke:IStroke):IDisplayObjectCreator
Updates the given IDisplayObjectCreator for the given path and stroke. | PathBasedEdgeStyleRenderer |
Method | Defined By | ||
---|---|---|---|
configure():void [override]
Prepares this instance for subsequent calls after the
style and item have been initialized. | PathBasedEdgeStyleRenderer | ||
[override]
create simple path using straight lines from the sourceport to the
targetport via the bends. | PolylineEdgeStyleRenderer | ||
Special implementation that will create a self loop path. | PolylineEdgeStyleRenderer | ||
[override]
Factory method for the StyleDescriptor property. | AbstractEdgeStyleRenderer | ||
cropPath(pathToCrop:GeneralPath):void
Crops the edge's path at the nodes. | PathBasedEdgeStyleRenderer | ||
Yields the IAddBridgesCallback to use for adding bridges to the
created path. | PathBasedEdgeStyleRenderer | ||
getSmoothing():Number [override]
Gets the smoothing factor
| PolylineEdgeStyleRenderer | ||
[override]
Calculate and update the anchor and the source arrow's direction vector. | PathBasedEdgeStyleRenderer | ||
getStroke():IStroke [override]
Gets the pen to use for painting the path. | PolylineEdgeStyleRenderer | ||
[override]
Calculate and update the anchor and the target arrow's direction vector. | PathBasedEdgeStyleRenderer | ||
setItem(item:IModelItem):void
Called by the various descriptor getters to initialize the item. | AbstractStyleRenderer | ||
setStyle(style:IVisualStyle):void
Called by the various descriptor getters to initialize the style. | AbstractStyleRenderer |
selfLoopDistance | property |
selfLoopDistance:Number
Gets or sets the distance between the node's layout and its self loop control points.
public function get selfLoopDistance():Number
public function set selfLoopDistance(value:Number):void
stroke | property |
stroke:IStroke
[read-only] Gets the pen to use for painting the path.
protected function get stroke():IStroke
createPath | () | method |
override protected function createPath():GeneralPath
create simple path using straight lines from the sourceport to the targetport via the bends.
ReturnsGeneralPath — the created path
|
createRectangleSelfLoop | () | method |
public static function createRectangleSelfLoop(sx:Number, sy:Number, oppositeX:Number, oppositeY:Number, tx:Number, ty:Number):GeneralPath
Static utility method that creates a rectangular self loop path.
Parameters
sx:Number — The x coordinate of the source port.
| |
sy:Number — The y coordinate of the source port.
| |
oppositeX:Number — The x coordinate of the single control point.
| |
oppositeY:Number — The y coordinate of the single control point.
| |
tx:Number — The x coordinate of the target port.
| |
ty:Number — The y coordinate of the target port.
|
GeneralPath — A path that describes a rectangular self loop.
|
See also
createSelfLoopPath | () | method |
protected function createSelfLoopPath():GeneralPath
Special implementation that will create a self loop path.
ReturnsGeneralPath — edge path as GeneralPath
|
getSegmentCount | () | method |
override public function getSegmentCount():int
Returns the number of "segments" this edge's path consists of.
Returnsint — the number of segments or -1 if there is no such thing as a segment for this edge.
|
getSegmentTangent | () | method |
override public function getSegmentTangent(segment:int, ratio:Number, p:YPoint, t:YPoint):Boolean
Calculates the tangent on the edge's path at the given segment and ratio point.
The result is provided through the given point parameters.
If the method returns false
, no valid result could be calculated and
the values of the point parameters should be ignored.
Parameters
segment:int — the index of the zero-based segment.
| |
ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
| |
p:YPoint — A point in world-coordinate space that denotes the tangent point.
| |
t:YPoint — The vector which is tangent to the edge's path at the point p .
The tangent vector needs not necessarily be normalized.
|
Boolean — true iff the values written to the given points are valid.
|
getSmoothing | () | method |
override protected function getSmoothing():Number
Gets the smoothing factor
ReturnsNumber — The smoothing factor
|
getStroke | () | method |
override protected function getStroke():IStroke
Gets the pen to use for painting the path.
ReturnsIStroke — the stroke or null .
|
getTangent | () | method |
override public function getTangent(ratio:Number, p:YPoint, t:YPoint):Boolean
Calculates the tangent on the edge's path at the given ratio point.
The result is provided through the given point parameters.
If the method returns false
, no valid result could be calculated and
the values of the point parameters should be ignored.
Parameters
ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
| |
p:YPoint — A point in world-coordinate space that denotes the tangent point.
| |
t:YPoint — The vector which is tangent to the edge's path at the point p .
The tangent vector needs not necessarily be normalized.
|
Boolean — true iff the values written to the given points are valid.
|
isVisible | () | method |
override public function isVisible(clip:IRectangle, ctx:ICanvasContext):Boolean
Calls configure
and tests the item
using the style
for a visible intersection with the clip bounds.
This simple implementation uses calculateBounds
to determine the visibility.
Subclasses may choose to override this behavior for improved performance
but need to make sure to call configure
if they depend on a configured instance.
Parameters
clip:IRectangle — The clip bounds
| |
ctx:ICanvasContext — The current canvas context
|
Boolean — true if the item may be painted within the clip bounds.
|
lookup | () | method |
override public function lookup(type:Class):Object
Implements the ILookup
interface.
This method will be used by default if getContext
has been queried for a
lookup implementation.
Note that it cannot be assumed that configure
has already been invoked.
However, normally item
and style
will be correctly configured
if invoked directly after getContext
.
Subclass implementations should make sure to configure this instance before they return this
as a result
of a successful lookup.
Parameters
type:Class — The type to query for
|
Object — An implementation of the given type or null
|