projectviewer.action
Class NodeRemoverAction

java.lang.Object
  extended byprojectviewer.action.Action
      extended byprojectviewer.action.NodeRemoverAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener

public class NodeRemoverAction
extends Action

Action that when executed removes nodes from the trees.

Version:
$Id: NodeRemoverAction.java 6378 2005-12-12 04:33:47Z vanza $
Author:
Marcelo Vanzin

Field Summary
 
Fields inherited from class projectviewer.action.Action
action, cmItem, tbButton, viewer
 
Constructor Summary
NodeRemoverAction(boolean delete)
          Cretes a new node remover actions.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Try to remove nodes from the project, asking when necessary.
 java.lang.String getText()
          Returns the text to be shown on the button and/or menu item.
 void prepareForNode(VPTNode node)
          Enable action only for non-root nodes.
 
Methods inherited from class projectviewer.action.Action
clone, getButton, getIcon, getMenuItem, setViewer
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRemoverAction

public NodeRemoverAction(boolean delete)
Cretes a new node remover actions. Delete defines what "remove" means: "false" means it only removes the node from the tree, "true" means it will try to delete it. Deletion is only available for file nodes at this moment.

Method Detail

getText

public java.lang.String getText()
Returns the text to be shown on the button and/or menu item.

Specified by:
getText in class Action

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Try to remove nodes from the project, asking when necessary.


prepareForNode

public void prepareForNode(VPTNode node)
Enable action only for non-root nodes.

Overrides:
prepareForNode in class Action
Parameters:
node - The selected node, or "null" if multiple nodes are selected.