projectviewer.action
Class EditProjectAction

java.lang.Object
  extended by projectviewer.action.Action
      extended by projectviewer.action.EditProjectAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.lang.Cloneable, java.lang.Comparable<Action>, java.util.EventListener

public class EditProjectAction
extends Action

Action that when executed edits an existing project. Until 3.4.0 this action was also be used to create a project, but since 3.4.2 there is separate AddProjectAction.


Field Summary
 
Fields inherited from class projectviewer.action.Action
action, cmItem, viewer
 
Constructor Summary
EditProjectAction()
          Default constructor.
EditProjectAction(java.lang.String startupPane)
          The constructor accepting startupPane, edit only.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Edits existing project's properties.
static VPTProject editProject(VPTProject proj, java.lang.String startupPane)
          Opens project properties for a given project.
 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 the root node.
 
Methods inherited from class projectviewer.action.Action
clone, compareTo, equals, getMenuItem, setViewer
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditProjectAction

public EditProjectAction()
Default constructor. Edit project only, no creation.


EditProjectAction

public EditProjectAction(java.lang.String startupPane)
The constructor accepting startupPane, edit only.

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

editProject

public static VPTProject editProject(VPTProject proj,
                                     java.lang.String startupPane)
Opens project properties for a given project. This method does not rely on the active node of the tree. It performs all necessary operations related to the dialog.

This method should not be called from outside Project Viewer. For external api see are similar methods in PVActions.

Returns:
null if user cancelled the dialog.
Since:
3.4.2

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Edits existing project's properties. Gathers information about the project from the tree and the currently selected node.


prepareForNode

public void prepareForNode(VPTNode node)
Enable action only for the root node.

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