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

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

public abstract class AbstractGainControl
extends ActionListenerControl

Abstract class from which AbstractListenerControls that depend on a GainControl should extend. Upon construction it properly set the operational state of the Control.


Field Summary
 
Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
skin
 
Constructor Summary
protected AbstractGainControl(Skin skin)
          Create an AbstractGainControl.
protected AbstractGainControl(Skin skin, Controller controller)
          Create an AbstractGainControl and associate with controller.
 
Method Summary
protected  GainControl getGainControl()
           
protected  void setControllerHook(Controller controller)
          Invoked when Controller is associated with Control.
 
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.ActionListenerControl
addControlListener, removeControlListener, setComponent, setComponentAndListener, setControlListener
 
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
createControlComponent, createControlListener, getControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControlListener, setOperational, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractGainControl

protected AbstractGainControl(Skin skin,
                              Controller controller)
Create an AbstractGainControl and associate with controller.

Parameters:
controller - Controller with which this control is associated.

AbstractGainControl

protected AbstractGainControl(Skin skin)
Create an AbstractGainControl. Controller will be assigned later.

Method Detail

setControllerHook

protected void setControllerHook(Controller controller)
Invoked when Controller is associated with Control. Properly sets operational state and initializes initializes private reference to GainControl if Controller is a Player and it has a one.

Overrides:
setControllerHook in class AbstractListenerControl
Parameters:
controller - Controller with which this control is associated.

getGainControl

protected GainControl getGainControl()
Returns:
GainControl associated with this AbstractGainControl.