net.sf.freecol.client.gui.option
Class LanguageOptionUI

java.lang.Object
  extended by net.sf.freecol.client.gui.option.OptionUI<LanguageOption>
      extended by net.sf.freecol.client.gui.option.LanguageOptionUI
All Implemented Interfaces:
OptionUpdater

public final class LanguageOptionUI
extends OptionUI<LanguageOption>

This class provides visualization for an LanguageOption. In order to enable values to be both seen and changed.


Field Summary
(package private)  javax.swing.JComboBox box
           
 
Fields inherited from class net.sf.freecol.client.gui.option.OptionUI
gui
 
Constructor Summary
LanguageOptionUI(GUI gui, LanguageOption option, boolean editable)
          Creates a new LanguageOptionUI for the given LanguageOption.
 
Method Summary
 javax.swing.JComboBox getComponent()
          Get the Component used to set the value of the Option.
 void reset()
          Reset the value of the UI's component from the Option.
 void updateOption()
          Update the value of the Option from the UI's component.
 
Methods inherited from class net.sf.freecol.client.gui.option.OptionUI
getLabel, getListCellRenderer, getOption, getOptionUI, initialize, isEditable, setEditable, setLabel, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

box

javax.swing.JComboBox box
Constructor Detail

LanguageOptionUI

public LanguageOptionUI(GUI gui,
                        LanguageOption option,
                        boolean editable)
Creates a new LanguageOptionUI for the given LanguageOption.

Parameters:
option - The LanguageOption to make a user interface for.
editable - boolean whether user can modify the setting
Method Detail

getComponent

public javax.swing.JComboBox getComponent()
Get the Component used to set the value of the Option.

Specified by:
getComponent in class OptionUI<LanguageOption>
Returns:
a JComponent value

updateOption

public void updateOption()
Update the value of the Option from the UI's component.

Specified by:
updateOption in interface OptionUpdater
Specified by:
updateOption in class OptionUI<LanguageOption>

reset

public void reset()
Reset the value of the UI's component from the Option.

Specified by:
reset in interface OptionUpdater
Specified by:
reset in class OptionUI<LanguageOption>