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
Class SaveLegendsEdit

    java.lang.Object
      info.bioinfweb.treegraph.document.undo.DocumentEdit
          info.bioinfweb.treegraph.document.undo.SaveLegendsEdit

All Implemented Interfaces:
  WarningEdit, UndoableEdit

Direct Known Subclasses:
  CollapseNodeEdit, DeleteSubelementsEdit, InsertRemoveSubtreeEdit

    public abstract class SaveLegendsEdit

extends DocumentEdit
implements WarningEdit

This class should be a superclass of all classes that might delete nodes which are anchors to legends. It offers the methods `saveLegends()` which can be called from the `redo()`-method and `restoreLegends()` which can be called from the `undo()`-method.

Author:
  Ben Stöver

Field Summary
`private int` | `helpTopic`
`private boolean` | `legendsReanchored`
`private boolean` | `legendsRemoved`
`private Legend[]` | `legendsSave`
`private boolean` | `showWarnings`

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

Constructor Summary
`SaveLegendsEdit(Document document)`

Method Summary
`protected void` | `editSubtreeLegends(Node root)` This method can be used to adopt the legends of a document prior to deleting a subtree.
`protected int` | `getHelpTopic()`
`boolean` | `getLegendsReanchored()`
`boolean` | `getLegendsRemoved()`
`protected Legend[]` | `getLegendsSave()`
`boolean` | `getShowWarnings()`
`protected String` | `getWarningsMessages()`
`protected void` | `restoreLegends()`
`protected void` | `saveLegends()`
`protected void` | `setHelpTopic(int helpTopic)`
`protected void` | `setLegendsReanchored(boolean legendsReanchored)`
`protected void` | `setLegendsRemoved(boolean legendsRemoved)`
`void` | `setShowWarnings(boolean showWarnings)`
`protected void` | `showWarningDialog()`

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

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

Methods inherited from interface javax.swing.undo.UndoableEdit
`getPresentationName`

Field Detail

### legendsSave

    private Legend[] legendsSave

### legendsReanchored

    private boolean legendsReanchored

### legendsRemoved

    private boolean legendsRemoved

### showWarnings

    private boolean showWarnings

### helpTopic

    private int helpTopic

Constructor Detail

### SaveLegendsEdit

    public SaveLegendsEdit(Document document)

Method Detail

### getLegendsSave

    protected Legend[] getLegendsSave()

### saveLegends

    protected void saveLegends()

### restoreLegends

    protected void restoreLegends()
                           throws CannotUndoException

  Throws:
    `CannotUndoException`

### getLegendsReanchored

    public boolean getLegendsReanchored()

### setLegendsReanchored

    protected void setLegendsReanchored(boolean legendsReanchored)

### getLegendsRemoved

    public boolean getLegendsRemoved()

### setLegendsRemoved

    protected void setLegendsRemoved(boolean legendsRemoved)

### getShowWarnings

    public boolean getShowWarnings()

  Specified by:
    `getShowWarnings` in interface `WarningEdit`

### setShowWarnings

    public void setShowWarnings(boolean showWarnings)

  Specified by:
    `setShowWarnings` in interface `WarningEdit`

### getHelpTopic

    protected int getHelpTopic()

### setHelpTopic

    protected void setHelpTopic(int helpTopic)

### getWarningsMessages

    protected String getWarningsMessages()

### showWarningDialog

    protected void showWarningDialog()

### editSubtreeLegends

    protected void editSubtreeLegends(Node root)

  This method can be used to adopt the legends of a document prior to deleting a subtree. If all anchors of a legend are contained in the deleted subtree, the legend is deleted as well. If only one of the anchors is in the deleted subtree this anchor is deleted but the other remains unchanged (if necessary the former second anchor becomes the first) and the legend is left in the document.

  Parameters:
    `root` - - the root node of the subtree that will be deleted later

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