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

## info.bioinfweb.treegraph.document.undo.edit
Class AssignLabelIDsEdit

    java.lang.Object
      info.bioinfweb.treegraph.document.undo.DocumentEdit
          info.bioinfweb.treegraph.document.undo.edit.AssignLabelIDsEdit

All Implemented Interfaces:
  javax.swing.undo.UndoableEdit

    public class AssignLabelIDsEdit

extends DocumentEdit

This edit assigns label IDs to all labels in the tree which do not have an ID.

Author:
  BenStoever

Field Summary
`private java.util.Vector<java.lang.String>` | `currentIDs`
`private java.util.Vector<java.lang.String>` | `newIDs`

Fields inherited from class info.bioinfweb.treegraph.document.undo.DocumentEdit
`document`

Constructor Summary
`AssignLabelIDsEdit(Document document)`

Method Summary
`private int` | `assignIDsToLabelBlock(Labels labels, boolean above, int pos)` Assigns a new label ID to each label in this label block currently without an ID.
`private void` | `assignIDsToSubtree(Node root)`
`boolean` | `canUndo()`
`private java.lang.String` | `getNewID(int pos)`
`java.lang.String` | `getPresentationName()`
`void` | `redo()`

Methods inherited from class info.bioinfweb.treegraph.document.undo.DocumentEdit
`addEdit, canRedo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, undo`

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

Field Detail

### currentIDs

    private java.util.Vector<java.lang.String> currentIDs

### newIDs

    private java.util.Vector<java.lang.String> newIDs

Constructor Detail

### AssignLabelIDsEdit

    public AssignLabelIDsEdit(Document document)

Method Detail

### getNewID

    private java.lang.String getNewID(int pos)

### assignIDsToLabelBlock

    private int assignIDsToLabelBlock(Labels labels,
                                      boolean above,
                                      int pos)

  Assigns a new label ID to each label in this label block currently without an ID.

  Parameters:
    `labels` - - the `Labels`-object containing the label block.
    `above` - - whether the above label block is used
    `pos` - - the start position in the list of new label IDs
  Returns:
    the position in the list of new label IDs

### assignIDsToSubtree

    private void assignIDsToSubtree(Node root)

### redo

    public void redo()
              throws javax.swing.undo.CannotRedoException

  Specified by:
    `redo` in interface `javax.swing.undo.UndoableEdit`
  Overrides:
    `redo` in class `DocumentEdit`
  Throws:
    `javax.swing.undo.CannotRedoException`

### canUndo

    public boolean canUndo()

  Specified by:
    `canUndo` in interface `javax.swing.undo.UndoableEdit`
  Overrides:
    `canUndo` in class `DocumentEdit`

### getPresentationName

    public java.lang.String getPresentationName()

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