< prev index next >

src/java.desktop/share/classes/javax/swing/undo/CompoundEdit.java

Print this page

        

@@ -33,17 +33,17 @@
  * @author Ray Ryan
  */
 @SuppressWarnings("serial") // Same-version serialization only
 public class CompoundEdit extends AbstractUndoableEdit {
     /**
-     * True if this edit has never received <code>end</code>.
+     * True if this edit has never received {@code end}.
      */
     boolean inProgress;
 
     /**
-     * The collection of <code>UndoableEdit</code>s
-     * undone/redone en masse by this <code>CompoundEdit</code>.
+     * The collection of {@code UndoableEdit}s
+     * undone/redone en masse by this {@code CompoundEdit}.
      */
     protected Vector<UndoableEdit> edits;
 
     /**
      * Constructs a {@code CompoundEdit}.

@@ -53,12 +53,12 @@
         inProgress = true;
         edits = new Vector<UndoableEdit>();
     }
 
     /**
-     * Sends <code>undo</code> to all contained
-     * <code>UndoableEdits</code> in the reverse of
+     * Sends {@code undo} to all contained
+     * {@code UndoableEdits} in the reverse of
      * the order in which they were added.
      */
     public void undo() throws CannotUndoException {
         super.undo();
         int i = edits.size();

@@ -67,12 +67,12 @@
             e.undo();
         }
     }
 
     /**
-     * Sends <code>redo</code> to all contained
-     * <code>UndoableEdit</code>s in the order in
+     * Sends {@code redo} to all contained
+     * {@code UndoableEdit}s in the order in
      * which they were added.
      */
     public void redo() throws CannotRedoException {
         super.redo();
         Enumeration<UndoableEdit> cursor = edits.elements();

@@ -80,13 +80,13 @@
             cursor.nextElement().redo();
         }
     }
 
     /**
-     * Returns the last <code>UndoableEdit</code> in
-     * <code>edits</code>, or <code>null</code>
-     * if <code>edits</code> is empty.
+     * Returns the last {@code UndoableEdit} in
+     * {@code edits}, or {@code null}
+     * if {@code edits} is empty.
      *
      * @return the last {@code UndoableEdit} in {@code edits},
      *         or {@code null} if {@code edits} is empty.
      */
     protected UndoableEdit lastEdit() {

@@ -96,11 +96,11 @@
         else
             return null;
     }
 
     /**
-     * Sends <code>die</code> to each subedit,
+     * Sends {@code die} to each subedit,
      * in the reverse of the order that they were added.
      */
     public void die() {
         int size = edits.size();
         for (int i = size-1; i >= 0; i--)

@@ -112,22 +112,22 @@
         }
         super.die();
     }
 
     /**
-     * If this edit is <code>inProgress</code>,
-     * accepts <code>anEdit</code> and returns true.
+     * If this edit is {@code inProgress},
+     * accepts {@code anEdit} and returns true.
      *
-     * <p>The last edit added to this <code>CompoundEdit</code>
-     * is given a chance to <code>addEdit(anEdit)</code>.
-     * If it refuses (returns false), <code>anEdit</code> is
-     * given a chance to <code>replaceEdit</code> the last edit.
-     * If <code>anEdit</code> returns false here,
-     * it is added to <code>edits</code>.
+     * <p>The last edit added to this {@code CompoundEdit}
+     * is given a chance to {@code addEdit(anEdit)}.
+     * If it refuses (returns false), {@code anEdit} is
+     * given a chance to {@code replaceEdit} the last edit.
+     * If {@code anEdit} returns false here,
+     * it is added to {@code edits}.
      *
      * @param anEdit the edit to be added
-     * @return true if the edit is <code>inProgress</code>;
+     * @return true if the edit is {@code inProgress};
      *  otherwise returns false
      */
     public boolean addEdit(UndoableEdit anEdit) {
         if (!inProgress) {
             return false;

@@ -152,31 +152,31 @@
             return true;
         }
     }
 
     /**
-     * Sets <code>inProgress</code> to false.
+     * Sets {@code inProgress} to false.
      *
      * @see #canUndo
      * @see #canRedo
      */
     public void end() {
         inProgress = false;
     }
 
     /**
-     * Returns false if <code>isInProgress</code> or if super
+     * Returns false if {@code isInProgress} or if super
      * returns false.
      *
      * @see     #isInProgress
      */
     public boolean canUndo() {
         return !isInProgress() && super.canUndo();
     }
 
     /**
-     * Returns false if <code>isInProgress</code> or if super
+     * Returns false if {@code isInProgress} or if super
      * returns false.
      *
      * @see     #isInProgress
      */
     public boolean canRedo() {

@@ -194,12 +194,12 @@
     public boolean isInProgress() {
         return inProgress;
     }
 
     /**
-     * Returns true if any of the <code>UndoableEdit</code>s
-     * in <code>edits</code> do.
+     * Returns true if any of the {@code UndoableEdit}s
+     * in {@code edits} do.
      * Returns false if they all return false.
      */
     public boolean  isSignificant() {
         Enumeration<UndoableEdit> cursor = edits.elements();
         while (cursor.hasMoreElements()) {

@@ -209,13 +209,13 @@
         }
         return false;
     }
 
     /**
-     * Returns <code>getPresentationName</code> from the
-     * last <code>UndoableEdit</code> added to
-     * <code>edits</code>. If <code>edits</code> is empty,
+     * Returns {@code getPresentationName} from the
+     * last {@code UndoableEdit} added to
+     * {@code edits}. If {@code edits} is empty,
      * calls super.
      */
     public String getPresentationName() {
         UndoableEdit last = lastEdit();
         if (last != null) {

@@ -224,14 +224,14 @@
             return super.getPresentationName();
         }
     }
 
     /**
-     * Returns <code>getUndoPresentationName</code>
-     * from the last <code>UndoableEdit</code>
-     * added to <code>edits</code>.
-     * If <code>edits</code> is empty, calls super.
+     * Returns {@code getUndoPresentationName}
+     * from the last {@code UndoableEdit}
+     * added to {@code edits}.
+     * If {@code edits} is empty, calls super.
      */
     public String getUndoPresentationName() {
         UndoableEdit last = lastEdit();
         if (last != null) {
             return last.getUndoPresentationName();

@@ -239,14 +239,14 @@
             return super.getUndoPresentationName();
         }
     }
 
     /**
-     * Returns <code>getRedoPresentationName</code>
-     * from the last <code>UndoableEdit</code>
-     * added to <code>edits</code>.
-     * If <code>edits</code> is empty, calls super.
+     * Returns {@code getRedoPresentationName}
+     * from the last {@code UndoableEdit}
+     * added to {@code edits}.
+     * If {@code edits} is empty, calls super.
      */
     public String getRedoPresentationName() {
         UndoableEdit last = lastEdit();
         if (last != null) {
             return last.getRedoPresentationName();
< prev index next >