net.sf.fmj.utility
Class ControlCollection

java.lang.Object
  extended by net.sf.fmj.utility.ControlCollection

public class ControlCollection
extends java.lang.Object

Maintains a list of Control objects. The Controls may be retrieved by classname or interface name.

Author:
Warren Bloomer

Constructor Summary
ControlCollection()
           
 
Method Summary
 void addControl(Control control)
          Add a Control to the list.
 void clear()
           
 Control getControl(java.lang.String controlType)
          Retrieve the first Control that implements the given Class or Interface.
 Control[] getControls()
          Retrieve an array of Controls that control the object.
 void removeControl(Control control)
          Remove a Control from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlCollection

public ControlCollection()
Method Detail

addControl

public void addControl(Control control)
Add a Control to the list.

Parameters:
control -

clear

public void clear()

removeControl

public void removeControl(Control control)
Remove a Control from the list.

Parameters:
control -

getControls

public Control[] getControls()
Retrieve an array of Controls that control the object. If no controls are supported, a zero length array is returned.

Returns:
the array of object controls

getControl

public Control getControl(java.lang.String controlType)
Retrieve the first Control that implements the given Class or Interface. The full class name must be used. If the control is not supported then null is returned.

Returns:
the object that implements the control, or null.