Packagecom.yworks.graph.drawing.compat
Classpublic class JavaGenericNodeStyleWrapper
InheritanceJavaGenericNodeStyleWrapper Inheritance JavaGenericNodeStyle Inheritance AbstractJavaNodeStyle Inheritance Object

A JavaGenericNodeStyle implementation which wraps an existing node style into a generic node style.

This class can be used to handle GenericNodeRealizer which can be represented by an existing node style, e.g. a Realizer which uses a BevelNodePainter can be emulated with a BevelNodeStyle.

It is possible to use this class without subclassing it. However, in some cases the style's properties correspond to some realizer related properties. For example: The BevelNodeStyle's color property has to be set depending on the fillColor property of the realizer. In this case, one has to subclass this class and override the fillColor setter to set the color property of the wrapped BevelNodeStyle, too.



Public Properties
 PropertyDefined By
 Inheritedconfiguration : String
The name of the configuration.
JavaGenericNodeStyle
 InheriteddropShadowEnabled : Boolean
Whether a drop shadow should be drawn.
JavaGenericNodeStyle
 InheriteddropShadowFilters : Array
An array of filters which will be used to draw the drop shadow.
JavaGenericNodeStyle
 InheritedfillColor : SolidColor
The style's fill color
AbstractJavaNodeStyle
 InheritedfillColor2 : SolidColor
The style's second gradient fill color
AbstractJavaNodeStyle
 InheritedlineType : LineType
The style's line type.
AbstractJavaNodeStyle
 InheritedstyleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
AbstractJavaNodeStyle
 Inheritedtransparent : Boolean
Gets or sets the transparent property.
AbstractJavaNodeStyle
  wrapped : IVisualStyle
[read-only] The wrapped style.
JavaGenericNodeStyleWrapper
Public Methods
 MethodDefined By
  
JavaGenericNodeStyleWrapper(wrapped:INodeStyle = null, styleRenderer:JavaNodeStyleRenderer = null)
Creates a new instance using the given style and the given renderer.
JavaGenericNodeStyleWrapper
 Inherited
clone():Object
[override] Creates a clone of this instance.
JavaGenericNodeStyle
 Inherited
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.
AbstractJavaNodeStyle
Protected Methods
 MethodDefined By
  
[override] Creates new instance with a clone of the wrapped style and the styleRenderer.
JavaGenericNodeStyleWrapper
  
[override] Creates an instance of JavaGenericNodeStyleWrapperRenderer.
JavaGenericNodeStyleWrapper
  
Creates a wrapped style.
JavaGenericNodeStyleWrapper
Property Detail
wrappedproperty
wrapped:IVisualStyle  [read-only]

The wrapped style.


Implementation
    public function get wrapped():IVisualStyle
Constructor Detail
JavaGenericNodeStyleWrapper()Constructor
public function JavaGenericNodeStyleWrapper(wrapped:INodeStyle = null, styleRenderer:JavaNodeStyleRenderer = null)

Creates a new instance using the given style and the given renderer.

Parameters
wrapped:INodeStyle (default = null) — The style to wrap. If none is provided, it will be created using the createStyle() method. If the createStyle() method is not overridden this parameter must not be null
 
styleRenderer:JavaNodeStyleRenderer (default = null) — A renderer which can handle this style or a new instance of JavaGenericNodeStyleWrapperRenderer which is created by the createRenderer() method.
Method Detail
createClone()method
override protected function createClone():AbstractJavaNodeStyle

Creates new instance with a clone of the wrapped style and the styleRenderer.

Subclasses have to override this method to return a new instance of them.

Returns
AbstractJavaNodeStyle
createRenderer()method 
override protected function createRenderer():JavaNodeStyleRenderer

Creates an instance of JavaGenericNodeStyleWrapperRenderer.

It is not necessary to override this method if the wrapped style should be drawn "as is", i.e. like it would be drawn if not wrapped.

Returns
JavaNodeStyleRenderer

See also

createStyle()method 
protected function createStyle():INodeStyle

Creates a wrapped style.

Subclasses must override this method unless they provide a style instance in the constructor.

Returns
INodeStyle