|
|||||||||||
| 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. 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 String |
CURRENT_PROJECT_PROPERTY_NAME
The name of the property that defines the current project. |
static String |
NO_PROJECT
The name of the property that there is no project. |
static String |
SAVE_STATE_PROPERTY_NAME
The name of the property that defines the save state. |
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to the listener list. |
Project |
getCurrentProject()
Returns the current project. |
static ProjectManager |
getManager()
The singleton accessor method of this class. |
Project |
makeEmptyProject()
Makes an empty project with two standard diagrams. |
void |
mementoCreated(ModelMemento memento)
Called when the model subsystem creates a memento. |
void |
removeProject(Project oldProject)
Remove the project. |
void |
removePropertyChangeListener(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). |
void |
setSaveAction(Action save)
Set the save action. |
void |
setSaveEnabled(boolean newValue)
Notify the gui that the current project's save state has changed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CURRENT_PROJECT_PROPERTY_NAME
public static final String NO_PROJECT
public static final String SAVE_STATE_PROPERTY_NAME
| Method Detail |
public static ProjectManager getManager()
public void addPropertyChangeListener(PropertyChangeListener listener)
listener - The listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
listener - The listener to remove.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()
If there is no project, a new one is created (unless we are busy creating one).
public Project makeEmptyProject()
public void setSaveAction(Action save)
save - the action to be usedpublic void setSaveEnabled(boolean newValue)
newValue - The new state.public void removeProject(Project oldProject)
oldProject - The project to be removed.public void mementoCreated(ModelMemento memento)
mementoCreated in interface MementoCreationObservermemento - the memento.MementoCreationObserver.mementoCreated(org.argouml.model.ModelMemento)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |