svn commit: r17190 - trunk/src/argouml-app/src/org/argouml/uml/diagram: activity/ui ui

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-07-26 07:41:42-0700
New Revision: 17190

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java

Log:
Fix for issue 5829. No more lazy instantiation of the stereotypes compartment.

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java?view=diff&pathrev=17190&r1=17189&r2=17190
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java	2009-07-26 07:41:42-0700
@@ -75,12 +75,12 @@
 
 
     /**
-     * Get the Fig containing the stereotype(s). As there is no stereotype
+     * Create the Fig containing the stereotype(s). As there is no stereotype
      * display for this Fig we return null
      *
      * @return the stereotype FigGroup
      */
-    protected FigStereotypesGroup getStereotypeFig() {
+    protected FigStereotypesGroup createStereotypeFig() {
         return null;
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&pathrev=17190&r1=17189&r2=17190
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2009-07-26 07:41:42-0700
@@ -377,6 +377,7 @@
         bigPort = new FigRect(X0, Y0, 0, 0, DEBUG_COLOR, DEBUG_COLOR);
         nameFig = new FigNameWithAbstractAndBold(element, 
                 new Rectangle(X0, Y0, WIDTH, NAME_FIG_HEIGHT), getSettings(), true);
+        stereotypeFig = createStereotypeFig();
         constructFigs();
         
         // TODO: For a FigPool the element will be null.
@@ -424,6 +425,13 @@
         readyToEdit = true;
     }
     
+    protected FigStereotypesGroup createStereotypeFig() {
+        return new FigStereotypesGroup(getOwner(), 
+                new Rectangle(X0, Y0, WIDTH, STEREOHEIGHT), settings);
+    }
+
+    
+    
     /**
      * This is the final call at creation time of the Fig, i.e. here
      * it is put on a Diagram.
@@ -1901,10 +1909,6 @@
      * @return the stereotype FigGroup
      */
     protected FigStereotypesGroup getStereotypeFig() {
-        if (stereotypeFig == null) {
-            stereotypeFig = new FigStereotypesGroup(getOwner(), 
-                    new Rectangle(X0, Y0, WIDTH, STEREOHEIGHT), settings);
-        }
         return stereotypeFig;
     }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2375665

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.