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 ApplyNameTableEdit

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

All Implemented Interfaces:
  javax.swing.undo.UndoableEdit

    public class ApplyNameTableEdit

extends DocumentEdit

Field Summary
`private NodeDataAdapter` | `adapter`
`private boolean` | `caseSensitive`
`private boolean` | `ignoreWhitespaces`
`private java.util.List<java.lang.String>` | `newNames`
`private java.util.List<java.lang.String>` | `oldNames`
`private boolean` | `parseNumericValues`
`private java.util.List<TextElementData>` | `savedValues`

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

Constructor Summary
`ApplyNameTableEdit(Document document, NodeDataAdapter adapter, java.util.List<java.lang.String> oldNames, java.util.List<java.lang.String> newNames, boolean ignoreWhitespaces, boolean caseSensitive, boolean parseNumericValues)`

Method Summary
`private int` | `findDecimal(java.util.List<java.lang.String> list, double value)` Returns the index of the first string that represents the specified `double` value.
`private int` | `findString(java.util.List<java.lang.String> list, java.lang.String value)`
`java.lang.String` | `getPresentationName()`
`static void` | `loadNameTable(java.io.File file, java.util.Vector<java.lang.String> oldNames, java.util.Vector<java.lang.String> newNames, char separator)`
`static void` | `loadNameTable(java.io.InputStream stream, java.util.Vector<java.lang.String> oldNames, java.util.Vector<java.lang.String> newNames, char separator)`
`void` | `redo()`
`private void` | `rename(Node root, java.util.List<java.lang.String> oldNames, java.util.List<java.lang.String> newNames)`
`private int` | `restoreNames(Node root, int pos)`
`void` | `undo()`

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

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

Field Detail

### adapter

    private NodeDataAdapter adapter

### oldNames

    private java.util.List<java.lang.String> oldNames

### newNames

    private java.util.List<java.lang.String> newNames

### savedValues

    private java.util.List<TextElementData> savedValues

### ignoreWhitespaces

    private boolean ignoreWhitespaces

### caseSensitive

    private boolean caseSensitive

### parseNumericValues

    private boolean parseNumericValues

Constructor Detail

### ApplyNameTableEdit

    public ApplyNameTableEdit(Document document,
                              NodeDataAdapter adapter,
                              java.util.List<java.lang.String> oldNames,
                              java.util.List<java.lang.String> newNames,
                              boolean ignoreWhitespaces,
                              boolean caseSensitive,
                              boolean parseNumericValues)

Method Detail

### findDecimal

    private int findDecimal(java.util.List<java.lang.String> list,
                            double value)

  Returns the index of the first string that represents the specified `double` value.

  Parameters:
    `list` -
    `value` -
  Returns:
    the index or -1 of the value is not found

### findString

    private int findString(java.util.List<java.lang.String> list,
                           java.lang.String value)

### rename

    private void rename(Node root,
                        java.util.List<java.lang.String> oldNames,
                        java.util.List<java.lang.String> newNames)

### 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`

### restoreNames

    private int restoreNames(Node root,
                             int pos)

### undo

    public void undo()
              throws javax.swing.undo.CannotUndoException

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

### getPresentationName

    public java.lang.String getPresentationName()

### loadNameTable

    public static void loadNameTable(java.io.File file,
                                     java.util.Vector<java.lang.String> oldNames,
                                     java.util.Vector<java.lang.String> newNames,
                                     char separator)
                              throws java.io.FileNotFoundException,
                                     java.io.IOException,
                                     InvalidFormatException

  Throws:
    `java.io.FileNotFoundException`
    `java.io.IOException`
    `InvalidFormatException`

### loadNameTable

    public static void loadNameTable(java.io.InputStream stream,
                                     java.util.Vector<java.lang.String> oldNames,
                                     java.util.Vector<java.lang.String> newNames,
                                     char separator)
                              throws java.io.IOException,
                                     InvalidFormatException

  Throws:
    `java.io.IOException`
    `InvalidFormatException`

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