org.jext.project
Class ProjectEvent

java.lang.Object
  extended byorg.jext.project.ProjectEvent

public class ProjectEvent
extends java.lang.Object

The event emitted by a Jext ProjectManager when a meaningful change happens to one of its Projects.

Author:
Matt Benson
See Also:
ProjectListener

Field Summary
static int ATTRIBUTE_SET
           
static int ATTRIBUTE_UNSET
           
static int FILE_ADDED
           
static int FILE_CHANGED
           
static int FILE_CLOSED
           
static int FILE_OPENED
           
static int FILE_REMOVED
           
static int FILE_SELECTED
           
static int OTHER
           
static int PROJECT_CLOSED
           
static int PROJECT_OPENED
           
static int PROJECT_SELECTED
           
 
Constructor Summary
ProjectEvent(ProjectManager projectManager, int eventType)
          Creates a new ProjectEvent, registering the parent ProjectManager of this event and the type of the event (the event is assumed to be specific to the ProjectManager's currently active Project.
ProjectEvent(ProjectManager projectManager, Project project, int eventType)
          Creates a new ProjectEvent, registering the parent ProjectManager of this event, the type of the event and the relevant Project.
ProjectEvent(ProjectManager projectManager, Project project, int eventType, java.lang.Object target)
          Creates a new ProjectEvent, registering the parent ProjectManager of this event, the type of the event, the relevant Project, and the target of the event.
 
Method Summary
 Project getProject()
          Returns the Project for which the ProjectEvent was generated.
 ProjectManager getProjectManager()
          Returns the ProjectManager from which the event was fired.
 java.lang.Object getTarget()
          Returns the Object target of the event; if this is a "project" event, then the result should be the same Project as returned by getProject; if this is a "file" event, the result should be the affected File; if this is an "attribute" event, the result should be the affected String attribute name.
 int getWhat()
          Returns the type of event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROJECT_OPENED

public static final int PROJECT_OPENED
See Also:
Constant Field Values

PROJECT_CLOSED

public static final int PROJECT_CLOSED
See Also:
Constant Field Values

PROJECT_SELECTED

public static final int PROJECT_SELECTED
See Also:
Constant Field Values

FILE_ADDED

public static final int FILE_ADDED
See Also:
Constant Field Values

FILE_REMOVED

public static final int FILE_REMOVED
See Also:
Constant Field Values

FILE_OPENED

public static final int FILE_OPENED
See Also:
Constant Field Values

FILE_CLOSED

public static final int FILE_CLOSED
See Also:
Constant Field Values

FILE_SELECTED

public static final int FILE_SELECTED
See Also:
Constant Field Values

FILE_CHANGED

public static final int FILE_CHANGED
See Also:
Constant Field Values

ATTRIBUTE_SET

public static final int ATTRIBUTE_SET
See Also:
Constant Field Values

ATTRIBUTE_UNSET

public static final int ATTRIBUTE_UNSET
See Also:
Constant Field Values

OTHER

public static final int OTHER
See Also:
Constant Field Values
Constructor Detail

ProjectEvent

public ProjectEvent(ProjectManager projectManager,
                    int eventType)
Creates a new ProjectEvent, registering the parent ProjectManager of this event and the type of the event (the event is assumed to be specific to the ProjectManager's currently active Project.

Parameters:
projectManager - ProjectManager parent.
eventType - int value which specifies the nature of the ProjectEvent.

ProjectEvent

public ProjectEvent(ProjectManager projectManager,
                    Project project,
                    int eventType)
Creates a new ProjectEvent, registering the parent ProjectManager of this event, the type of the event and the relevant Project.

Parameters:
projectManager - ProjectManager parent.
project - Project relevant to this ProjectEvent.
eventType - int value which specifies the nature of the ProjectEvent.

ProjectEvent

public ProjectEvent(ProjectManager projectManager,
                    Project project,
                    int eventType,
                    java.lang.Object target)
Creates a new ProjectEvent, registering the parent ProjectManager of this event, the type of the event, the relevant Project, and the target of the event.

Parameters:
projectManager - ProjectManager parent.
project - Project relevant to this ProjectEvent.
eventType - int value which specifies the nature of the ProjectEvent.
target - Object which, along with the Project, is the target of the ProjectEvent.
Method Detail

getWhat

public int getWhat()
Returns the type of event.

Returns:
int.

getProjectManager

public ProjectManager getProjectManager()
Returns the ProjectManager from which the event was fired.

Returns:
ProjectManager.

getProject

public Project getProject()
Returns the Project for which the ProjectEvent was generated.

Returns:
Project.

getTarget

public java.lang.Object getTarget()
Returns the Object target of the event; if this is a "project" event, then the result should be the same Project as returned by getProject; if this is a "file" event, the result should be the affected File; if this is an "attribute" event, the result should be the affected String attribute name.

Returns:
Object.

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright ? 2002 Romain Guy.