Package | com.yworks.graph.drawing.compat |
Class | public class JavaGenericNodeStyleWrapper |
Inheritance | JavaGenericNodeStyleWrapper JavaGenericNodeStyle AbstractJavaNodeStyle Object |
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.
Property | Defined By | ||
---|---|---|---|
configuration : String
The name of the configuration. | JavaGenericNodeStyle | ||
dropShadowEnabled : Boolean
Whether a drop shadow should be drawn. | JavaGenericNodeStyle | ||
dropShadowFilters : Array
An array of filters which will be used to draw the drop shadow. | JavaGenericNodeStyle | ||
fillColor : SolidColor
The style's fill color
| AbstractJavaNodeStyle | ||
fillColor2 : SolidColor
The style's second gradient fill color
| AbstractJavaNodeStyle | ||
lineType : LineType
The style's line type. | AbstractJavaNodeStyle | ||
styleRenderer : IStyleRenderer [read-only]
Gets the renderer implementation that has been supplied to
this instance upon creation. | AbstractJavaNodeStyle | ||
transparent : Boolean
Gets or sets the transparent property. | AbstractJavaNodeStyle | ||
wrapped : IVisualStyle [read-only]
The wrapped style. | JavaGenericNodeStyleWrapper |
Method | Defined By | ||
---|---|---|---|
Creates a new instance using the given style and the given renderer. | JavaGenericNodeStyleWrapper | ||
clone():Object [override]
Creates a clone of this instance. | JavaGenericNodeStyle | ||
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | AbstractJavaNodeStyle |
Method | Defined 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 |
wrapped | property |
wrapped:IVisualStyle
[read-only] The wrapped style.
public function get wrapped():IVisualStyle
JavaGenericNodeStyleWrapper | () | Constructor |
public function JavaGenericNodeStyleWrapper(wrapped:INodeStyle = null, styleRenderer:JavaNodeStyleRenderer = null)
Creates a new instance using the given style and the given renderer.
Parameterswrapped: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.
|
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.
ReturnsAbstractJavaNodeStyle |
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.
ReturnsJavaNodeStyleRenderer |
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.
ReturnsINodeStyle |