|
||||||||||
| 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<javax.swing.KeyStroke,javax.swing.JPanel>
edu.rice.cs.drjava.ui.config.KeyStrokeOptionComponent
public class KeyStrokeOptionComponent
Graphical form of a KeyStrokeOption.
| Nested Class Summary | |
|---|---|
private class |
KeyStrokeOptionComponent.GetKeyDialog
A dialog that allows the user to type in a keystroke to be bound to the action that was clicked. |
| Nested classes/interfaces inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
OptionComponent.ChangeListener |
| Field Summary | |
|---|---|
private javax.swing.JButton |
_button
|
private static KeyStrokeOptionComponent.GetKeyDialog |
_getKeyDialog
|
private javax.swing.KeyStroke |
_key
|
static java.util.HashMap<javax.swing.KeyStroke,KeyStrokeOptionComponent> |
_keyToKSOC
|
private javax.swing.JPanel |
_panel
|
private static int |
DIALOG_HEIGHT
|
| Fields inherited from class edu.rice.cs.drjava.ui.config.OptionComponent |
|---|
_entireColumn, _guiComponent, _label, _labelText, _option, _parent |
| Constructor Summary | |
|---|---|
KeyStrokeOptionComponent(KeyStrokeOption opt,
java.lang.String text,
SwingFrame parent)
|
|
KeyStrokeOptionComponent(KeyStrokeOption opt,
java.lang.String text,
SwingFrame parent,
java.lang.String description)
Constructor that allows for a tooltip description. |
|
| Method Summary | |
|---|---|
int |
compareTo(KeyStrokeOptionComponent other)
Compares two KeyStrokeOptionComponents based on the text of their labels. |
javax.swing.KeyStroke |
getConfigKeyStroke()
Returns the KeyStroke current set in the Config settings. |
javax.swing.KeyStroke |
getKeyStroke()
Returns the currently selected KeyStroke. |
void |
setDescription(java.lang.String description)
Sets the tooltip description text for this option. |
void |
setValue(javax.swing.KeyStroke value)
Displays the given value. |
java.lang.String |
toString()
Returns a custom string representation of this option component. |
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, wait, wait, wait |
| Field Detail |
|---|
private static final int DIALOG_HEIGHT
public static final java.util.HashMap<javax.swing.KeyStroke,KeyStrokeOptionComponent> _keyToKSOC
private javax.swing.JButton _button
private javax.swing.JPanel _panel
private static KeyStrokeOptionComponent.GetKeyDialog _getKeyDialog
private javax.swing.KeyStroke _key
| Constructor Detail |
|---|
public KeyStrokeOptionComponent(KeyStrokeOption opt,
java.lang.String text,
SwingFrame parent)
public KeyStrokeOptionComponent(KeyStrokeOption opt,
java.lang.String text,
SwingFrame parent,
java.lang.String description)
| Method Detail |
|---|
public void setDescription(java.lang.String description)
setDescription in class OptionComponent<javax.swing.KeyStroke,javax.swing.JPanel>description - the tooltip textpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean updateConfig()
updateConfig in class OptionComponent<javax.swing.KeyStroke,javax.swing.JPanel>public void setValue(javax.swing.KeyStroke value)
setValue in class OptionComponent<javax.swing.KeyStroke,javax.swing.JPanel>public int compareTo(KeyStrokeOptionComponent other)
compareTo in interface java.lang.Comparable<KeyStrokeOptionComponent>public javax.swing.KeyStroke getKeyStroke()
public javax.swing.KeyStroke getConfigKeyStroke()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||