Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.borg.model.undo
Class UndoLog

    java.lang.Object
      net.sf.borg.model.undo.UndoLog

    public class UndoLog

extends Object

The UndoLog. This class maintains a stack of items that can be undone.

Method Summary
`void` | `addItem(UndoItem item)` add an undo item to the log.
`void` | `clear()` get rid of all undo items.
`void` | `executeUndo()` execute the top undo item on the stack and remove it from the stack.
`(package private) Stack<UndoItem>` | `getItems()` get all of the undo items.
`Collection<String>` | `getItemStrings()` get descriptions for all items in the undo log.
`static UndoLog` | `getReference()` get a reference to the undo log singleton.
`String` | `getTopItem()` get a description of the top item on the stack.
`(package private) UndoItem` | `pop()` Pop an item off of the stack.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getReference

    public static UndoLog getReference()

  get a reference to the undo log singleton.

  Returns:
    the undo log singletone

### addItem

    public void addItem(UndoItem item)

  add an undo item to the log.

  Parameters:
    `item` - the item

### getTopItem

    public final String getTopItem()

  get a description of the top item on the stack.

  Returns:
    a description of the top item

### getItemStrings

    public Collection<String> getItemStrings()

  get descriptions for all items in the undo log.

  Returns:
    - a collection containing descriptions of all undo items in the order that they would be pulled off the stack

### executeUndo

    public void executeUndo()

  execute the top undo item on the stack and remove it from the stack.

### clear

    public void clear()

  get rid of all undo items.

### getItems

    Stack<UndoItem> getItems()

  get all of the undo items. This method has package visibility. Code outside of the undo package should not be able to get a hold of the undo items themselves

  Returns:
    - the undo Stack

### pop

    UndoItem pop()

  Pop an item off of the stack.

  Returns:
    the undo item

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic