public class StandardGainControl extends AbstractGainControl implements GainChangeListener
AbstractGainControlskin| Constructor and Description |
|---|
StandardGainControl(Skin skin)
Create a StandardGainControl
|
StandardGainControl(Skin skin,
Controller controller)
Create a StandardGainControl and associate it
with a Controller.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addControlListener(java.util.EventListener listener)
Over-rides addControlListener from AbstractActionListener
because this Component is a JPanel and buttons need
to be extracted from it.
|
protected java.awt.Component |
createControlComponent(Skin skin)
Create Control Component for Gain Control.
|
protected java.util.EventListener |
createControlListener()
Create and return the default listener for gain control.
|
void |
gainChange(GainChangeEvent e)
Set enable state of gain buttons based on gain level.
|
protected void |
removeControlListener(java.util.EventListener listener)
Remove listener from both gain increase button and gain
decrease button.
|
void |
setComponent(AbstractGainButtonPanel bp)
Type-safe way to set Control Component.
|
void |
setComponentAndListener(AbstractGainButtonPanel bp,
java.awt.event.ActionListener listener)
Type-safe way to set Control Component and control listener.
|
protected void |
setControllerHook(Controller newController)
This method is called when
setController
is called on an AbstractListenerControl. |
void |
setControlListener(java.awt.event.ActionListener listener)
Type-safe way to set Control listener.
|
getGainControlsetComponent, setComponentAndListenergetControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControlListener, setOperational, toStringpublic StandardGainControl(Skin skin, Controller controller)
controller - A Controller with which control is associated.public StandardGainControl(Skin skin)
protected void setControllerHook(Controller newController)
setController
is called on an AbstractListenerControl.setControllerHook in class AbstractGainControlnewController - A Controller with which this control
is associated.protected java.awt.Component createControlComponent(Skin skin)
createControlComponent in class AbstractListenerControlprotected void addControlListener(java.util.EventListener listener)
addControlListener in class ActionListenerControllistener - Listener that implements semantics for
gain control.protected void removeControlListener(java.util.EventListener listener)
removeControlListener in class ActionListenerControllistener - Listener is removed from listener list
associated with this control.protected java.util.EventListener createControlListener()
createControlListener in class AbstractListenerControlpublic void gainChange(GainChangeEvent e)
gainChange in interface GainChangeListenere - An GainChangeEvent triggerd by a GainControlGainControl,
GainChangeEventpublic void setComponentAndListener(AbstractGainButtonPanel bp, java.awt.event.ActionListener listener)
bp - An AbstractGainButtonPanel that serves as Control
component.listener - An ActionListener that implements
Control semantics.public void setComponent(AbstractGainButtonPanel bp)
bp - An AbstractGainButtonPanel that serves as Control
component.public void setControlListener(java.awt.event.ActionListener listener)
setControlListener in class ActionListenerControllistener - An ActionListener that implements
gain control button semantics.