edu.rice.cs.drjava.ui.config
Class IntegerOptionComponent

java.lang.Object
  extended by edu.rice.cs.drjava.ui.config.OptionComponent<Integer>
      extended by edu.rice.cs.drjava.ui.config.IntegerOptionComponent
All Implemented Interfaces:
Serializable

public class IntegerOptionComponent
extends OptionComponent<Integer>

Graphical form of an IntegerOption.

Version:
$Id: IntegerOptionComponent.java 4691 2008-12-02 23:33:27Z dlsmith $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.config.OptionComponent
OptionComponent.ChangeListener
 
Field Summary
 
Fields inherited from class edu.rice.cs.drjava.ui.config.OptionComponent
_entireColumn, _label, _labelText, _option, _parent
 
Constructor Summary
IntegerOptionComponent(IntegerOption opt, String text, SwingFrame parent)
           
IntegerOptionComponent(IntegerOption opt, String text, SwingFrame parent, String description)
          Constructor that allows for a tooltip description.
 
Method Summary
 JComponent getComponent()
          Return's this OptionComponent's configurable component.
 void setDescription(String description)
          Sets the tooltip description text for this option.
 void setValue(Integer value)
          Displays the given value.
 boolean updateConfig()
          Updates the config object with the new setting.
 
Methods inherited from class edu.rice.cs.drjava.ui.config.OptionComponent
addChangeListener, getEntireColumn, getLabel, getLabelText, getOption, notifyChangeListeners, removeChangeListener, resetToCurrent, resetToDefault, setEntireColumn, showErrorMessage, showErrorMessage, useEntireColumn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerOptionComponent

public IntegerOptionComponent(IntegerOption opt,
                              String text,
                              SwingFrame parent)

IntegerOptionComponent

public IntegerOptionComponent(IntegerOption opt,
                              String text,
                              SwingFrame parent,
                              String description)
Constructor that allows for a tooltip description.

Method Detail

setDescription

public void setDescription(String description)
Sets the tooltip description text for this option.

Specified by:
setDescription in class OptionComponent<Integer>
Parameters:
description - the tooltip text

updateConfig

public boolean updateConfig()
Updates the config object with the new setting. Should run in event thread.

Specified by:
updateConfig in class OptionComponent<Integer>
Returns:
true if the new value is set successfully

setValue

public void setValue(Integer value)
Displays the given value.

Specified by:
setValue in class OptionComponent<Integer>

getComponent

public JComponent getComponent()
Return's this OptionComponent's configurable component.

Specified by:
getComponent in class OptionComponent<Integer>