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

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
              extended by net.sf.fmj.ejmf.toolkit.gui.controls.StandardGainMeterControl
All Implemented Interfaces:
Control, GainChangeListener

public class StandardGainMeterControl
extends AbstractGainControl
implements GainChangeListener

Gain meter Control for StandardControlPanel.


Field Summary
 
Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
skin
 
Constructor Summary
StandardGainMeterControl(Skin skin)
          Create a StandardGainMeterControl
StandardGainMeterControl(Skin skin, Controller controller)
          Create a StandardGainMeterControl and associate it with a Controller.
 
Method Summary
protected  java.awt.Component createControlComponent(Skin skin)
          Create the GainMeter Component.
protected  java.util.EventListener createControlListener()
          Return the ActionListener used to toggle mute button.
 void gainChange(GainChangeEvent gce)
          Implements GainChangeListener.
protected  void setControllerHook(Controller newController)
          This method is called when setController is called on an AbstractListenerControl.
 void setLevel(float level)
          Set the level value for this GainMeter.
 void setMute(boolean muted)
          Set the mute value for this GainMeter.
 
Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractGainControl
getGainControl
 
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
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

StandardGainMeterControl

public StandardGainMeterControl(Skin skin,
                                Controller controller)
Create a StandardGainMeterControl and associate it with a Controller.

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

StandardGainMeterControl

public StandardGainMeterControl(Skin skin)
Create a StandardGainMeterControl

Method Detail

setControllerHook

protected void setControllerHook(Controller newController)
This method is called when setController is called on an AbstractListenerControl.

Overrides:
setControllerHook in class AbstractGainControl
Parameters:
newController - A Controller with which this control is associated.

createControlComponent

protected java.awt.Component createControlComponent(Skin skin)
Create the GainMeter Component.

Specified by:
createControlComponent in class AbstractListenerControl
Returns:
The component that acts as gain meter control.
See Also:
GainMeterButton

setLevel

public void setLevel(float level)
Set the level value for this GainMeter. The input argument is a level value from the Player's GainControl. It is the GainMeter's responsibility to convert it to a value that can be meaningfully rendered.

Parameters:
level - This argument represents a level value returned by a Player's GainControl.

setMute

public void setMute(boolean muted)
Set the mute value for this GainMeter.

Parameters:
muted - If muted is true, audio signal is suppressed. Otherwise, audio signal is rendered.

createControlListener

protected java.util.EventListener createControlListener()
Return the ActionListener used to toggle mute button.

Specified by:
createControlListener in class AbstractListenerControl
Returns:
An ActionListener for toggling mute state.

gainChange

public void gainChange(GainChangeEvent gce)
Implements GainChangeListener. Level and mute are set appropriately and the view updated for every change to the GainControl on which this GainMeter is a listener.

Specified by:
gainChange in interface GainChangeListener
Parameters:
gce - An GainChangeEvent triggerd by a GainControl
See Also:
GainControl, GainChangeEvent