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 aFileOptionin order to enable values to be both seen and changed.
-
-
Constructor Summary
Constructors Constructor Description FileOptionUI(GUI gui, FileOption option, boolean editable)Creates a newFileOptionUIfor the givenFileOption.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JPanelgetComponent()Get theComponentused to set the value of the Option.voidreset()Reset the value of the UI's component from the Option.voidsetValue(java.io.File f)Sets the value of this UI's component.voidupdateOption()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 newFileOptionUIfor the givenFileOption.- Parameters:
gui- TheGUIto create a change dialog on.option- TheFileOptionto 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 newFilevalue.
-
getComponent
public javax.swing.JPanel getComponent()
Get theComponentused to set the value of the Option.- Specified by:
getComponentin classOptionUI<FileOption>- Returns:
- a
JComponentvalue
-
updateOption
public void updateOption()
Update the value of the Option from the UI's component.- Specified by:
updateOptionin interfaceOptionUpdater- Specified by:
updateOptionin classOptionUI<FileOption>
-
reset
public void reset()
Reset the value of the UI's component from the Option.- Specified by:
resetin interfaceOptionUpdater- Specified by:
resetin classOptionUI<FileOption>
-
-