svn commit: r16243 - trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java
Tom Morris <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2008-12-03 16:31:27-0800
New Revision: 16243
Modified:
trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java
Log:
Deprecate createDiagram and add a version that takes diagram settings
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java?view=diff&pathrev=16243&r1=16242&r2=16243
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/ActionAddDiagram.java 2008-12-03 16:31:27-0800
@@ -76,7 +76,9 @@
/*
* @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
*/
+ @Override
public void actionPerformed(ActionEvent e) {
+ // TODO: The project should be bound to the action when it is created?
Project p = ProjectManager.getManager().getCurrentProject();
Object ns = findNamespace();
@@ -152,9 +154,29 @@
/**
* Creates the diagram. Classes derived from this class should implement any
* specific behaviour to create the diagram.
- *
+ *
* @param ns The namespace the UMLDiagram should get.
* @return UMLDiagram
+ * @deprecated for 0.27.3 by tfmorris. Subclasses should override
+ * {@link #createDiagram(Object, DiagramSettings)}.
*/
+ @Deprecated
public abstract ArgoDiagram createDiagram(Object ns);
+
+ /**
+ * Create a new diagram. To be implemented by subclasses. It will become
+ * abstract after 0.28 to enforce this requirement.
+ *
+ * @param owner owner of the diagram. May be a namespace, statemachine, or
+ * collaboration depending on the type of diagram.
+ * @param settings default rendering settings for all figs in the new
+ * diagram
+ * @return newly created diagram
+ */
+ public ArgoDiagram createDiagram(Object owner, DiagramSettings settings) {
+ ArgoDiagram d = createDiagram(owner);
+ d.setDiagramSettings(settings);
+ return d;
+ }
+
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=979227
To unsubscribe from this discussion, e-mail: [[email protected]].