edu.rice.cs.drjava.ui.config
Class ButtonComponent
java.lang.Object
edu.rice.cs.drjava.ui.config.OptionComponent<Object,JButton>
edu.rice.cs.drjava.ui.config.ButtonComponent
- All Implemented Interfaces:
- Serializable
public class ButtonComponent
- extends OptionComponent<Object,JButton>
Button component to perform some action. Nothing gets saved.
- See Also:
- Serialized Form
|
Method Summary |
void |
setDescription(String description)
Sets the tooltip description text for this option. |
void |
setValue(Object 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 |
_jb
protected JButton _jb
ButtonComponent
public ButtonComponent(ActionListener l,
String text,
SwingFrame parent)
- Constructs a new ButtonComponent.
- Parameters:
l - the listener that gets executed when the button is pressedtext - the text to display with the optionparent - the parent frame
ButtonComponent
public ButtonComponent(ActionListener l,
String text,
SwingFrame parent,
String description)
- Constructs a new ButtonComponent with a tooltip description.
- Parameters:
l - the listener that gets executed when the button is pressedtext - the text to display with the optionparent - the parent framedescription - text to show in a tooltip over
setDescription
public void setDescription(String description)
- Sets the tooltip description text for this option.
- Specified by:
setDescription in class OptionComponent<Object,JButton>
- Parameters:
description - the tooltip text
updateConfig
public boolean updateConfig()
- Updates the config object with the new setting.
- Specified by:
updateConfig in class OptionComponent<Object,JButton>
- Returns:
- true if the new value is set successfully
setValue
public void setValue(Object value)
- Displays the given value.
- Specified by:
setValue in class OptionComponent<Object,JButton>