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

java.lang.Object
  extended by net.sf.freecol.client.gui.option.OptionUI<T>
      extended by net.sf.freecol.client.gui.option.SliderOptionUI<RangeOption>
          extended by net.sf.freecol.client.gui.option.RangeOptionUI
All Implemented Interfaces:
OptionUpdater

public final class RangeOptionUI
extends SliderOptionUI<RangeOption>

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


Field Summary
 
Fields inherited from class net.sf.freecol.client.gui.option.OptionUI
gui
 
Constructor Summary
RangeOptionUI(GUI gui, RangeOption option, boolean editable)
          Creates a new RangeOptionUI for the given RangeOption.
 
Method Summary
 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.SliderOptionUI
getComponent, getLabel
 
Methods inherited from class net.sf.freecol.client.gui.option.OptionUI
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
 

Constructor Detail

RangeOptionUI

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

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

updateOption

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

Specified by:
updateOption in interface OptionUpdater
Overrides:
updateOption in class SliderOptionUI<RangeOption>

reset

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

Specified by:
reset in interface OptionUpdater
Overrides:
reset in class SliderOptionUI<RangeOption>