Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r72 - trunk/src/org/dbuml/argo/uml/diagram/ui

argouml-db
Discussion topic

Back to topic list

svn commit: r72 - trunk/src/org/dbuml/argo/uml/diagram/ui

Author lepekhine
Full name Alexander Lepekhine
Date 2009-11-26 08:45:29 PST
Message Author: lepekhine
Date: 2009-11-26 08:45:28-0800
New Revision: 72

Modified:
   trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBDeploymentDiagram.​java
   trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBSchemaDiagram.java​

Log:
let create model elements on db diagrams (see issue 8)

Modified: trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBDeploymentDiagram.​java
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/trunk/​src/org/dbuml/argo/u​ml/diagram/ui/DBDepl​oymentDiagram.java?v​iew=diff&pathrev​=72&r1=71&r2​=72
====================​====================​====================​==================
--- trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBDeploymentDiagram.​java (original)
+++ trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBDeploymentDiagram.​java 2009-11-26 08:45:28-0800
@@ -4,6 +4,7 @@
  ********************​********************​******/
 package org.dbuml.argo.uml.diagram.ui;
 
+import java.awt.Rectangle;
 import java.beans.PropertyV​etoException;
 
 import javax.swing.Action;
@@ -11,9 +12,23 @@
 import org.apache.log4j.Logger;
 import org.argouml.kernel.P​rojectManager;
 import org.argouml.model.Model;
+import org.argouml.uml.diag​ram.DiagramElement;
+import org.argouml.uml.diag​ram.DiagramSettings;​
 import org.argouml.uml.diag​ram.deployment.Deplo​ymentDiagramGraphMod​el;
+import org.argouml.uml.diag​ram.deployment.ui.Fi​gComponent;
+import org.argouml.uml.diag​ram.deployment.ui.Fi​gComponentInstance;
+import org.argouml.uml.diag​ram.deployment.ui.Fi​gMNode;
+import org.argouml.uml.diag​ram.deployment.ui.Fi​gNodeInstance;
+import org.argouml.uml.diag​ram.deployment.ui.Fi​gObject;
 import org.argouml.uml.diag​ram.deployment.ui.UM​LDeploymentDiagram;
+import org.argouml.uml.diag​ram.static_structure​.ui.FigClass;
+import org.argouml.uml.diag​ram.static_structure​.ui.FigComment;
+import org.argouml.uml.diag​ram.static_structure​.ui.FigInterface;
+import org.argouml.uml.diag​ram.static_structure​.ui.FigPackage;
+import org.argouml.uml.diag​ram.ui.FigNodeModelE​lement;
+import org.argouml.uml.diag​ram.use_case.ui.FigA​ctor;
 import org.argouml.util.Too​lBarUtility;
+import org.dbuml.argo.model​.ArgoDBModelFacade;
 import org.dbuml.argo.uml.u​i.ActionCreateDataba​se;
 import org.dbuml.argo.uml.u​i.ActionCreateEdge;
 import org.dbuml.argo.uml.u​i.ActionCreateSchema​;
@@ -182,5 +197,20 @@
         return actionDBDependency;
     }
     
+ public DiagramElement createDiagramElement(
+ final Object modelElement,
+ final Rectangle bounds) {
+ DiagramElement figNode = null;
+ if (ArgoDBModelFacade.g​etInstance().represe​ntsASchema(modelElem​ent)) {
+ figNode = new FigSchema(modelElement, bounds.x, bounds.y);
+ } else if (ArgoDBModelFacade.g​etInstance().represe​ntsATable(modelEleme​nt)) {
+ figNode = new FigTable(modelElement, bounds.x, bounds.y, bounds.width, bounds.height);
+ }
+ if (figNode == null) {
+ figNode = super.createDiagramE​lement(modelElement,​ bounds);
+ }
+ return figNode;
+ }
+
 } /* end class DBSchemaDiagram */
 

Modified: trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBSchemaDiagram.java​
Url: http://argouml-db.ti​gris.org/source/brow​se/argouml-db/trunk/​src/org/dbuml/argo/u​ml/diagram/ui/DBSche​maDiagram.java?view=​diff&pathrev=72​&r1=71&r2=72
====================​====================​====================​==================
--- trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBSchemaDiagram.java​ (original)
+++ trunk/src/org/dbuml/​argo/uml/diagram/ui/​DBSchemaDiagram.java​ 2009-11-26 08:45:28-0800
@@ -5,6 +5,7 @@
 package org.dbuml.argo.uml.diagram.ui;
 
 
+import java.awt.Rectangle;
 import java.beans.PropertyV​etoException;
 
 import javax.swing.Action;
@@ -12,11 +13,13 @@
 
 import org.argouml.kernel.P​rojectManager;
 import org.argouml.model.Model;
+import org.argouml.uml.diag​ram.DiagramElement;
 import org.argouml.uml.diag​ram.static_structure​.ClassDiagramGraphMo​del;
 import org.argouml.uml.diag​ram.static_structure​.ui.ClassDiagramRend​erer;
 import org.argouml.uml.diag​ram.static_structure​.ui.UMLClassDiagram;​
 import org.argouml.uml.ui.f​oundation.core.Actio​nAddOperation;
 import org.argouml.util.Too​lBarUtility;
+import org.dbuml.argo.model​.ArgoDBModelFacade;
 import org.dbuml.argo.uml.u​i.ActionCreateColumn​;
 import org.dbuml.argo.uml.u​i.ActionCreateEdge;
 import org.dbuml.argo.uml.u​i.ActionCreatePKEY;
@@ -227,5 +230,20 @@
     }
     
     
+ public DiagramElement createDiagramElement(
+ final Object modelElement,
+ final Rectangle bounds) {
+ DiagramElement figNode = null;
+ if (ArgoDBModelFacade.g​etInstance().represe​ntsASchema(modelElem​ent)) {
+ figNode = new FigSchema(modelElement, bounds.x, bounds.y);
+ } else if (ArgoDBModelFacade.g​etInstance().represe​ntsATable(modelEleme​nt)) {
+ figNode = new FigTable(modelElement, bounds.x, bounds.y, bounds.width, bounds.height);
+ }
+ if (figNode == null) {
+ figNode = super.createDiagramE​lement(modelElement,​ bounds);
+ }
+ return figNode;
+ }
+
 } /* end class DBSchemaDiagram */

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r72 - trunk/src/org/dbuml/argo/uml/diagram/ui lepekhine Alexander Lepekhine 2009-11-26 08:45:29 PST
Messages per page: