|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
edu.rice.cs.drjava.ui.DefinitionsPane.IndentKeyAction
private class DefinitionsPane.IndentKeyAction
Used for indent action spawned by pressing the enter key, '{', or '}'.
| Field Summary | |
|---|---|
private Action |
_defaultAction
The default action to take when the specified key is pressed. |
private boolean |
_indentNonCode
Whether to perform the indent if the caret is in a String or comment. |
private String |
_key
The key string ("\n"|"{"|"}") for the key pressed that invokes this instance. |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
DefinitionsPane.IndentKeyAction(String key,
Action defaultAction)
Creates an IndentKeyAction which only invokes indent if the caret is in code, and not Strings or comments. |
|
DefinitionsPane.IndentKeyAction(String key,
Action defaultAction,
boolean indentNonCode)
Creates a new IndentKeyAction with the specified parameters. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Handle the "key typed" event from the text field. |
protected Indenter.IndentReason |
getIndentReason()
This method tells what the reason should be for spawning this indent event Defaults to Indenter.IndentReason.OTHER |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final String _key
private final Action _defaultAction
private final boolean _indentNonCode
| Constructor Detail |
|---|
DefinitionsPane.IndentKeyAction(String key,
Action defaultAction)
DefinitionsPane.IndentKeyAction(String key,
Action defaultAction,
boolean indentNonCode)
key - name of the key, for debugging purposesdefaultAction - action to perform in addition to indentingindentNonCode - whether to indent Strings and comments| Method Detail |
|---|
protected Indenter.IndentReason getIndentReason()
public void actionPerformed(ActionEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||