|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pietschy.command.Command
org.pietschy.command.ActionCommand
org.pietschy.command.ToggleCommand
org.pietschy.command.undo.UndoableToggleCommand
org.pietschy.command.demo.undo.SimpleUndoToggle
public class SimpleUndoToggle
Created by IntelliJ IDEA. User: andrewp Date: 11/04/2004 Time: 14:34:50 To change this template use Options | File Templates.
| Field Summary |
|---|
| Fields inherited from class org.pietschy.command.ActionCommand |
|---|
HINT_ACTION_EVENT, HINT_INVOKER, HINT_INVOKER_WINDOW, HINT_MODIFIERS |
| Fields inherited from class org.pietschy.command.Command |
|---|
internalLog, listenerList, pcs |
| Constructor Summary | |
|---|---|
SimpleUndoToggle(java.lang.String commandId,
javax.swing.JTextPane textPane)
|
|
| Method Summary | |
|---|---|
protected javax.swing.undo.UndoableEdit |
performEdit(boolean selected)
Subclasses must override to perform the actual edit. |
| Methods inherited from class org.pietschy.command.undo.UndoableToggleCommand |
|---|
addUndoableEditListener, getUndoableEditListeners, handleSelection, postEdit, removeUndoableEditListener |
| Methods inherited from class org.pietschy.command.ToggleCommand |
|---|
addNotify, applySelection, attemptSelection, configureButtonStates, createButton, createCheckBox, createCheckBox, createCheckBox, createCheckBox, createMenuItem, handleExecute, isSelected, removeNotify, requestDefautIn, setSelected |
| Methods inherited from class org.pietschy.command.ActionCommand |
|---|
addCommandListener, addInterceptor, areEqual, attach, detach, execute, execute, getActionAdapter, getActionAdapter, getActionCommand, getActionEvent, getHint, getHint, getHints, getInvoker, getInvokerWindow, getModifiers, installShortCut, installShortCut, postExecute, preExecute, putHint, putHints, removeCommandListener, removeInterceptor, setActionCommand, uninstallShortCut, uninstallShortCut |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.pietschy.command.ActionCommandExecutor |
|---|
addPropertyChangeListener, addPropertyChangeListener, isEnabled, removePropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public SimpleUndoToggle(java.lang.String commandId,
javax.swing.JTextPane textPane)
commandId - | Method Detail |
|---|
protected javax.swing.undo.UndoableEdit performEdit(boolean selected)
UndoableToggleCommandToggleCommand.handleSelection(boolean)
in that it can throw a ToggleVetoException to cancel the edit.
Please note that the edit object should call ToggleCommand.applySelection(boolean) to update the state of this command
without causing a new UndoableEdit to be created. For example
class MyToggle.ToggleUndoableEdit extends UndoableEdit
{
public void undo()
{
// undo any command specific stuff...
...
// and reset our state without causeing any side effects..
applySelection(oldState);
}
}
performEdit in class UndoableToggleCommandselected - the new selected state of the command.
ToggleCommand.applySelection(boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||