Package | com.yworks.graph.drawing |
Class | public class IconLabelStyle |
Inheritance | IconLabelStyle Object |
Implements | IIconLabelStyle, IIconLabelStyleDecorator |
IIconLabelStyle
interface.
This implementation is actually an IIconLabelStyleDecorator
which
wraps a SimpleLabelStyle
for rendering the text part of the label.
See also
Property | Defined By | ||
---|---|---|---|
autoFlip : Boolean
The autoFlip parameter. | IconLabelStyle | ||
backgroundFill : IFill
Gets the fill to use for the background box of the label or null
| IconLabelStyle | ||
backgroundStroke : IStroke
Gets the pen to use for the background box of the label or null
| IconLabelStyle | ||
clipText : Boolean
Gets a value that determines whether text should be clipped. | IconLabelStyle | ||
icon : IIcon
The icon display object that is used for the associated node. | IconLabelStyle | ||
iconPlacement : ILabelModelParameter
The icon placement model parameter. | IconLabelStyle | ||
normalizeBrushes : Boolean
Whether the brushes should be normalized. | IconLabelStyle | ||
styleRenderer : IStyleRenderer [read-only]
Gets the renderer implementation that has been supplied to
this instance upon creation. | IconLabelStyle | ||
textFormat : UITextFormat
Gets the text format used to format the text on a label drawn with this style. | IconLabelStyle |
Method | Defined By | ||
---|---|---|---|
IconLabelStyle(iconPlacement:ILabelModelParameter, icon:IIcon = null, renderer:ILabelStyleRenderer = null, textFormat:UITextFormat = null)
Creates a new instance using the provided parameters. | IconLabelStyle | ||
clone():Object
Creates a clone of this instance. | IconLabelStyle | ||
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | IconLabelStyle |
Method | Defined By | ||
---|---|---|---|
Callback that creates the cloned instance for the clone() method. | IconLabelStyle |
autoFlip | property |
autoFlip:Boolean
The autoFlip parameter.
The default value is true
.
public function get autoFlip():Boolean
public function set autoFlip(value:Boolean):void
backgroundFill | property |
backgroundFill:IFill
Gets the fill to use for the background box of the label or null
public function get backgroundFill():IFill
public function set backgroundFill(value:IFill):void
backgroundStroke | property |
backgroundStroke:IStroke
Gets the pen to use for the background box of the label or null
public function get backgroundStroke():IStroke
public function set backgroundStroke(value:IStroke):void
clipText | property |
clipText:Boolean
Gets a value that determines whether text should be clipped.
public function get clipText():Boolean
public function set clipText(value:Boolean):void
icon | property |
icon:IIcon
The icon display object that is used for the associated node.
public function get icon():IIcon
public function set icon(value:IIcon):void
iconPlacement | property |
iconPlacement:ILabelModelParameter
The icon placement model parameter.
All valid node label model parameters can be used. The label's layout will be interpreted as the node's layout and the icon will be placed relative to that layout as if it was a node's label, e.g.
label.iconPlacement = ExteriorLabelModel.west;will place the icon left to the label.
public function get iconPlacement():ILabelModelParameter
public function set iconPlacement(value:ILabelModelParameter):void
normalizeBrushes | property |
normalizeBrushes:Boolean
Whether the brushes should be normalized.
The default value is true
.
public function get normalizeBrushes():Boolean
public function set normalizeBrushes(value:Boolean):void
styleRenderer | property |
styleRenderer:IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
public function get styleRenderer():IStyleRenderer
textFormat | property |
textFormat:UITextFormat
Gets the text format used to format the text on a label drawn with this style.
public function get textFormat():UITextFormat
public function set textFormat(value:UITextFormat):void
IconLabelStyle | () | Constructor |
public function IconLabelStyle(iconPlacement:ILabelModelParameter, icon:IIcon = null, renderer:ILabelStyleRenderer = null, textFormat:UITextFormat = null)
Creates a new instance using the provided parameters.
ParametersiconPlacement:ILabelModelParameter — the icon to draw.
| |
icon:IIcon (default = null ) — the placement of the icon relative to the text. This must be
a node label model parameter, e.g. ExteriorLabelStyle.west .
| |
renderer:ILabelStyleRenderer (default = null ) — the renderer to use. If none is provided, a new instance of IconLabelStyleRenderer is used.
| |
textFormat:UITextFormat (default = null ) — the textFormat to use
|
clone | () | method |
public function clone():Object
Creates a clone of this instance.
ReturnsObject — A clone of this instance.
|
createClone | () | method |
protected function createClone():IconLabelStyle
Callback that creates the cloned instance for the clone() method.
ReturnsIconLabelStyle — A clone of this instance.
|
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.
|
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.
|