| Package | com.yworks.graph.drawing |
| Class | public class CSSLabelStyle |
| Inheritance | CSSLabelStyle Object |
| Implements | ICSSLabelStyle |
ICSSLabelStyle
interface. A basic label style which can be styled via CSS sheets.
The following style properties determine the label's border and background
| CSS property | ActionScript property | Usage and supported values |
| background-color | backgroundColor | The color of the label box's background. Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000. If this property is omitted, no background is drawn. |
| background-alpha | backgroundAlpha | If the background-color property is not specified, this property is ignored. |
| border-color | borderColor | The color of the label box's border. Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000. If this property is omitted, no border is drawn. |
styleName
property.
See also
| Property | Defined By | ||
|---|---|---|---|
| backgroundFill : IFill
Gets the fill to use for the background box of the label or null
| CSSLabelStyle | ||
| backgroundStroke : IStroke
Gets the pen to use for the background box of the label or null
| CSSLabelStyle | ||
| clipText : Boolean
Whether text should be clipped. | CSSLabelStyle | ||
| styleName : String
The style class which is used by default. | CSSLabelStyle | ||
| styleRenderer : IStyleRenderer [read-only]
Gets the renderer implementation that has been supplied to
this instance upon creation. | CSSLabelStyle | ||
| styleSheet : StyleSheet
The style sheet. | CSSLabelStyle | ||
| styleSheetUrl : String
The URL to load the style sheet from. | CSSLabelStyle | ||
| Method | Defined By | ||
|---|---|---|---|
CSSLabelStyle(renderer:ILabelStyleRenderer = null, styleSheet:StyleSheet = null)
Creates a new instance with the given renderer and the given style sheet. | CSSLabelStyle | ||
clone():Object
Creates a clone of this instance. | CSSLabelStyle | ||
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | CSSLabelStyle | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance of CSSLabelStyle. | CSSLabelStyle | ||
| 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:BooleanWhether text should be clipped.
public function get clipText():Boolean public function set clipText(value:Boolean):void| loader | property |
loader:URLLoader [read-only] yworks_internal function get loader():URLLoader| styleName | property |
styleName:StringThe style class which is used by default.
The styles background-color, background-alpha,
border-color and clip-text will be searched in this class.
The style name has to be set as declared, i.e. with a starting period (".") if it is declared as a class selector.
public function get styleName():String public function set styleName(value:String):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| styleSheet | property |
styleSheet:StyleSheetThe style sheet.
public function get styleSheet():StyleSheet public function set styleSheet(value:StyleSheet):void| styleSheetUrl | property |
styleSheetUrl:StringThe URL to load the style sheet from.
public function get styleSheetUrl():String public function set styleSheetUrl(value:String):void| CSSLabelStyle | () | Constructor |
public function CSSLabelStyle(renderer:ILabelStyleRenderer = null, styleSheet:StyleSheet = null)Creates a new instance with the given renderer and the given style sheet.
Parametersrenderer:ILabelStyleRenderer (default = null) — The renderer to use with this label style. If none is provided
a new CSSLabelStyleRenderer will be used.
| |
styleSheet:StyleSheet (default = null) — The style sheet to use. If none is provided, the styleSheetUrl
or the styleSheet properties have to be set explicitly.
|
| clone | () | method |
public function clone():ObjectCreates a clone of this instance.
ReturnsObject — A clone of this instance.
|
| createClone | () | method |
protected function createClone():CSSLabelStyleCreates a new instance of CSSLabelStyle.
ReturnsCSSLabelStyle — A new instance of CSSLabelStyle.
|
| 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.
|