net.sf.fmj.media
Class AbstractControls

java.lang.Object
  extended by net.sf.fmj.media.AbstractControls
All Implemented Interfaces:
Controls
Direct Known Subclasses:
AbstractPlugIn

public abstract class AbstractControls
extends java.lang.Object
implements Controls

Abstract implementation of Controls, useful for subclassing.

Author:
Ken Larson, Warren Bloomer

Constructor Summary
AbstractControls()
           
 
Method Summary
protected  void addControl(Control control)
          Called by subclasses of this Abstract class to add a control.
 java.lang.Object getControl(java.lang.String controlType)
          Retrieve the first object that implements the given Class or Interface.
 java.lang.Object[] getControls()
          Retrieve an array of objects that control the object.
protected  void removeControl(Control control)
          Remove a control object from the list of controls for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractControls

public AbstractControls()
Method Detail

getControls

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

Specified by:
getControls in interface Controls
Returns:
the array of object controls

getControl

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

Specified by:
getControl in interface Controls
Returns:
the object that implements the control, or null.

addControl

protected void addControl(Control control)
Called by subclasses of this Abstract class to add a control.

Parameters:
control - The control object to add to the controls list.

removeControl

protected void removeControl(Control control)
Remove a control object from the list of controls for this object. Will be used by subclasses of this Abstract class.

Parameters:
control - the control object to remove from the list.