Packageorg.juicekit.flare.vis.label
Classpublic class Labels
InheritanceLabels Inheritance flare.vis.operator.Operator

A LabelLayout places text labels using a DataSprite data property for the text value and DataSprite x and y coordinates to position the text rendering. The rendered text labels are positioned within the DataSprite's coordinates.



Public Properties
 PropertyDefined by
  colorStrategy : String = "blackwhite"
Store the colorStrategy property Possible colorStrategy values are: blackwhite adaptively choose black or white depending on the background color, glow apply a white glow around letters or none don't apply any effect.
Labels
  group : String
Specifies the data group name to label.
Labels
  ignoreRemovals : Boolean = false
Do not remove label sprites when its corresponding DataSprite is removed from the stage.
Labels
  labelFormatter : ILabelFormatter
Specifies the text formatting object.
Labels
  source : String
Specifies the property field name to use for sourcing a label's string value.
Labels
  truncateToFit : Boolean
Specifies whether label strings should be truncated to fit within its rectangle's width.
Labels
Public Methods
 MethodDefined by
  
Labels(source:String, group:String, labelFormatter:ILabelFormatter = null, truncateToFit:Boolean = false, colorStrategy:String = "glow")
Contructor.
Labels
  
dispose():void
Disposes of the label Sprite layer from the Visualization's scene graph.
Labels
  
operate(t:Transitioner = null):void
Labels
  
setLabelVisible(root:NodeSprite, visible:Boolean):void
Sets the visibility for labels of the root and its children.
Labels
  
setup():void
Labels
Property detail
colorStrategyproperty
public var colorStrategy:String = "blackwhite"

Store the colorStrategy property Possible colorStrategy values are: blackwhite adaptively choose black or white depending on the background color, glow apply a white glow around letters or none don't apply any effect. The default is glow. In JuiceKit 2.0, this will be changed to blackwhite.

The default value is 'glow'.

groupproperty 
group:String  [read-write]

Specifies the data group name to label.

Implementation
    public function get group():String
    public function set group(value:String):void
ignoreRemovalsproperty 
public var ignoreRemovals:Boolean = false

Do not remove label sprites when its corresponding DataSprite is removed from the stage. This property is useful to bypass responding to removing and adding back a DataSprite when changing the Visualization's data root.

labelFormatterproperty 
labelFormatter:ILabelFormatter  [read-write]

Specifies the text formatting object.

Implementation
    public function get labelFormatter():ILabelFormatter
    public function set labelFormatter(value:ILabelFormatter):void
sourceproperty 
source:String  [read-write]

Specifies the property field name to use for sourcing a label's string value.

Implementation
    public function get source():String
    public function set source(value:String):void
truncateToFitproperty 
truncateToFit:Boolean  [read-write]

Specifies whether label strings should be truncated to fit within its rectangle's width. If the text string does not fit in the labeled item's width, the text is truncated and an ellipses is appended to the string. If the labeled item's width is not large enough for some portion of the string, an empty label is applied.

The default value is false.

Implementation
    public function get truncateToFit():Boolean
    public function set truncateToFit(value:Boolean):void
Constructor detail
Labels()constructor
public function Labels(source:String, group:String, labelFormatter:ILabelFormatter = null, truncateToFit:Boolean = false, colorStrategy:String = "glow")

Contructor.

Parameters
source:String — DataSprite property used to source the label's text string.
 
group:String — An optional ILabelFormatter instance that controls how each label is rendered.
 
labelFormatter:ILabelFormatter (default = null) — Specified whether label strings should be truncated to fit within its rectangle's width.
 
truncateToFit:Boolean (default = false) — An optional color strategy to make the labels more readable against the background.
 
colorStrategy:String (default = "glow")
Method detail
dispose()method
public function dispose():void

Disposes of the label Sprite layer from the Visualization's scene graph. This should only be called after being removed from a Visualization's operator list.

operate()method 
public override function operate(t:Transitioner = null):void

Parameters
t:Transitioner (default = null)
setLabelVisible()method 
public function setLabelVisible(root:NodeSprite, visible:Boolean):void

Sets the visibility for labels of the root and its children.

Parameters
root:NodeSprite — Refers to the root NodeSprite of a Tree.
 
visible:Boolean — Sets the visibility of each NodeSprite in a Tree.
setup()method 
public override function setup():void