edu.rice.cs.drjava.ui.config
Class IntegerOptionComponent
java.lang.Object
edu.rice.cs.drjava.ui.config.OptionComponent<java.lang.Integer,javax.swing.JTextField>
edu.rice.cs.drjava.ui.config.IntegerOptionComponent
- All Implemented Interfaces:
- java.io.Serializable
public class IntegerOptionComponent
- extends OptionComponent<java.lang.Integer,javax.swing.JTextField>
Graphical form of an IntegerOption.
- Version:
- $Id: IntegerOptionComponent.java 5232 2010-04-24 00:14:05Z mgricken $
- See Also:
- Serialized Form
|
Field Summary |
private javax.swing.JTextField |
_jtf
|
|
Method Summary |
void |
setDescription(java.lang.String description)
Sets the tooltip description text for this option. |
void |
setValue(java.lang.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, getComponent, getEntireColumn, getLabel, getLabelText, getOption, notifyChangeListeners, removeChangeListener, resetToCurrent, resetToDefault, setComponent, setEntireColumn, showErrorMessage, showErrorMessage, useEntireColumn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_jtf
private volatile javax.swing.JTextField _jtf
IntegerOptionComponent
public IntegerOptionComponent(IntegerOption opt,
java.lang.String text,
SwingFrame parent)
IntegerOptionComponent
public IntegerOptionComponent(IntegerOption opt,
java.lang.String text,
SwingFrame parent,
java.lang.String description)
- Constructor that allows for a tooltip description.
setDescription
public void setDescription(java.lang.String description)
- Sets the tooltip description text for this option.
- Specified by:
setDescription in class OptionComponent<java.lang.Integer,javax.swing.JTextField>
- 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<java.lang.Integer,javax.swing.JTextField>
- Returns:
- true if the new value is set successfully
setValue
public void setValue(java.lang.Integer value)
- Displays the given value.
- Specified by:
setValue in class OptionComponent<java.lang.Integer,javax.swing.JTextField>