Packagede.popforge.fui.core
Classpublic class Group
ImplementsIParameterBindable

The Group class is a manager that handles a Parameter object with a MappingValues for multiple components. Since components do not know anything about each other they can not know what to do if a certai value appears. The Group object is a proxy that will connect a IParameterBindable object with an internal Parameter object using MappingBoolean that is set to true when the paramter value of the group is changed to the asociated value for the IParameterBindable.



Protected Properties
 PropertyDefined by
  components : Array
Componets in the group.
Group
  fui : Fui
The Fui object where the current Group object belongs to.
Group
  internalChange : Boolean
A helping varibable that makres if a change to a proxy parameter has been made internally or comes from a different source (e.g.
Group
  parameter : Parameter
The binded parameter.
Group
  parameters : Array
Proxy parameters for the components that belong to the group.
Group
  values : Array
Values that are asociated with the components.
Group
Public Methods
 MethodDefined by
  
Group(fui:Fui)
Creates a new Group object.
Group
  
addComponent(name:String, value:*):Boolean
Adds a FuiComponent to the group.
Group
  
connect(parameter:Parameter):void
Connects a Parameter object.
Group
  
disconnect():void
Releases the Parameter object.
Group
  
removeComponent(name:String):Boolean
Removes a FuiComponent from the group.
Group
  
toString():String
Creates and returns the string representation of the current object.
Group
Protected Methods
 MethodDefined by
  
initGroup():void
Initializes the group.
Group
  
onGroupParameterChanged(parameter:Parameter, oldValue:*, newValue:*):void
Listener for changes of proxy parameters.
Group
  
onParameterChanged(parameter:Parameter, oldValue:*, newValue:*):void
Listener for changes of the binded parameter.
Group
  
Releases the paramter and removes the listener.
Group
Property detail
componentsproperty
protected var components:Array

Componets in the group.

fuiproperty 
protected var fui:Fui

The Fui object where the current Group object belongs to.

internalChangeproperty 
protected var internalChange:Boolean

A helping varibable that makres if a change to a proxy parameter has been made internally or comes from a different source (e.g. user pressing a SwitchButton).

parameterproperty 
protected var parameter:Parameter

The binded parameter.

parametersproperty 
protected var parameters:Array

Proxy parameters for the components that belong to the group.

valuesproperty 
protected var values:Array

Values that are asociated with the components.

Constructor detail
Group()constructor
public function Group(fui:Fui)

Creates a new Group object.

Parameters
fui:Fui — The Fui object the Group belongs to.
Method detail
addComponent()method
public function addComponent(name:String, value:*):Boolean

Adds a FuiComponent to the group. The FuiComponent has to be able to bind paramters.

Parameters
name:String — The name of the FuiComponent in the belonging Fui object.
 
value:* — The value belonging to the FuiComponent.

Returns
Booleantrue if the FuiComponent has been added; false otherwise.

Throws
— If the FuiComponent does not implement IParameterBindable.
connect()method 
public function connect(parameter:Parameter):void

Connects a Parameter object.

Parameters
parameter:Parameter — The Parameter to bind.
disconnect()method 
public function disconnect():void

Releases the Parameter object.

initGroup()method 
protected function initGroup():void

Initializes the group. Should be called only once when connect() is called.

onGroupParameterChanged()method 
protected function onGroupParameterChanged(parameter:Parameter, oldValue:*, newValue:*):void

Listener for changes of proxy parameters.

Parameters
parameter:Parameter — The parameter that has been changed.
 
oldValue:* — The old value of the parameter.
 
newValue:* — The new value of the parameter.
onParameterChanged()method 
protected function onParameterChanged(parameter:Parameter, oldValue:*, newValue:*):void

Listener for changes of the binded parameter.

Parameters
parameter:Parameter — The parameter that has been changed.
 
oldValue:* — The old value of the parameter.
 
newValue:* — The new value of the parameter.
releaseParameter()method 
protected function releaseParameter():void

Releases the paramter and removes the listener.

removeComponent()method 
public function removeComponent(name:String):Boolean

Removes a FuiComponent from the group.

Parameters
name:String — The name of the FuiComponent in the belonging Fui object.

Returns
Booleantrue if the FuiComponent has been removed; false otherwise.
toString()method 
public function toString():String

Creates and returns the string representation of the current object.

Returns
String — The string representation of the current object.