Packagecom.yworks.graph.drawing
Classpublic class IconLabelStyle
InheritanceIconLabelStyle Inheritance Object
Implements IIconLabelStyle, IIconLabelStyleDecorator

The default mutable implementation of the IIconLabelStyle interface.

This implementation is actually an IIconLabelStyleDecorator which wraps a SimpleLabelStyle for rendering the text part of the label.

See also

IIconLabelStyle


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
  
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.
IconLabelStyle
Protected Methods
 MethodDefined By
  
Callback that creates the cloned instance for the clone() method.
IconLabelStyle
Property Detail
autoFlipproperty
autoFlip:Boolean

The autoFlip parameter.

The default value is true.


Implementation
    public function get autoFlip():Boolean
    public function set autoFlip(value:Boolean):void
backgroundFillproperty 
backgroundFill:IFill

Gets the fill to use for the background box of the label or null


Implementation
    public function get backgroundFill():IFill
    public function set backgroundFill(value:IFill):void
backgroundStrokeproperty 
backgroundStroke:IStroke

Gets the pen to use for the background box of the label or null


Implementation
    public function get backgroundStroke():IStroke
    public function set backgroundStroke(value:IStroke):void
clipTextproperty 
clipText:Boolean

Gets a value that determines whether text should be clipped.


Implementation
    public function get clipText():Boolean
    public function set clipText(value:Boolean):void
iconproperty 
icon:IIcon

The icon display object that is used for the associated node.


Implementation
    public function get icon():IIcon
    public function set icon(value:IIcon):void
iconPlacementproperty 
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.


Implementation
    public function get iconPlacement():ILabelModelParameter
    public function set iconPlacement(value:ILabelModelParameter):void
normalizeBrushesproperty 
normalizeBrushes:Boolean

Whether the brushes should be normalized.

The default value is true.


Implementation
    public function get normalizeBrushes():Boolean
    public function set normalizeBrushes(value:Boolean):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
textFormatproperty 
textFormat:UITextFormat

Gets the text format used to format the text on a label drawn with this style.


Implementation
    public function get textFormat():UITextFormat
    public function set textFormat(value:UITextFormat):void
Constructor Detail
IconLabelStyle()Constructor
public function IconLabelStyle(iconPlacement:ILabelModelParameter, icon:IIcon = null, renderer:ILabelStyleRenderer = null, textFormat:UITextFormat = null)

Creates a new instance using the provided parameters.

Parameters
iconPlacement: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
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():IconLabelStyle

Callback that creates the cloned instance for the clone() method.

Returns
IconLabelStyle — 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.

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.