org.argouml.kernel
Class ProjectManager
java.lang.Object
|
+--org.argouml.kernel.ProjectManager
- public final class ProjectManager
- extends java.lang.Object
This class manages the projects loaded in argouml. It is a singleton. Classes
in Argouml can ask this class for the current project and set the current project.
Since we only have one project in ArgoUML at the moment, this class does not
manage a list of projects like one would expect. This could be a nice extension
for the future of argouml.
As soon as the current project is changed, a property changed event is fired.
- Since:
- Nov 17, 2002
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CURRENT_PROJECT_PROPERTY_NAME
public static final java.lang.String CURRENT_PROJECT_PROPERTY_NAME
getManager
public static ProjectManager getManager()
- The singleton accessor method of this class
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Adds an instance implementing propertychangelistener to the listener list
- Parameters:
listener
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Removes a listener from the listener list.
- Parameters:
listener
-
setCurrentProject
public void setCurrentProject(Project newProject)
- Sets the current project (the project that is viewable in the projectbrowser).
This method fires a propertychanged event.
- Parameters:
newProject
- The new project.
getCurrentProject
public Project getCurrentProject()
- Returns the current project.
- Returns:
- Project
makeEmptyProject
public Project makeEmptyProject()
- Makes an empty project with two standard diagrams.
- Returns:
- Project