Package | com.yworks.graph.drawing |
Class | public class IconLabelStyleRenderer |
Inheritance | IconLabelStyleRenderer AbstractLabelStyleRenderer AbstractStyleRenderer Object |
Implements | ILabelStyleRenderer |
IStyleRenderer
that can handle IIconLabelStyleDecorator
instances.
This implementation paints the label's text and an icon.
See also
Method | Defined By | ||
---|---|---|---|
Creates a new instance of this renderer. | IconLabelStyleRenderer | ||
[override]
| IconLabelStyleRenderer | ||
createDisplayObject(context:IDisplayObjectContext):DisplayObject [override] | IconLabelStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
Configures the style and item parameters,
does not call configure and returns this. | AbstractStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
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 | ||
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 | ||
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 |
Method | Defined By | ||
---|---|---|---|
Calculates the preferred size given the current state of the renderer. | AbstractLabelStyleRenderer | ||
configure():void [override]
| IconLabelStyleRenderer | ||
createIconDisplayObject(ctx:IDisplayObjectContext):DisplayObject
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 | ||
isAutoFlip():Boolean
Determines whether the label's style should automatically flip the painting contents if the
layout is upside down. | AbstractLabelStyleRenderer | ||
setItem(item:IModelItem):void
Called by the various descriptor getters to initialize the item. | AbstractStyleRenderer | ||
setStyle(style:IVisualStyle):void
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 | ||
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 |
IconLabelStyleRenderer | () | Constructor |
public function IconLabelStyleRenderer()
Creates a new instance of this renderer.
calculateBounds | () | method |
override public function calculateBounds(scratch:IMutableRectangle, ctx:ICanvasContext):IRectangle
Parameters
scratch:IMutableRectangle | |
ctx:ICanvasContext |
IRectangle |
configure | () | method |
override protected function configure():void
createDisplayObject | () | method |
override public function createDisplayObject(context:IDisplayObjectContext):DisplayObject
Parameters
context:IDisplayObjectContext |
DisplayObject |
createIconDisplayObject | () | method |
protected function createIconDisplayObject(ctx:IDisplayObjectContext):DisplayObject
Creates a display object for the icon.
Parameters
ctx:IDisplayObjectContext — The context to use.
|
DisplayObject |
createStyleDescriptor | () | method |
override protected function createStyleDescriptor():ICanvasObjectDescriptor
Returns
ICanvasObjectDescriptor |
getIconPlacement | () | method |
protected function getIconPlacement():ILabelModelParameter
Retrieves the iconPlacement
from the style.
ILabelModelParameter |
See also
getIconSize | () | method |
protected function getIconSize():ISize
Retrieves the size from the style's icon.
ReturnsISize |
See also
getInnerStyle | () | method |
protected function getInnerStyle():ILabelStyle
Retrieves the innerStyle
from the style.
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 .
|
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 |
Boolean |
isInBox | () | method |
override public function isInBox(box:IRectangle, ctx:ICanvasContext):Boolean
Parameters
box:IRectangle | |
ctx:ICanvasContext |
Boolean |
lookup | () | method |
override public function lookup(type:Class):Object
Parameters
type:Class |
Object |
updateDisplayObject | () | method |
override public function updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Parameters
oldDisplayObject:DisplayObject | |
context:IDisplayObjectContext |
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.
|
DisplayObject |