Packagecom.yworks.graph.drawing
Classpublic class IconLabelStyleRenderer
InheritanceIconLabelStyleRenderer Inheritance AbstractLabelStyleRenderer Inheritance AbstractStyleRenderer Inheritance Object
Implements ILabelStyleRenderer

An IStyleRenderer that can handle IIconLabelStyleDecorator instances.

This implementation paints the label's text and an icon.

See also

IconLabelStyle
IconLabelStyleDecorator
IIconLabelStyleDecorator
com.yworks.graph.drawing.IStyleRenderer


Public Properties
 PropertyDefined By
 Inheriteditem : IModelItem
[read-only] Gets the currently configured item.
AbstractStyleRenderer
 Inheritedlayout : IOrientedRectangle
[read-only] Retrieves the current layout.
AbstractLabelStyleRenderer
 Inheritedstyle : IVisualStyle
[read-only] Gets the currently configured style.
AbstractStyleRenderer
 InheritedstyleDescriptor : ICanvasObjectDescriptor
[read-only] Gets the ICanvasObjectDescriptor to use for new installations.
AbstractStyleRenderer
Protected Properties
 PropertyDefined By
 Inherited_layout : IOrientedRectangle
Holds the layout of the current label.
AbstractLabelStyleRenderer
Public Methods
 MethodDefined By
  
Creates a new instance of this renderer.
IconLabelStyleRenderer
  
[override]
IconLabelStyleRenderer
  
[override]
IconLabelStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, does not call configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
 Inherited
Configures the style and item parameters, calls configure and returns this.
AbstractStyleRenderer
  
[override] Calculates the ILabel.preferredSize of a given label using the associated style.
IconLabelStyleRenderer
 Inherited
install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
Installs the model in the canvas at the given group using the styleDescriptor.
AbstractStyleRenderer
  
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
[override]
IconLabelStyleRenderer
  
[override]
IconLabelStyleRenderer
 Inherited
Calls configure and tests the item using the style for a visible intersection with the clip bounds.
AbstractStyleRenderer
  
lookup(type:Class):Object
[override]
IconLabelStyleRenderer
  
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
[override]
IconLabelStyleRenderer
Protected Methods
 MethodDefined By
 Inherited
Calculates the preferred size given the current state of the renderer.
AbstractLabelStyleRenderer
  
configure():void
[override]
IconLabelStyleRenderer
  
Creates a display object for the icon.
IconLabelStyleRenderer
  
[override]
IconLabelStyleRenderer
  
Retrieves the iconPlacement from the style.
IconLabelStyleRenderer
  
Retrieves the size from the style's icon.
IconLabelStyleRenderer
  
Retrieves the innerStyle from the style.
IconLabelStyleRenderer
 Inherited
isAutoFlip():Boolean
Determines whether the label's style should automatically flip the painting contents if the layout is upside down.
AbstractLabelStyleRenderer
 Inherited
setItem(item:IModelItem):void
Called by the various descriptor getters to initialize the item.
AbstractStyleRenderer
 Inherited
Called by the various descriptor getters to initialize the style.
AbstractStyleRenderer
  
updateIconDisplayObject(oldDisplayObject:DisplayObject, ctx:IDisplayObjectContext):DisplayObject
Updates the display object for the icon.
IconLabelStyleRenderer
 Inherited
updateLayout(obj:DisplayObject, context:IDisplayObjectContext, theLayout:IOrientedRectangle = null):void
Arranges the provided display object using either the layout of the currently configured label, or using the provided rectangle.
AbstractLabelStyleRenderer
Constructor Detail
IconLabelStyleRenderer()Constructor
public function IconLabelStyleRenderer()

Creates a new instance of this renderer.

Method Detail
calculateBounds()method
override public function calculateBounds(scratch:IMutableRectangle, ctx:ICanvasContext):IRectangle

Parameters

scratch:IMutableRectangle
 
ctx:ICanvasContext

Returns
IRectangle
configure()method 
override protected function configure():void

createDisplayObject()method 
override public function createDisplayObject(context:IDisplayObjectContext):DisplayObject

Parameters

context:IDisplayObjectContext

Returns
DisplayObject
createIconDisplayObject()method 
protected function createIconDisplayObject(ctx:IDisplayObjectContext):DisplayObject

Creates a display object for the icon.

Parameters

ctx:IDisplayObjectContext — The context to use.

Returns
DisplayObject
createStyleDescriptor()method 
override protected function createStyleDescriptor():ICanvasObjectDescriptor

Returns
ICanvasObjectDescriptor
getIconPlacement()method 
protected function getIconPlacement():ILabelModelParameter

Retrieves the iconPlacement from the style.

Returns
ILabelModelParameter

See also

getIconSize()method 
protected function getIconSize():ISize

Retrieves the size from the style's icon.

Returns
ISize

See also

getInnerStyle()method 
protected function getInnerStyle():ILabelStyle

Retrieves the innerStyle from the style.

Returns
ILabelStyle

See also

getPreferredSize()method 
override public function getPreferredSize(label:ILabel, style:ILabelStyle):ISize

Calculates the ILabel.preferredSize of a given label using the associated style.

Parameters

label:ILabel — The label to determine the preferred size for
 
style:ILabelStyle — The style instance that uses this instance as its ILabelStyle.styleRenderer.

Returns
ISize — A size that can be used as the ILabel.preferredSize if this renderer paints the label using the associated style. May return null if there is no such thing like a preferred size for this style.
isHit()method 
override public function isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean

Parameters

x:Number
 
y:Number
 
ctx:ICanvasContext

Returns
Boolean
isInBox()method 
override public function isInBox(box:IRectangle, ctx:ICanvasContext):Boolean

Parameters

box:IRectangle
 
ctx:ICanvasContext

Returns
Boolean
lookup()method 
override public function lookup(type:Class):Object

Parameters

type:Class

Returns
Object
updateDisplayObject()method 
override public function updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject

Parameters

oldDisplayObject:DisplayObject
 
context:IDisplayObjectContext

Returns
DisplayObject
updateIconDisplayObject()method 
protected function updateIconDisplayObject(oldDisplayObject:DisplayObject, ctx:IDisplayObjectContext):DisplayObject

Updates the display object for the icon.

Parameters

oldDisplayObject:DisplayObject — The display object to update.
 
ctx:IDisplayObjectContext — The paint context to use.

Returns
DisplayObject