|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.kernel.ProjectManager
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.
Field Summary | |
static java.lang.String |
CURRENT_PROJECT_PROPERTY_NAME
|
static java.lang.String |
SAVE_STATE_PROPERTY_NAME
|
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds an instance implementing propertychangelistener to the listener list |
Project |
getCurrentProject()
Returns the current project. |
static ProjectManager |
getManager()
The singleton accessor method of this class |
Project |
loadProject(java.net.URL url)
This method creates a project from the specified URL Unlike the constructor which forces an .argo extension This method will attempt to load a raw XMI file This method can fail in several different ways. |
Project |
makeEmptyProject()
Makes an empty project with two standard diagrams. |
void |
notifySavePropertyChanged(boolean newValue)
notify the gui from the project manager that the current project's save state has changed. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener from the listener list. |
void |
setCurrentProject(Project newProject)
Sets the current project (the project that is viewable in the projectbrowser). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CURRENT_PROJECT_PROPERTY_NAME
public static final java.lang.String SAVE_STATE_PROPERTY_NAME
Method Detail |
public static ProjectManager getManager()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- public void setCurrentProject(Project newProject)
If the argument is null, then the current project will be forgotten about.
newProject
- The new project.public Project getCurrentProject()
public Project makeEmptyProject()
public Project loadProject(java.net.URL url) throws java.io.IOException, IllegalFormatException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
IllegalFormatException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void notifySavePropertyChanged(boolean newValue)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20030829) | ArgoUML Project Home | ArgoUML Cookbook |