Packagecom.yworks.graph.drawing
Classpublic class PanelNodeStyle
InheritancePanelNodeStyle Inheritance Object
Implements IPanelNodeStyle

Simple basic implementation of the IPanelNodeStyle that is used by the PanelNodeStyleRenderer node style renderer implementation.

See also

IPanelNodeStyle
PanelNodeStyleRenderer


Public Properties
 PropertyDefined By
  color : uint
The base color to use (as RGB).
PanelNodeStyle
  dropShadow : Boolean
Whether to draw a drop shadow.
PanelNodeStyle
  insets : Rectangle
Provides the insets for the given item.
PanelNodeStyle
  labelInsetsColor : uint
The base color to use for drawing the label insets background (as RGB).
PanelNodeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
PanelNodeStyle
Public Methods
 MethodDefined By
  
PanelNodeStyle(color:uint = 0x000000, labelInsetsColor:uint = 0xC0C0C0, insets:Rectangle = null, renderer:PanelNodeStyleRenderer = null)
Creates a new instance using the given parameter.
PanelNodeStyle
  
clone():Object
Creates a clone of this instance.
PanelNodeStyle
  
install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
Prepares the rendering of an IModelItem in a CanvasComponent by adding ICanvasObject's to the provided canvas.
PanelNodeStyle
Protected Methods
 MethodDefined By
  
createClone():Object
PanelNodeStyle
Property Detail
colorproperty
color:uint

The base color to use (as RGB).


Implementation
    public function get color():uint
    public function set color(value:uint):void
dropShadowproperty 
dropShadow:Boolean

Whether to draw a drop shadow.


Implementation
    public function get dropShadow():Boolean
    public function set dropShadow(value:Boolean):void
insetsproperty 
insets:Rectangle

Provides the insets for the given item.

The insets are described as a rectangle interpreded as (left, top, right,bottom).

The PanelNodeStyleRenderer will use these insets and return them via an IInsetsProvider if such an instance is queried through the context lookup.

The default value is (5,5,5,5).


Implementation
    public function get insets():Rectangle
    public function set insets(value:Rectangle):void
labelInsetsColorproperty 
labelInsetsColor:uint

The base color to use for drawing the label insets background (as RGB).

Setting this to uint.MAX_VALUE effectively disables label insets background coloring.


Implementation
    public function get labelInsetsColor():uint
    public function set labelInsetsColor(value:uint):void
styleRendererproperty 
styleRenderer:IStyleRenderer  [read-only]

Gets the renderer implementation that has been supplied to this instance upon creation.


Implementation
    public function get styleRenderer():IStyleRenderer
Constructor Detail
PanelNodeStyle()Constructor
public function PanelNodeStyle(color:uint = 0x000000, labelInsetsColor:uint = 0xC0C0C0, insets:Rectangle = null, renderer:PanelNodeStyleRenderer = null)

Creates a new instance using the given parameter.

Parameters
color:uint (default = 0x000000) — The background color.
 
labelInsetsColor:uint (default = 0xC0C0C0) — The color for the label insets. Setting this to uint.MAX_VALUE effectively disables label insets background coloring.
 
insets:Rectangle (default = null) — The insets as a rectangle.
 
renderer:PanelNodeStyleRenderer (default = null) — The renderer to use with this style.
Method Detail
clone()method
public function clone():Object

Creates a clone of this instance.

Returns
Object — A clone of this instance.
createClone()method 
protected function createClone():Object

Returns
Object
install()method 
public function install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array

Prepares the rendering of an IModelItem in a CanvasComponent by adding ICanvasObject's to the provided canvas.

Implementations may add zero or more ICanvasObject instances to the given CanvasComponent. The group parameter can be used as a hint for implementations. They can add their newly created canvas objects to the given group. However they are not obliged to do that.

Parameters

canvas:CanvasComponent — The canvas to install the canvas objects in.
 
group:ICanvasObjectGroup — A hint that tells the implementation where to add the canvas objects.
 
modelItem:IModelItem — The item to install a visual representation for.

Returns
Array — An array of zero or more canvas objects that have been installed in the canvas by this method or null if nothing was installed.