net.sf.freecol.client.gui.option
Class StringOptionUI
java.lang.Object
net.sf.freecol.client.gui.option.OptionUI<StringOption>
net.sf.freecol.client.gui.option.StringOptionUI
- All Implemented Interfaces:
- OptionUpdater
public final class StringOptionUI
- extends OptionUI<StringOption>
This class provides visualization for an StringOption. In order to enable
values to be both seen and changed.
|
Field Summary |
private javax.swing.JComboBox |
box
|
| Fields inherited from class net.sf.freecol.client.gui.option.OptionUI |
gui |
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
box
private javax.swing.JComboBox box
StringOptionUI
public StringOptionUI(GUI gui,
StringOption option,
boolean editable)
- Creates a new
StringOptionUI for the given StringOption.
- Parameters:
option - The StringOption to make a user interface foreditable - boolean whether user can modify the setting
getComponent
public javax.swing.JComboBox getComponent()
- Get the
Component used to set the value of the
Option.
- Specified by:
getComponent in class OptionUI<StringOption>
- 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<StringOption>
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<StringOption>