Package net.sf.freecol.client.gui.option
Class FileOptionUI
- java.lang.Object
-
- net.sf.freecol.client.gui.option.OptionUI<FileOption>
-
- net.sf.freecol.client.gui.option.FileOptionUI
-
- All Implemented Interfaces:
OptionUpdater
public final class FileOptionUI extends OptionUI<FileOption>
This class provides visualization for aFileOption
in order to enable values to be both seen and changed.
-
-
Constructor Summary
Constructors Constructor Description FileOptionUI(GUI gui, FileOption option, boolean editable)
Creates a newFileOptionUI
for the givenFileOption
.
-
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.void
reset()
Reset the value of the UI's component from the Option.void
setValue(java.io.File f)
Sets the value of this UI's component.void
updateOption()
Update the value of the Option from the UI's component.-
Methods inherited from class net.sf.freecol.client.gui.option.OptionUI
getJLabel, getListCellRenderer, getOption, getOptionUI, initialize, isEditable, setEditable, setEnabler, setLabel, setOption
-
-
-
-
Constructor Detail
-
FileOptionUI
public FileOptionUI(GUI gui, FileOption option, boolean editable)
Creates a newFileOptionUI
for the givenFileOption
.- Parameters:
gui
- TheGUI
to create a change dialog on.option
- TheFileOption
to make a user interface for.editable
- boolean whether user can modify the setting
-
-
Method Detail
-
setValue
public void setValue(java.io.File f)
Sets the value of this UI's component.- Parameters:
f
- The newFile
value.
-
getComponent
public javax.swing.JPanel getComponent()
Get theComponent
used to set the value of the Option.- Specified by:
getComponent
in classOptionUI<FileOption>
- Returns:
- a
JComponent
value
-
updateOption
public void updateOption()
Update the value of the Option from the UI's component.- Specified by:
updateOption
in interfaceOptionUpdater
- Specified by:
updateOption
in classOptionUI<FileOption>
-
reset
public void reset()
Reset the value of the UI's component from the Option.- Specified by:
reset
in interfaceOptionUpdater
- Specified by:
reset
in classOptionUI<FileOption>
-
-