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

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

public final class FileOptionUI
extends OptionUI<FileOption>

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


Field Summary
private  javax.swing.JTextField fileField
           
private  javax.swing.JPanel panel
           
 
Fields inherited from class net.sf.freecol.client.gui.option.OptionUI
gui
 
Constructor Summary
FileOptionUI(GUI gui, FileOption option, boolean editable)
          Creates a new FileOptionUI for the given FileOption.
 
Method Summary
 javax.swing.JPanel 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 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
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

panel

private javax.swing.JPanel panel

fileField

private final javax.swing.JTextField fileField
Constructor Detail

FileOptionUI

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

Parameters:
option - The FileOption 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.


getComponent

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

Specified by:
getComponent in class OptionUI<FileOption>
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<FileOption>

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<FileOption>