|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.config.OptionComponent<java.lang.Boolean,javax.swing.JComponent>
edu.rice.cs.drjava.ui.config.ToolbarOptionComponent
public class ToolbarOptionComponent
The special option component for the toolbar text and toolbar icon options. Not a true OptionComponent, in that it actually represents and governs the configuration of two BooleanOptions (i.e. those corresponding to TOOLBAR_TEXT_ENABLED and TOOLBAR_ICONS_ENABLED) bypassing the the normal graphical representation with JRadioButtons, in order to comply with the special circumstances regarding their setting.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
OptionComponent.ChangeListener |
| Field Summary | |
|---|---|
private javax.swing.JPanel |
_buttonPanel
|
private javax.swing.ButtonGroup |
_group
|
private javax.swing.JRadioButton |
_iconsButton
|
private javax.swing.JRadioButton |
_noneButton
|
private javax.swing.JRadioButton |
_textAndIconsButton
|
private javax.swing.JRadioButton |
_textButton
|
static java.lang.String |
ICONS_ONLY
|
static java.lang.String |
NONE
|
static java.lang.String |
TEXT_AND_ICONS
|
static java.lang.String |
TEXT_ONLY
|
| Fields inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
_entireColumn, _guiComponent, _label, _labelText, _option, _parent |
| Constructor Summary | |
|---|---|
ToolbarOptionComponent(java.lang.String title,
SwingFrame parent)
The constructor does not take an option since we have specific knowledge of the two options we'll need for this component. |
|
ToolbarOptionComponent(java.lang.String title,
SwingFrame parent,
java.lang.String description)
Constructor that allows for a tooltip description. |
|
| Method Summary | |
|---|---|
private void |
_setSelected(boolean textEnabled,
boolean iconsEnabled,
boolean isEnabled)
Selects the radio button corresponding to the specified configuration. |
void |
resetToCurrent()
Selects the radio button corresponding to the current config options. |
void |
resetToDefault()
Selects the radio button corresponding to the default values. |
void |
setComponent(javax.swing.JComponent component)
Set the JComponent to display for this OptionComponent. |
void |
setDescription(java.lang.String description)
Sets the tooltip description text for this option. |
void |
setValue(java.lang.Boolean 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, setEntireColumn, showErrorMessage, showErrorMessage, useEntireColumn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.swing.JRadioButton _noneButton
private javax.swing.JRadioButton _textButton
private javax.swing.JRadioButton _iconsButton
private javax.swing.JRadioButton _textAndIconsButton
private javax.swing.ButtonGroup _group
private javax.swing.JPanel _buttonPanel
public static final java.lang.String NONE
public static final java.lang.String TEXT_ONLY
public static final java.lang.String ICONS_ONLY
public static final java.lang.String TEXT_AND_ICONS
| Constructor Detail |
|---|
public ToolbarOptionComponent(java.lang.String title,
SwingFrame parent)
title - the title for this panelparent - the parent frame
public ToolbarOptionComponent(java.lang.String title,
SwingFrame parent,
java.lang.String description)
| Method Detail |
|---|
public void setDescription(java.lang.String description)
setDescription in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>description - the tooltip textpublic void resetToCurrent()
resetToCurrent in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>public void resetToDefault()
resetToDefault in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>
private void _setSelected(boolean textEnabled,
boolean iconsEnabled,
boolean isEnabled)
textEnabled - Whether toolbar text is enablediconsEnabled - Whether toolbar icons are enabledpublic boolean updateConfig()
updateConfig in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>public void setValue(java.lang.Boolean value)
setValue in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>public void setComponent(javax.swing.JComponent component)
setComponent in class OptionComponent<java.lang.Boolean,javax.swing.JComponent>component - GUI component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||