home *** CD-ROM | disk | FTP | other *** search
- import com.sun.java.swing.AbstractAction;
- import com.sun.java.swing.text.Document;
- import com.sun.java.swing.text.PlainDocument;
- import java.awt.event.ActionEvent;
-
- class Notepad$NewAction extends AbstractAction {
- // $FF: synthetic field
- private final Notepad this$0;
-
- Notepad$NewAction(Notepad var1) {
- super("new");
- this.this$0 = var1;
- this.this$0 = var1;
- }
-
- Notepad$NewAction(Notepad var1, String var2) {
- super(var2);
- this.this$0 = var1;
- this.this$0 = var1;
- }
-
- public void actionPerformed(ActionEvent var1) {
- Document var2 = this.this$0.getEditor().getDocument();
- if (var2 != null) {
- var2.removeUndoableEditListener(this.this$0);
- }
-
- this.this$0.getEditor().setDocument(new PlainDocument());
- this.this$0.getEditor().getDocument().addUndoableEditListener(this.this$0);
- this.this$0.revalidate();
- }
- }
-