info.bioinfweb.treegraph.document.undo.file
Class ImportTableEdit

java.lang.Object
  extended by info.bioinfweb.treegraph.document.undo.DocumentEdit
      extended by info.bioinfweb.treegraph.document.undo.file.ImportTableEdit
All Implemented Interfaces:
javax.swing.undo.UndoableEdit

public class ImportTableEdit
extends DocumentEdit

Since:
2.0.24
Author:
Ben Stöver

Field Summary
private  NodeBranchDataAdapter[] adapters
           
private  NodeBranchDataBackup[] backups
           
private  java.lang.String[][] data
           
 
Fields inherited from class info.bioinfweb.treegraph.document.undo.DocumentEdit
document
 
Constructor Summary
ImportTableEdit(Document document, java.lang.String[][] data, NodeBranchDataAdapter[] adapters)
           
 
Method Summary
private  NodeBranchDataBackup[] createBackups()
           
 java.lang.String getPresentationName()
           
 boolean importData(NodeBranchDataAdapter[] adapters, java.lang.String[][] data)
           
 void redo()
           
 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

data

private java.lang.String[][] data

adapters

private NodeBranchDataAdapter[] adapters

backups

private NodeBranchDataBackup[] backups
Constructor Detail

ImportTableEdit

public ImportTableEdit(Document document,
                       java.lang.String[][] data,
                       NodeBranchDataAdapter[] adapters)
Method Detail

createBackups

private NodeBranchDataBackup[] createBackups()

importData

public boolean importData(NodeBranchDataAdapter[] adapters,
                          java.lang.String[][] data)
Parameters:
adapters -
data -
Returns:
true, if all data has been imported, false, if one or more unique node name was not found in the current tree

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

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()