harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r507003 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java
Date Tue, 13 Feb 2007 13:54:54 GMT
Author: apetrenko
Date: Tue Feb 13 05:54:49 2007
New Revision: 507003

URL: http://svn.apache.org/viewvc?view=rev&rev=507003
Log:
Patch for HARMONY- 3164 "[classlib][swing] j.s.undo.CompoundEdit has compiler warnings"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java?view=diff&rev=507003&r1=507002&r2=507003
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/CompoundEdit.java
Tue Feb 13 05:54:49 2007
@@ -28,6 +28,12 @@
 
 public class CompoundEdit extends AbstractUndoableEdit {
 
+    /**
+     * This field is added as performance optimization but not as
+     * a guarantee of correct deserialization.
+     */
+    private static final long serialVersionUID = -6512679249930119683L;
+
     protected Vector<UndoableEdit> edits = new Vector<UndoableEdit>();
 
     /**
@@ -36,6 +42,7 @@
      */
     boolean inProgress = true;
 
+    @Override
     public boolean addEdit(final UndoableEdit anEdit) {
        if (!inProgress) {
            return false;
@@ -68,6 +75,7 @@
      *  obj.addEdit(new CompoundEdit());
      *  System.out.println(obj.toString());
      */
+    @Override
     public String toString() {
         String str = super.toString();
         str += " inProgress: " + inProgress;
@@ -79,6 +87,7 @@
         return str;
     }
 
+    @Override
     public String getUndoPresentationName() {
         UndoableEdit last = lastEdit();
 
@@ -92,6 +101,7 @@
         return super.getUndoPresentationName();
     }
 
+    @Override
     public String getRedoPresentationName() {
         UndoableEdit last = lastEdit();
 
@@ -105,6 +115,7 @@
         return super.getRedoPresentationName();
     }
 
+    @Override
     public String getPresentationName() {
         UndoableEdit last = lastEdit();
 
@@ -118,6 +129,7 @@
         return super.getPresentationName();
     }
 
+    @Override
     public boolean isSignificant() {
         for (ListIterator li = edits.listIterator(); li.hasNext();) {
             if (((UndoableEdit)li.next()).isSignificant()) {
@@ -131,14 +143,17 @@
         return inProgress;
     }
 
+    @Override
     public boolean canUndo() {
         return !isInProgress() && super.canUndo();
     }
 
+    @Override
     public boolean canRedo() {
         return !isInProgress() && super.canRedo();
     }
 
+    @Override
     public void undo() {
         super.undo();
         for (ListIterator li = edits.listIterator(edits.size());
@@ -147,6 +162,7 @@
         }
     }
 
+    @Override
     public void redo() {
         super.redo();
         for (ListIterator li = edits.listIterator(); li.hasNext();) {
@@ -158,6 +174,7 @@
         inProgress = false;
     }
 
+    @Override
     public void die() {
         super.die();
         for (ListIterator li = edits.listIterator(edits.size());



Mime
View raw message