Packagecom.yworks.graph.drawing
Classpublic class ShapeNodeStyleRenderer
InheritanceShapeNodeStyleRenderer Inheritance AbstractNodeStyleRenderer Inheritance AbstractStyleRenderer

Default renderer implementation that can be used for IShapeNodeStyle instances.



Public Properties
 PropertyDefined by
  brightenHighlightBy : Number
The value to brighten the stroke color by when drawing border highlights.
ShapeNodeStyleRenderer
  darkenShadowBy : Number
The value to darken the stroke color by when drawing border shadows.
ShapeNodeStyleRenderer
 Inheriteditem : IModelItem
Gets the currently configured item.
AbstractStyleRenderer
 Inheritedlayout : IRectangle
Returns the INode.layout of the node this renderer is currently configured for.
AbstractNodeStyleRenderer
  roundRectEllipseHeight : Number
Get or set the default ellipse height used for drawing rounded corners.
ShapeNodeStyleRenderer
  roundRectEllipseWidth : Number
Get or set the default ellipse width used for drawing rounded corners.
ShapeNodeStyleRenderer
 Inheritedstyle : IVisualStyle
Gets the currently configured style.
AbstractStyleRenderer
 InheritedstyleDescriptor : ICanvasObjectDescriptor
Gets the ICanvasObjectDescriptor to use for new installations.
AbstractStyleRenderer
Protected Properties
 PropertyDefined by
  fill : IFill
[read-only] Get the fill that is currently used by this renderer.
ShapeNodeStyleRenderer
 Inherited_nodeStyleDescriptor : ICanvasObjectDescriptor
AbstractNodeStyleRenderer
  shape : uint
[read-only] Get the shape that is currently used by this renderer.
ShapeNodeStyleRenderer
  stroke : IStroke
[read-only] Get the stroke that is currently used by this renderer.
ShapeNodeStyleRenderer
Public Methods
 MethodDefined by
 Inherited
Returns a tight rectangular area where the whole rendering would fit into.
AbstractNodeStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, does not call configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
  
getIntersection(innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersectionPoint:IPointSetter):Boolean
Returns the intersection for the given line with this shape's geometry.
ShapeNodeStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
  
ShapeNodeStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractNodeStyleRenderer
 Inherited
install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
Installs the model in the canvas at the given group using the styleDescriptor.
AbstractStyleRenderer
  
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
Determines if something has been hit at the given coordinates in the world coordinate system.
ShapeNodeStyleRenderer
 Inherited
isInBox(box:IRectangle, ctx:ICanvasContext):Boolean
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.
AbstractNodeStyleRenderer
  
isInside(x:Number, y:Number):Boolean
Checks whether the given coordinate is deemed to lie within the shape's geometric bounds.
ShapeNodeStyleRenderer
 Inherited
isVisible(clip:IRectangle, ctx:ICanvasContext):Boolean
Calls configure and tests the item using the style for a visible intersection with the clip bounds.
AbstractStyleRenderer
  
lookup(type:Class):Object
Implements the ILookup interface.
ShapeNodeStyleRenderer
  
paint(g:YGraphics, ctx:IPaintContext):void
Performs the actual painting into the given graphics context.
ShapeNodeStyleRenderer
Protected Methods
 MethodDefined by
  
configure():void
This is an empty implementation of the AbstractStyleRenderer.configure method.
ShapeNodeStyleRenderer
 Inherited
Factory method for the StyleDescriptor property.
AbstractNodeStyleRenderer
 Inherited
setItem(item:IModelItem):void
Called by the various descriptor getters to initialize the item.
AbstractStyleRenderer
 Inherited
setStyle(style:IVisualStyle):void
Called by the various descriptor getters to initialize the style.
AbstractStyleRenderer
Property detail
brightenHighlightByproperty
brightenHighlightBy:Number  [read-write]

The value to brighten the stroke color by when drawing border highlights.

Valid values are between 0 and 100.

The default value is 50.

Implementation
    public function get brightenHighlightBy():Number
    public function set brightenHighlightBy(value:Number):void
darkenShadowByproperty 
darkenShadowBy:Number  [read-write]

The value to darken the stroke color by when drawing border shadows.

Valid values are between 0 and 100.

The default value is 50.

Implementation
    public function get darkenShadowBy():Number
    public function set darkenShadowBy(value:Number):void
fillproperty 
fill:IFill  [read-only]

Get the fill that is currently used by this renderer.

This implementation retrieves the fill from the owning style.

Implementation
    protected function get fill():IFill
roundRectEllipseHeightproperty 
roundRectEllipseHeight:Number  [read-write]

Get or set the default ellipse height used for drawing rounded corners.

Implementation
    public function get roundRectEllipseHeight():Number
    public function set roundRectEllipseHeight(value:Number):void
roundRectEllipseWidthproperty 
roundRectEllipseWidth:Number  [read-write]

Get or set the default ellipse width used for drawing rounded corners.

Implementation
    public function get roundRectEllipseWidth():Number
    public function set roundRectEllipseWidth(value:Number):void
shapeproperty 
shape:uint  [read-only]

Get the shape that is currently used by this renderer.

This implementation retrieves the shape from the owning style.

Implementation
    protected function get shape():uint
strokeproperty 
stroke:IStroke  [read-only]

Get the stroke that is currently used by this renderer.

This implementation retrieves the stroke from the owning style.

Implementation
    protected function get stroke():IStroke
Method detail
configure()method
protected override function configure():void

This is an empty implementation of the AbstractStyleRenderer.configure method. Subclasses should override this.

getIntersection()method 
public override function getIntersection(innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersectionPoint:IPointSetter):Boolean

Returns the intersection for the given line with this shape's geometry.

Parameters
innerX:Number — The X coordinate of the first point of the line that is inside the shape.
 
innerY:Number — The Y coordinate of the first point of the line that is inside the shape.
 
outerX:Number — The X coordinate of the second point of the line that is outside the shape.
 
outerY:Number — The Y coordinate of the second point of the line that is outside the shape.
 
intersectionPoint:IPointSetter — The intersection point that is set if this method returns true.

Returns
Boolean — Whether an intersection was found.
getOutline()method 
public override function getOutline():GeneralPath

Returns
GeneralPath
isHit()method 
public override function isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean

Determines if something has been hit at the given coordinates in the world coordinate system.

Parameters
x:Number — the x-coordinate in world coordinate system
 
y:Number — the y-coordinate in world coordinate system
 
ctx:ICanvasContext — the context the hit test is performed in

Returns
Boolean — whether something has been hit
isInside()method 
public override function isInside(x:Number, y:Number):Boolean

Checks whether the given coordinate is deemed to lie within the shape's geometric bounds.

Parameters
x:Number — The x coordinate to test.
 
y:Number — The y coordinate to test.

Returns
Boolean — True if the point lies within the shape.
lookup()method 
public override 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

Returns
Object — An implementation of the given type or null
paint()method 
public override function paint(g:YGraphics, ctx:IPaintContext):void

Performs the actual painting into the given graphics context.

Parameters
g:YGraphics — The graphics context to paint into
 
ctx:IPaintContext — Currently not used