net.sf.fmj.ejmf.toolkit.gui.controls
Class ActionListenerControl

java.lang.Object
  extended by net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
      extended by net.sf.fmj.ejmf.toolkit.gui.controls.ActionListenerControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
AbstractGainControl, StandardPauseControl, StandardStartControl, StandardStopControl

public abstract class ActionListenerControl
extends AbstractListenerControl

All button controls extends from ActionListenerControl. ActionListenerControl supplies public methods for manipulating a control's EventListener as an ActionListener thereby providing type-safety.


Field Summary
 
Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
skin
 
Constructor Summary
protected ActionListenerControl(Skin skin)
          Create an ActionListenerControl
protected ActionListenerControl(Skin skin, Controller controller)
          Create an ActionListenerControl and associate it with a Controller.
 
Method Summary
protected  void addControlListener(java.util.EventListener listener)
          Add control semantics to this Control.
protected  void removeControlListener(java.util.EventListener listener)
          Add control semantics to this Control.
 void setComponent(javax.swing.AbstractButton button)
          Type-way to set Control Component.
 void setComponentAndListener(javax.swing.AbstractButton button, java.awt.event.ActionListener listener)
          Type-way to set Control Component and control listener.
 void setControlListener(java.awt.event.ActionListener listener)
          Type-way to set Control listener.
 
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
createControlComponent, createControlListener, getControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControllerHook, setControlListener, setOperational, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionListenerControl

protected ActionListenerControl(Skin skin,
                                Controller controller)
                         throws java.lang.ClassCastException
Create an ActionListenerControl and associate it with a Controller.

Parameters:
controller - A Controller with which listener is associated.
Throws:
java.lang.ClassCastException

ActionListenerControl

protected ActionListenerControl(Skin skin)
Create an ActionListenerControl

Method Detail

removeControlListener

protected void removeControlListener(java.util.EventListener listener)
Add control semantics to this Control. Remove the listener named by the listener argument.

Specified by:
removeControlListener in class AbstractListenerControl
Parameters:
listener - java.util.EventListener representing control semantics to be removed.

addControlListener

protected void addControlListener(java.util.EventListener listener)
Add control semantics to this Control.

Specified by:
addControlListener in class AbstractListenerControl
Parameters:
listener - java.util.EventListener representing control semantics to be added.

setComponentAndListener

public void setComponentAndListener(javax.swing.AbstractButton button,
                                    java.awt.event.ActionListener listener)
Type-way to set Control Component and control listener.

Parameters:
button - An AbstractButton that serves as Control component.
listener - An ActionListener that implements Control semantics.

setControlListener

public void setControlListener(java.awt.event.ActionListener listener)
Type-way to set Control listener.

Parameters:
listener - An ActionListener that implements Control semantics.

setComponent

public void setComponent(javax.swing.AbstractButton button)
Type-way to set Control Component.