Home / Development / Documentation / 2.0.44 / LegendPaster
TreeGraph 2
 


info.bioinfweb.treegraph.document.undo.edit
Class LegendPaster

java.lang.Object
  extended by info.bioinfweb.treegraph.document.undo.edit.LegendPaster

public class LegendPaster
extends Object

Since:
2.0.30
Author:
Ben Stöver

Field Summary
private  Document document
           
private  Legend[] legends
           
private  Map<String,String> uniqueNameMap
           
private  boolean uniqueNamesChanged
           
 
Constructor Summary
LegendPaster(Document document, Legend[] legends)
           
 
Method Summary
 void changeUniqueNames(Node root)
          Changes the unique names of the subtree under root and the anchor names of the legends.
private  void changeUniqueNamesLegends()
           
private  void changeUniqueNamesSubtree(Node root)
           
private  String newUniqueName()
          Returns a new unique name with is neither present in the associated document nor the unique name map.
 void pasteLegends()
           
 void removeLegends()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

private Document document

legends

private Legend[] legends

uniqueNamesChanged

private boolean uniqueNamesChanged

uniqueNameMap

private Map<String,String> uniqueNameMap
Constructor Detail

LegendPaster

public LegendPaster(Document document,
                    Legend[] legends)
Method Detail

newUniqueName

private String newUniqueName()
Returns a new unique name with is neither present in the associated document nor the unique name map.

Returns:

changeUniqueNamesSubtree

private void changeUniqueNamesSubtree(Node root)

changeUniqueNamesLegends

private void changeUniqueNamesLegends()

changeUniqueNames

public void changeUniqueNames(Node root)
Changes the unique names of the subtree under root and the anchor names of the legends. If this method is called multiple times only the first call has an effect.

Parameters:
root -

pasteLegends

public void pasteLegends()

removeLegends

public void removeLegends()