Package net.sf.freecol.client.gui.option
Class AudioMixerOptionUI
- java.lang.Object
-
- net.sf.freecol.client.gui.option.OptionUI<AudioMixerOption>
-
- net.sf.freecol.client.gui.option.AudioMixerOptionUI
-
- All Implemented Interfaces:
OptionUpdater
public final class AudioMixerOptionUI extends OptionUI<AudioMixerOption>
This class provides visualization for anAudioMixerOption
in order to enable values to be both seen and changed.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JButton
button1
private javax.swing.JButton
button2
private javax.swing.JComboBox<AudioMixerOption.MixerWrapper>
cbox
private javax.swing.JLabel
currentMixerLabel
private GUI
gui
private javax.swing.JPanel
panel
-
Constructor Summary
Constructors Constructor Description AudioMixerOptionUI(GUI gui, AudioMixerOption option, boolean editable)
Creates a newAudioMixerOptionUI
for the givenAudioMixerOption
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JPanel
getComponent()
Get theComponent
used to set the value of the Option.javax.swing.JLabel
getJLabel()
void
reset()
Reset with the value from the option.private void
updateMixerLabel()
void
updateOption()
Updates the value of theOption
this object keeps.-
Methods inherited from class net.sf.freecol.client.gui.option.OptionUI
getListCellRenderer, getOption, getOptionUI, initialize, isEditable, setEditable, setEnabler, setLabel, setOption
-
-
-
-
Field Detail
-
gui
private final GUI gui
-
panel
private final javax.swing.JPanel panel
-
cbox
private final javax.swing.JComboBox<AudioMixerOption.MixerWrapper> cbox
-
button1
private final javax.swing.JButton button1
-
button2
private final javax.swing.JButton button2
-
currentMixerLabel
private final javax.swing.JLabel currentMixerLabel
-
-
Constructor Detail
-
AudioMixerOptionUI
public AudioMixerOptionUI(GUI gui, AudioMixerOption option, boolean editable)
Creates a newAudioMixerOptionUI
for the givenAudioMixerOption
.- Parameters:
gui
- The GUI.option
- TheAudioMixerOption
to make a user interface for.editable
- boolean whether user can modify the setting
-
-
Method Detail
-
updateMixerLabel
private void updateMixerLabel()
-
getJLabel
public final javax.swing.JLabel getJLabel()
- Overrides:
getJLabel
in classOptionUI<AudioMixerOption>
-
getComponent
public javax.swing.JPanel getComponent()
Get theComponent
used to set the value of the Option.- Specified by:
getComponent
in classOptionUI<AudioMixerOption>
- Returns:
- a
JComponent
value
-
updateOption
public void updateOption()
Updates the value of theOption
this object keeps.- Specified by:
updateOption
in interfaceOptionUpdater
- Specified by:
updateOption
in classOptionUI<AudioMixerOption>
-
reset
public void reset()
Reset with the value from the option.- Specified by:
reset
in interfaceOptionUpdater
- Specified by:
reset
in classOptionUI<AudioMixerOption>
-
-