Graphics/UMLClassDiagramBuilder.py

changeset 2401
4f428de32b69
parent 2302
f29e9405c851
child 2402
304fcefd3b04
--- a/Graphics/UMLClassDiagramBuilder.py	Sun Feb 10 14:48:24 2013 +0100
+++ b/Graphics/UMLClassDiagramBuilder.py	Sun Feb 10 15:17:59 2013 +0100
@@ -16,9 +16,6 @@
 import Preferences
 
 from .UMLDiagramBuilder import UMLDiagramBuilder
-from .ClassItem import ClassItem, ClassModel
-from .AssociationItem import AssociationItem, Generalisation
-from . import GraphicsUtilities
 
 
 class UMLClassDiagramBuilder(UMLDiagramBuilder):
@@ -152,6 +149,7 @@
         
         The algorithm is borrowed from Boa Constructor.
         """
+        from . import GraphicsUtilities
         generations = GraphicsUtilities.sort(nodes, routes)
         
         # calculate width and height of all elements
@@ -226,6 +224,7 @@
         @param y y-coordinate (float)
         @param isRbModule flag indicating a Ruby module (boolean)
         """
+        from .ClassItem import ClassItem, ClassModel
         meths = sorted(_class.methods.keys())
         attrs = sorted(_class.attributes.keys())
         name = _class.name
@@ -249,6 +248,7 @@
         @param x x-coordinate (float)
         @param y y-coordinate (float)
         """
+        from .ClassItem import ClassItem, ClassModel
         cl = ClassModel(_class)
         cw = ClassItem(cl, True, x, y, noAttrs=self.noAttrs, scene=self.scene)
         cw.setId(self.umlView.getItemId())
@@ -262,6 +262,7 @@
         
         @param routes list of relationsships
         """
+        from .AssociationItem import AssociationItem, Generalisation
         for route in routes:
             if len(route) > 1:
                 assoc = AssociationItem(

eric ide

mercurial