info.bioinfweb.treegraph.document.undo.format
Class AutoPositionLabelsEdit

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

public class AutoPositionLabelsEdit
extends DocumentEdit

Since:
2.0.35
Author:
Ben Stöver

Field Summary
private  Branch[] branches
           
private  java.lang.String[] ids
           
static double LABEL_BLOCK_ASPECT_RATIO
           
static int LINE_POSITION_STEP
           
private  java.util.Vector<LabelFormats>[] oldFormats
           
 
Fields inherited from class info.bioinfweb.treegraph.document.undo.DocumentEdit
document
 
Constructor Summary
AutoPositionLabelsEdit(Document document, Branch[] branches)
           
 
Method Summary
private  void backupFormats()
           
 java.lang.String getPresentationName()
           
private static void position(Branch branch, java.lang.String[] ids)
           
static void position(Node root)
           
 void redo()
           
private  void restoreFormats()
           
 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

LABEL_BLOCK_ASPECT_RATIO

public static final double LABEL_BLOCK_ASPECT_RATIO
See Also:
Constant Field Values

LINE_POSITION_STEP

public static final int LINE_POSITION_STEP
See Also:
Constant Field Values

branches

private Branch[] branches

ids

private java.lang.String[] ids

oldFormats

private java.util.Vector<LabelFormats>[] oldFormats
Constructor Detail

AutoPositionLabelsEdit

public AutoPositionLabelsEdit(Document document,
                              Branch[] branches)
Method Detail

backupFormats

private void backupFormats()

restoreFormats

private void restoreFormats()

position

private static void position(Branch branch,
                             java.lang.String[] ids)

position

public static void position(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

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