All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.controls.StandardGainControl
java.lang.Object
|
+----ejmf.toolkit.controls.AbstractListenerControl
|
+----ejmf.toolkit.controls.ActionListenerControl
|
+----ejmf.toolkit.controls.AbstractGainControl
|
+----ejmf.toolkit.controls.StandardGainControl
- public class StandardGainControl
- extends AbstractGainControl
- implements GainChangeListener
Gain Control for Standard Control Panel. Provides
two Components, one each for increasing and decreasing
gain.
- See Also:
- AbstractGainControl
-
StandardGainControl()
- Create a StandardGainControl
-
StandardGainControl(Controller)
- Create a StandardGainControl and associate it
with a Controller.
-
addControlListener(EventListener)
-
Over-rides addControlListener from AbstractActionListener
because this Component is a JPanel and buttons need
to be extracted from it.
-
createControlComponent()
- Create Control Component for Gain Control.
-
createControlListener()
-
Create and return the default listener for gain control.
-
gainChange(GainChangeEvent)
- Set enable state of gain buttons based on gain level.
-
removeControlListener(EventListener)
- Remove listener from both gain increase button and gain
decrease button.
-
setComponent(AbstractGainButtonPanel)
- Type-safe way to set Control listener.
-
setComponentAndListener(AbstractGainButtonPanel, ActionListener)
- Type-safe way to set Control Component and control listener.
-
setControllerHook(Controller)
- This method is called when
setController
is called on an AbstractListenerControl.
-
setControlListener(ActionListener)
- Type-safe way to set Control Component.
StandardGainControl
public StandardGainControl(Controller controller)
- Create a StandardGainControl and associate it
with a Controller.
- Parameters:
- controller - A Controller with which control is associated.
StandardGainControl
public StandardGainControl()
- Create a StandardGainControl
setControllerHook
protected void setControllerHook(Controller newController)
- This method is called when
setController
is called on an AbstractListenerControl.
- Parameters:
- newController - A Controller with which this control
is associated.
- Overrides:
- setControllerHook in class AbstractGainControl
createControlComponent
protected Component createControlComponent()
- Create Control Component for Gain Control.
- Returns:
- component which acts as gain control.
- Overrides:
- createControlComponent in class AbstractListenerControl
addControlListener
protected void addControlListener(EventListener listener)
- Over-rides addControlListener from AbstractActionListener
because this Component is a JPanel and buttons need
to be extracted from it. Same listener is posted to
both buttons.
- Parameters:
- listener - Listener that implements semantics for
gain control.
- Overrides:
- addControlListener in class ActionListenerControl
removeControlListener
protected void removeControlListener(EventListener listener)
- Remove listener from both gain increase button and gain
decrease button.
- Parameters:
- listener - Listener is removed from listener list
associated with this control.
- Overrides:
- removeControlListener in class ActionListenerControl
createControlListener
protected EventListener createControlListener()
- Create and return the default listener for gain control.
Default listener increases gain level by 0.1 for each click
of up button and decreases gain level by 0.1 for each click
of down button.
- Returns:
- Default listener for gain control.
- Overrides:
- createControlListener in class AbstractListenerControl
gainChange
public void gainChange(GainChangeEvent e)
- Set enable state of gain buttons based on gain level.
If level has reached maximum, disable increase button.
If level has reached minimum, enable descrease button.
- Parameters:
- e - An GainChangeEvent triggerd by a GainControl
- See Also:
- GainControl, GainChangeEvent
setComponentAndListener
public void setComponentAndListener(AbstractGainButtonPanel bp,
ActionListener listener)
- Type-safe way to set Control Component and control listener.
- Parameters:
- bp - An AbstractGainButtonPanel that serves as Control
component.
- listener - An ActionListener that implements
Control semantics.
setComponent
public void setComponent(AbstractGainButtonPanel bp)
- Type-safe way to set Control listener.
- Parameters:
- listener - An ActionListener that implements
Control semantics.
setControlListener
public void setControlListener(ActionListener listener)
- Type-safe way to set Control Component.
- Parameters:
- listener - An ActionListener that implements
gain control button semantics.
- Overrides:
- setControlListener in class ActionListenerControl
All Packages Class Hierarchy This Package Previous Next Index