|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.kernel.ProjectManager
public final class ProjectManager
This class manages the projects loaded in argouml, and what the current project is.
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.
TODO: Move everything related to the creation of a project into the ProjectFactory.
| Field Summary | |
|---|---|
static java.lang.String |
CURRENT_PROJECT_PROPERTY_NAME
Deprecated. for 0.27.2 by tfmorris. Listeners of this event which expect it to indicate a new project being opened should listen for OPEN_PROJECTS_PROPERTY. Listeners who think
they need to know a single global current project need
to be changed to deal with things on a per-project basis. |
static java.lang.String |
OPEN_PROJECTS_PROPERTY
Property name for list of current open projects. |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener to the listener list. |
java.lang.Object |
execute(ModelCommand command)
Called when the model subsystem creates a command. |
Project |
getCurrentProject()
Deprecated. for 0.27.2 by tfmorris. There is no longer the concept of a single global "current" project. In the future, multiple projects will be able to be open at a time, so all code should be prepared to deal with multiple projects and should require a Project to be passed as an argument if they need access. To get a list of all currently open projects, use getOpenProjects(). For settings which affect
renderings in diagrams use
ArgoFig.getSettings(). |
static ProjectManager |
getManager()
The singleton accessor method of this class. |
java.util.List<Project> |
getOpenProjects()
|
boolean |
isSaveActionEnabled()
Deprecated. for 0.27.2 by tfmorris. Use Project.isDirty(). |
Project |
makeEmptyProfileProject()
Makes an empty profile project. |
Project |
makeEmptyProfileProject(boolean addDefaultDiagrams)
Make a new empty profile project optionally including default diagrams. |
Project |
makeEmptyProject()
Makes an empty project. |
Project |
makeEmptyProject(boolean addDefaultDiagrams)
Make a new empty project optionally including default diagrams. |
void |
removeProject(Project oldProject)
Remove the project. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener from the listener list. |
void |
setCurrentProject(Project newProject)
Deprecated. for 0.27.2 by tfmorris. There is no longer the concept of a single global "current" project. In the future, multiple projects will be able to be open at a time, so all code should be prepared to deal with multiple projects and should require a Project to be passed as an argument if they need access. |
void |
setSaveAction(javax.swing.Action save)
Set the save action. |
void |
setSaveEnabled(boolean newValue)
Deprecated. for 0.27.2 by tfmorris. Use Project.setDirty(boolean). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final java.lang.String CURRENT_PROJECT_PROPERTY_NAME
OPEN_PROJECTS_PROPERTY. Listeners who think
they need to know a single global current project need
to be changed to deal with things on a per-project basis.
public static final java.lang.String OPEN_PROJECTS_PROPERTY
| Method Detail |
|---|
public static ProjectManager getManager()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to add.public void removePropertyChangeListener(java.beans.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()
getOpenProjects(). For settings which affect
renderings in diagrams use
ArgoFig.getSettings().
This should only be used by callers who need to know the global state. Most things which need a project want the project that contains them, which they can discover by traversing their containing elements (e.g. Fig->Diagram->DiagramSettings).
public java.util.List<Project> getOpenProjects()
public Project makeEmptyProject()
public Project makeEmptyProject(boolean addDefaultDiagrams)
Historically new projects have been created with two default diagrams (Class and Use Case). NOTE: ArgoUML currently requires at least one diagram for proper operation.
addDefaultDiagrams - if true the project will be be created with the two standard
default diagrams (Class and Use Case)
public Project makeEmptyProfileProject()
public Project makeEmptyProfileProject(boolean addDefaultDiagrams)
Historically new projects have been created with two default diagrams (Class and Use Case). NOTE: ArgoUML currently requires at least one diagram for proper operation.
addDefaultDiagrams - if true the project will be be created with the standard
default diagram (Class)
public void setSaveAction(javax.swing.Action save)
save - the action to be usedpublic boolean isSaveActionEnabled()
Project.isDirty().
public void setSaveEnabled(boolean newValue)
Project.setDirty(boolean).
public void removeProject(Project oldProject)
oldProject - The project to be removed.public java.lang.Object execute(ModelCommand command)
execute in interface ModelCommandCreationObservercommand - the command.
ModelCommandCreationObserver.execute(ModelCommand)
|
||||||||||
| 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 |