info.bioinfweb.treegraph.gui.actions.edit
Class NewNodeAction
java.lang.Object
  
javax.swing.AbstractAction
      
info.bioinfweb.treegraph.gui.actions.TreeGraphAction
          
info.bioinfweb.treegraph.gui.actions.DocumentAction
              
info.bioinfweb.treegraph.gui.actions.edit.NewNodeAction
- All Implemented Interfaces: 
 - ActionListener, Serializable, Cloneable, EventListener, Action
 
public class NewNodeAction
- extends DocumentAction
 
- Author:
 
  - Ben Stöver
 
- See Also:
 - Serialized Form
 
 
 
| Fields inherited from interface javax.swing.Action | 
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON | 
 
 
 
 
 
 
 
NewNodeAction
public NewNodeAction(MainFrame mainFrame)
setEnabled
public void setEnabled(Document document,
                       TreeSelection selection,
                       NodeBranchDataAdapter tableAdapter)
- Specified by:
 setEnabled in class DocumentAction
 
 
insertSubtree
public static boolean insertSubtree(Document document,
                                    Node parent,
                                    Node root)
- Inserts a new subelement as the last subelement of the given parent.
 This method should be used for inserting newly generated elements and 
 paste-operations of single taxa, labels or nodes with or without whole subtrees.
 If 
parent is null the given element will set as tree-root.
 If the tree-root is already set, an IllegalArgumentException will be
 thrown.
- Parameters:
 parent - the parent node under which the subelement should be insertedroot - the element to insert or the root element of the subtree to insert
 
 
insertSubtree
public static boolean insertSubtree(Document document,
                                    Node parent,
                                    Node root,
                                    int index)
- Inserts a new subelement at the given position.
 This method should be used for inserting newly generated elements and 
 paste-operations of single elements or whole subtrees at a defined position. The 
 position must not be greater then the current number of subelements. Note that 
 labels can not be inserted an defined position because their position is 
 irrelevant.
- Parameters:
 parent - the parent node under which the subelement should be insertedpos - the position where the new element or subtree shall be insertedroot - the element to insert or the root element of the subtree to insert (can't be label)
 
 
onActionPerformed
protected void onActionPerformed(ActionEvent e,
                                 TreeInternalFrame frame)
- Description copied from class: 
DocumentAction 
- Subclasses should implement this method instead of overriding 
 
DocumentAction.actionPerformed(ActionEvent).
- Specified by:
 onActionPerformed in class DocumentAction
 
frame - the internal frame which was active while the user performed this action