2 * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
\r
4 * The program is provided "as is" without any warranty express or
\r
5 * implied, including the warranty of non-infringement and the implied
\r
6 * warranties of merchantibility and fitness for a particular purpose.
\r
7 * IBM will not be liable for any damages suffered by you as a result
\r
8 * of using the Program. In no event will IBM be liable for any
\r
9 * special, indirect or consequential damages or lost profits even if
\r
10 * IBM has been advised of the possibility of their occurrence. IBM
\r
11 * will not be liable for any third party claims against you.
\r
13 package com.ibm.richtext.textpanel;
\r
15 abstract class Command {
\r
17 static final String COPYRIGHT =
\r
18 "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
\r
19 private Command fPreviousCommand = null;
\r
21 // fModified is used to keep a textModified flag for
\r
23 private boolean fModified;
\r
29 public Command previousCommand() {
\r
30 return fPreviousCommand;
\r
33 public void setPreviousCommand(Command previousCommand) {
\r
34 fPreviousCommand = previousCommand;
\r
37 public abstract void execute();
\r
38 public abstract void undo();
\r
40 public void redo() {
\r
44 public final boolean isModified() {
\r
49 public final void setModified(boolean modified) {
\r
51 fModified = modified;
\r