projectviewer.event
Class ProjectViewerEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byprojectviewer.event.ProjectViewerEvent
All Implemented Interfaces:
java.io.Serializable

public final class ProjectViewerEvent
extends java.util.EventObject

A project viewer event.

Version:
$Id: ProjectViewerEvent.java 6379 2006-01-05 23:51:09Z ezust $
Author:
Dale Anson, Marcelo Vanzin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ProjectViewerEvent(java.lang.Object src, ProjectViewer viewer, VPTProject prj)
          Create a new ProjectViewerEvent.
ProjectViewerEvent(java.lang.Object src, VPTProject prj)
          Create a new ProjectViewerEvent.
ProjectViewerEvent(ProjectViewer src, VPTProject prj)
          Create a new ProjectViewerEvent.
ProjectViewerEvent(VPTGroup group)
          Constructs and event to notify the listeners of the addition or removal of a group.
ProjectViewerEvent(VPTGroup group, ProjectViewer viewer)
          Constructs and event to notify the listeners of the activation of a group in the given view.
ProjectViewerEvent(VPTNode n, ProjectViewer v)
           
ProjectViewerEvent(VPTNode src, VPTGroup oldParent)
          Constructs an event to notify listeners that a node was moved to another group.
 
Method Summary
 VPTNode getNode()
           
 VPTGroup getOldParent()
          When firing a noveMoved() event, returns the old parent of the affected node (which can be retrieved by getSource()).
 VPTProject getProject()
          Returns the Project.
 ProjectViewer getProjectViewer()
          Returns the ProjectViewer.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectViewerEvent

public ProjectViewerEvent(VPTNode n,
                          ProjectViewer v)

ProjectViewerEvent

public ProjectViewerEvent(ProjectViewer src,
                          VPTProject prj)
Create a new ProjectViewerEvent.

Parameters:
src - the project viewer instance that fired the event.
prj - the project loaded (null if "All Projects").

ProjectViewerEvent

public ProjectViewerEvent(java.lang.Object src,
                          VPTProject prj)
Create a new ProjectViewerEvent.

Parameters:
src - the project viewer instance that fired the event.
prj - the project loaded (null if "All Projects").

ProjectViewerEvent

public ProjectViewerEvent(java.lang.Object src,
                          ProjectViewer viewer,
                          VPTProject prj)
Create a new ProjectViewerEvent.

Parameters:
src - the project viewer instance that fired the event.
prj - the project loaded (null if "All Projects").

ProjectViewerEvent

public ProjectViewerEvent(VPTNode src,
                          VPTGroup oldParent)
Constructs an event to notify listeners that a node was moved to another group.

Since:
PV 2.1.0

ProjectViewerEvent

public ProjectViewerEvent(VPTGroup group)
Constructs and event to notify the listeners of the addition or removal of a group.

Since:
PV 2.1.0

ProjectViewerEvent

public ProjectViewerEvent(VPTGroup group,
                          ProjectViewer viewer)
Constructs and event to notify the listeners of the activation of a group in the given view.

Since:
PV 2.1.0
Method Detail

getNode

public VPTNode getNode()
Returns:
the node selected when this event was fired.

getProjectViewer

public ProjectViewer getProjectViewer()
Returns the ProjectViewer.

Returns:
The viewer where the event occurred.

getProject

public VPTProject getProject()
Returns the Project. It is important to noticed that this value can be null, which means that the "All Projects" mode has been activated.

Returns:
The activated project, or null if "All Projects" was chosen.

getOldParent

public VPTGroup getOldParent()
When firing a noveMoved() event, returns the old parent of the affected node (which can be retrieved by getSource()).

Since:
PV 2.1.0