| Package | com.yworks.graph.drawing |
| Class | public class IconLabelStyleRenderer |
| Inheritance | IconLabelStyleRenderer 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 | ||
![]() |
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 | |
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 | ||
[override]
| IconLabelStyleRenderer | ||
| Method | Defined By | ||
|---|---|---|---|
configure():void [override]
| IconLabelStyleRenderer | ||
[override]
| IconLabelStyleRenderer | ||
Factory method that creates the text renderer that draws the textual part of the label. | IconLabelStyleRenderer | ||
Actually paints the content into <0,0> - <width, height>. | IconLabelStyleRenderer | ||
Paints the icon at the given location. | IconLabelStyleRenderer | ||
![]() | 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 | |
| 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
| createStyleDescriptor | () | method |
override protected function createStyleDescriptor():ICanvasObjectDescriptorReturns
ICanvasObjectDescriptor |
| createTextRenderer | () | method |
protected function createTextRenderer():ILabelStyleRendererFactory method that creates the text renderer that draws the textual part of the label.
ReturnsILabelStyleRenderer — A new SimpleLabelStyleRenderer
|
See also
| getPreferredSize | () | method |
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 |
| paint | () | method |
override public function paint(g:YGraphics, ctx:IPaintContext):void
Parameters
g:YGraphics | |
ctx:IPaintContext |
| paintContent | () | method |
protected function paintContent(g:YGraphics, ctx:IPaintContext, width:Number, height:Number):voidActually paints the content into <0,0> - <width, height>.
Parameters
g:YGraphics — The preconfigured graphics context
| |
ctx:IPaintContext — The paint context to use.
| |
width:Number — The width of the painting area.
| |
height:Number — The height of the painting area.
|
| paintIcon | () | method |
protected function paintIcon(g:YGraphics, ctx:IPaintContext, x:Number, y:Number):voidPaints the icon at the given location.
Parameters
g:YGraphics — The preconfigured graphics context.
| |
ctx:IPaintContext — The paint context to use.
| |
x:Number — The x location where to paint the icon in the graphics context.
| |
y:Number — The y location where to paint the icon in the graphics context.
|