Packagecom.brightcove.api.components
Classpublic class ToggleButton
InheritanceToggleButton Inheritance Button Inheritance UIObject Inheritance Component Inheritance flash.events.EventDispatcher

The ToggleButton UI component in the player.



Public Properties
 PropertyDefined By
 Inheritedcomponent : Object
[read-only] Returns a reference to the wrapped API element in the player, which can be used to get access to new methods that might not be defined within this version of the SWC.
Component
Public Methods
 MethodDefined By
  
ToggleButton(element:Object)
Constructor.
ToggleButton
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
[override] Adds a listener for an event.
UIObject
 Inherited
getAlpha():Number
Returns the alpha value of the component.
Component
 Inherited
getAutoSize():Boolean
Returns whether the label resizes based on its text.
Button
 Inherited
getBlendMode():String
Returns the blend mode of the component.
UIObject
 Inherited
Returns the interface for the layout container of the element.
Component
 Inherited
getCSS():String
Returns the CSS used for this component instance.
UIObject
 Inherited
getDefinition():String
Returns the XML (BEML) definition of the component.
Component
 Inherited
getEnabled():Boolean
Returns whether component is enabled.
UIObject
 Inherited
getFont():String
Returns the name of the font used for the label.
Button
 Inherited
getHeight():Number
Returns the pixel height of the component.
Component
 Inherited
Returns the horizontal alignment for the icon.
Button
 Inherited
Returns the vertical alignment for the icon.
Button
 Inherited
getIconName():String
Returns the name of the current icon displayed.
Button
 Inherited
Returns the pixel amount on the x axis the icon is offset from its aligned position.
Button
 Inherited
Returns the pixel amount on the y axis the icon is offset from its aligned position.
Button
 Inherited
getIconScale():Number
Returns the percent scale at which to render the icon.
Button
 Inherited
getID():String
Returns the ID of the component, as defined in the XML.
Component
 Inherited
Returns whether the component is included in layout calculations and rendering in parent layout box.
Component
 Inherited
getIndex():int
Returns the index of this element in its parent's elements array.
Component
  
getIsToggled():Boolean
Returns whether the button is currently in its toggled state.
ToggleButton
 Inherited
getIsTruncated():Boolean
Returns whether the label is currently truncated.
Button
 Inherited
getLabel():String
Returns the current text in the label.
Button
 Inherited
Returns the horizontal alignment for the label.
Button
 Inherited
Returns the vertical alignment for the label.
Button
 Inherited
Returns the minimum pixel amount to the left and right of the label.
Button
 Inherited
Returns the pixel amount on the x axis the label is offset from its aligned position.
Button
 Inherited
Returns the pixel amount on the y axis the label is offset from its aligned position.
Button
 Inherited
getLabelSize():Number
Returns the font point size used for the label.
Button
 Inherited
getLabelWidth():Number
Returns the current width of the label.
Button
 Inherited
getMultiline():Boolean
Returns whether the label is set to be multiline.
Button
 Inherited
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.
Component
 Inherited
getNodeName():String
Returns the node name of the element.
Component
 Inherited
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.
Component
 Inherited
getRotation():Number
Returns the rotation of the component.
UIObject
 Inherited
getShowBack():Boolean
Returns whether the background graphic for the button should be shown (if any is assigned through the theme).
Button
  
Returns the name of the icon displayed when component is toggled.
ToggleButton
  
Returns the label when toggled.
ToggleButton
  
Returns the tooltip, if any, applied to the component when toggled.
ToggleButton
 Inherited
getTooltip():String
Returns the tooltip, if any, applied to the component.
Button
 Inherited
Returns whether the label is set to truncate its text if the label is larger than the button size.
Button
 Inherited
getVisible():Boolean
Returns whether the component is visible.
Component
 Inherited
getWidth():Number
Returns the pixel width of the component.
Component
 Inherited
getX(global:Boolean = false):Number
Returns the position of the component on the x axis.
Component
 Inherited
getY(global:Boolean = false):Number
Returns the position of the component on the y axis.
Component
 Inherited
move(x:Number, y:Number, global:Boolean = false):void
Sets the x,y coordinates of the component.
Component
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override] Removes a listener for an event.
UIObject
 Inherited
setAlpha(alpha:Number):void
Sets the alpha value of the component.
Component
 Inherited
setAutoSize(autoSize:Boolean):void
Sets whether the label should resize based on its text.
Button
 Inherited
setBlendMode(mode:String):void
Sets the blend mode of the component.
UIObject
 Inherited
setEnabled(enable:Boolean):void
Enables/disables component for events.
UIObject
 Inherited
setFont(font:String):void
Sets a font to be used instead of the style format's.
Button
 Inherited
setIconAlignmentH(alignment:String):void
Sets the horizontal alignment for the icon.
Button
 Inherited
setIconAlignmentV(alignment:String):void
Sets the vertical alignment for the icon.
Button
 Inherited
setIconName(name:String):void
Sets the current icon displayed.
Button
 Inherited
setIconOffsetX(offset:Number):void
Sets the pixel amount on the x axis the icon should be offset from its aligned position.
Button
 Inherited
setIconOffsetY(offset:Number):void
Sets the pixel amount on the y axis the icon should be offset from its aligned position.
Button
 Inherited
setIconScale(scale:Number):void
Sets the percent scale at which to render the icon.
Button
 Inherited
setIncludeInLayout(includeInLayout:Boolean):void
Sets whether the component is included in layout calculations and rendering in parent layout box.
Component
  
setIsToggled(toggled:Boolean):void
Sets whether the button is currently in its toggled state.
ToggleButton
 Inherited
setLabel(label:String):void
Sets the current text for the label.
Button
 Inherited
setLabelAlignmentH(alignment:String):void
Sets the horizontal alignment for the label.
Button
 Inherited
setLabelAlignmentV(alignment:String):void
Sets the vertical alignment for the label.
Button
 Inherited
setLabelBuffer(buffer:Number):void
Sets the minimum pixel amount to the left and right of the label.
Button
 Inherited
setLabelOffsetX(offset:Number):void
Sets the pixel amount on the x axis the label should be offset from its aligned position.
Button
 Inherited
setLabelOffsetY(offset:Number):void
Sets the pixel amount on the y axis the label should be offset from its aligned position.
Button
 Inherited
setLabelSize(size:Number):void
Sets a font size to be used instead of the style format's.
Button
 Inherited
setMultiline(multiline:Boolean):void
Sets whether the label should display multiline.
Button
 Inherited
setRotation(rotation:Number):void
Sets the rotation of the component.
UIObject
 Inherited
setShowBack(show:Boolean):void
Sets whether the background graphic for the button should be shown (if any is assigned through the theme).
Button
 Inherited
setSize(width:Number, height:Number):void
Sets the pixel dimensions for the wrapped component.
Component
 Inherited
setStyles(styles:String):void
Overrides specific styles for a component by accepting a semicolon-delimited list of style names and colors.
UIObject
  
setToggledIconName(iconName:String):void
Sets the icon displayed when component is toggled.
ToggleButton
  
setToggledLabel(label:String):void
Sets the label when toggled.
ToggleButton
  
setToggledTooltip(toolTip:String):void
Sets the tooltip for the component when toggled.
ToggleButton
 Inherited
setTooltip(toolTip:String):void
Sets the tooltip for the component.
Button
 Inherited
setTruncateLabel(truncate:Boolean):void
Sets whether the label should truncate its text if the label is larger than the button size.
Button
 Inherited
setVisible(visible:Boolean):void
Sets whether the component is visible.
Component
Protected Methods
 MethodDefined By
 Inherited
redispatchEvent(event:Event):void
Sends the specified event, usually sent from a handler in order to bubble up non-bubbling events.
UIObject
Events
 Event Summary Defined By
 InheritedDispatched when a UI element in the player is clicked.Component
 InheritedDispatched when a UI element in the player is rolled off.Component
 InheritedDispatched when a UI element in the player is rolled over.Component
 InheritedDispatched when a property changes in a bindable component.Component
Constructor Detail
ToggleButton()Constructor
public function ToggleButton(element:Object)

Constructor.

Parameters
element:Object — layout element to wrap and delegate all calls to.
Method Detail
getIsToggled()method
public function getIsToggled():Boolean

Returns whether the button is currently in its toggled state.

Returns
Boolean — True if the button is currently in its toggled state.
getToggledIconName()method 
public function getToggledIconName():String

Returns the name of the icon displayed when component is toggled.

Returns
String — The name of the icon displayed when component is toggled.
getToggledLabel()method 
public function getToggledLabel():String

Returns the label when toggled.

Returns
String — The label when toggled.
getToggledTooltip()method 
public function getToggledTooltip():String

Returns the tooltip, if any, applied to the component when toggled.

Returns
String — Returns the string tooltip text when component is toggled.
setIsToggled()method 
public function setIsToggled(toggled:Boolean):void

Sets whether the button is currently in its toggled state.

Parameters

toggled:Boolean — to set the button in its toggled state.

setToggledIconName()method 
public function setToggledIconName(iconName:String):void

Sets the icon displayed when component is toggled.

Parameters

iconName:String — name of the icon to display when component is toggled.

setToggledLabel()method 
public function setToggledLabel(label:String):void

Sets the label when toggled.

Parameters

label:String — text to apply to the label when toggled.

setToggledTooltip()method 
public function setToggledTooltip(toolTip:String):void

Sets the tooltip for the component when toggled.

Parameters

toolTip:String — string to use for the tooltip text when component is toggled.