|
||||||||||
| 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<Color,JPanel>
edu.rice.cs.drjava.ui.config.ColorOptionComponent
public class ColorOptionComponent
Graphical form of a ColorOption.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
OptionComponent.ChangeListener |
| Field Summary | |
|---|---|
private JButton |
_button
|
private Color |
_color
|
private JTextField |
_colorField
|
private boolean |
_isBackgroundColor
|
private boolean |
_isBoldText
|
private JPanel |
_panel
|
| Fields inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
_entireColumn, _guiComponent, _label, _labelText, _option, _parent |
| Constructor Summary | |
|---|---|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent)
Main constructor for ColorOptionComponent. |
|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
boolean isBackgroundColor)
An alternate constructor, allowing the caller to specify whether this color is a background color. |
|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
boolean isBackgroundColor,
boolean isBoldText)
|
|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description)
Constructor that allows for a tooltip description. |
|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description,
boolean isBackgroundColor)
Constructor that allows for a tooltip description as well as whether or not this is a background color. |
|
ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description,
boolean isBackgroundColor,
boolean isBoldText)
Constructor that allows for a tooltip description as well as whether or not this is a background color. |
|
| Method Summary | |
|---|---|
private void |
_updateField(Color c)
Updates the component's field to display the given color. |
void |
chooseColor()
Shows a color chooser dialog for picking a new color. |
void |
setDescription(String description)
Sets the tooltip description text for this option. |
void |
setValue(Color 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 |
| Field Detail |
|---|
private JButton _button
private JTextField _colorField
private JPanel _panel
private Color _color
private boolean _isBackgroundColor
private boolean _isBoldText
| Constructor Detail |
|---|
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent)
opt - The ColorOption to displaytext - The text to display in the label of the componentparent - The Frame displaying this component
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
boolean isBackgroundColor)
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
boolean isBackgroundColor,
boolean isBoldText)
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description)
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description,
boolean isBackgroundColor)
public ColorOptionComponent(ColorOption opt,
String text,
SwingFrame parent,
String description,
boolean isBackgroundColor,
boolean isBoldText)
| Method Detail |
|---|
public void setDescription(String description)
setDescription in class OptionComponent<Color,JPanel>description - the tooltip textpublic boolean updateConfig()
updateConfig in class OptionComponent<Color,JPanel>public void setValue(Color value)
setValue in class OptionComponent<Color,JPanel>private void _updateField(Color c)
public void chooseColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||