public class StandardGainControl extends AbstractGainControl implements GainChangeListener
AbstractGainControl
skin
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.
|
getGainControl
setComponent, setComponentAndListener
getControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControlListener, setOperational, toString
public 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 AbstractGainControl
newController
- A Controller with which this control
is associated.protected java.awt.Component createControlComponent(Skin skin)
createControlComponent
in class AbstractListenerControl
protected void addControlListener(java.util.EventListener listener)
addControlListener
in class ActionListenerControl
listener
- Listener that implements semantics for
gain control.protected void removeControlListener(java.util.EventListener listener)
removeControlListener
in class ActionListenerControl
listener
- Listener is removed from listener list
associated with this control.protected java.util.EventListener createControlListener()
createControlListener
in class AbstractListenerControl
public void gainChange(GainChangeEvent e)
gainChange
in interface GainChangeListener
e
- An GainChangeEvent triggerd by a GainControlGainControl
,
GainChangeEvent
public 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 ActionListenerControl
listener
- An ActionListener that implements
gain control button semantics.