protected EventListener createControlListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
AbstractGainButtonPanel gbp =
(AbstractGainButtonPanel) getControlComponent();
GainControl gc = getGainControl();
float level = gc.getLevel();
if (e.getSource() == gbp.getGainIncreaseButton()) {
level += 0.1f;
gc.setLevel(level > 1.0f ? 1.0f : level);
} else if (e.getSource() == gbp.getGainDecreaseButton()) {
level -= 0.1f;
gc.setLevel(level < 0.0f ? 0.0f : level);
}
}
};
}