Packageflare.vis.legend
Classpublic class LegendItem
InheritanceLegendItem Inheritance RectSprite Inheritance DirtySprite Inheritance flash.display.Sprite

An item in a discrete legend consisting of a label and an icon indicating color, shape, and/or size.



Public Properties
 PropertyDefined by
 Inheritedangle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
 InheritedcornerHeight : Number
The height of rounded corners.
RectSprite
 InheritedcornerSize : Number
Sets corner width and height simultaneously.
RectSprite
 InheritedcornerWidth : Number
The width of rounded corners.
RectSprite
 InheritedfillColor : uint
The fill color of the rectangle.
RectSprite
 Inheritedh : Number
The height of the rectangle.
RectSprite
 Inheritedheight : Number
If dirty, this sprite is re-rendered before returning the height.
DirtySprite
  icon : Shape
[read-only] Shape presenting this legend item's icon.
LegendItem
  iconLineWidth : Number
Line width to use within the icon.
LegendItem
  iconSize : Number
Size parameter for icon drawing.
LegendItem
  innerHeight : Number
[read-only] The inner height of this legend item.
LegendItem
  innerWidth : Number
[read-only] The inner width of this legend item.
LegendItem
  label : TextSprite
[read-only] TextSprite presenting this legend item's label.
LegendItem
 InheritedlineColor : uint
The line color of the rectangle outline.
RectSprite
 InheritedlinePixelHinting : Boolean
Flag indicating if pixel hinting should be used for the outline.
RectSprite
 InheritedlineWidth : Number
The line width of the rectangle outline.
RectSprite
  margin : Number
Margin value for padding within the legend item.
LegendItem
  maxIconSize : Number
Maximum size parameter for icon drawing.
LegendItem
 Inheritedorigin : Point
The origin point for polar coordinates.
DirtySprite
 Inheritedradius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
  selected : Boolean
Flag indicating if this legend item has been selected.
LegendItem
  text : String
The label text.
LegendItem
  value : Object
The data value represented by this legend item.
LegendItem
 Inheritedw : Number
The width of the rectangle.
RectSprite
 Inheritedwidth : Number
If dirty, this sprite is re-rendered before returning the width.
DirtySprite
 Inheritedx : Number
DirtySprite
 Inheritedy : Number
DirtySprite
Protected Properties
 PropertyDefined by
 Inherited_angle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
 Inherited_origin : Point
The origin point for polar coordinates.
DirtySprite
 Inherited_radius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
Public Methods
 MethodDefined by
  
LegendItem(text:String = null, color:uint = 0xff888888, shape:String = null, iconSize:Number)
Creates a new LegendItem.
LegendItem
 Inherited
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
DirtySprite
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
DirtySprite
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
DirtySprite
 Inherited
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
DirtySprite
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
DirtySprite
  
render():void
Draw this sprite's graphical content.
LegendItem
 Inherited
renderDirty(evt:Event = null):void
[static] Frame render callback that renders all sprites on the dirty list.
DirtySprite
 Inherited
toString():String
DirtySprite
Public Constants
 ConstantDefined by
 InheritedZERO : Point
[static] A constant for the point (0,0).
DirtySprite
Property detail
iconproperty
icon:Shape  [read-only]

Shape presenting this legend item's icon.

Implementation
    public function get icon():Shape
iconLineWidthproperty 
iconLineWidth:Number  [read-write]

Line width to use within the icon.

Implementation
    public function get iconLineWidth():Number
    public function set iconLineWidth(value:Number):void
iconSizeproperty 
iconSize:Number  [read-write]

Size parameter for icon drawing.

Implementation
    public function get iconSize():Number
    public function set iconSize(value:Number):void
innerHeightproperty 
innerHeight:Number  [read-only]

The inner height of this legend item.

Implementation
    public function get innerHeight():Number
innerWidthproperty 
innerWidth:Number  [read-only]

The inner width of this legend item.

Implementation
    public function get innerWidth():Number
labelproperty 
label:TextSprite  [read-only]

TextSprite presenting this legend item's label.

Implementation
    public function get label():TextSprite
marginproperty 
margin:Number  [read-write]

Margin value for padding within the legend item.

Implementation
    public function get margin():Number
    public function set margin(value:Number):void
maxIconSizeproperty 
maxIconSize:Number  [read-write]

Maximum size parameter for icon drawing.

Implementation
    public function get maxIconSize():Number
    public function set maxIconSize(value:Number):void
selectedproperty 
selected:Boolean  [read-write]

Flag indicating if this legend item has been selected.

Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
textproperty 
text:String  [read-write]

The label text.

Implementation
    public function get text():String
    public function set text(value:String):void
valueproperty 
value:Object  [read-write]

The data value represented by this legend item.

Implementation
    public function get value():Object
    public function set value(value:Object):void
Constructor detail
LegendItem()constructor
public function LegendItem(text:String = null, color:uint = 0xff888888, shape:String = null, iconSize:Number)

Creates a new LegendItem.

Parameters
text:String (default = null) — the label text
 
color:uint (default = 0xff888888) — the color of the label icon
 
shape:String (default = null) — a shape drawing function for the label icon
 
iconSize:Number — a size parameter for drawing the label icon
Method detail
render()method
public override function render():void

Draw this sprite's graphical content. Subclasses should override this method with custom drawing code.