svn commit: r16710 - trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-01-26 12:53:06-0800
New Revision: 16710

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java

Log:
RESOLVED - issue 5666: Restore previous vertical space distribution algorithm 
http://argouml.tigris.org/issues/show_bug.cgi?id=5666

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java?view=diff&pathrev=16710&r1=16709&r2=16710
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java	2009-01-26 12:53:06-0800
@@ -308,6 +308,10 @@
             borderFig.setBounds(x, y, w, h);
         }
         
+        // Extra space to be distributed among compartments is the difference
+        // between the actual size and the min. size
+        final int whitespace = h - getMinimumSize().height;
+        
         int currentHeight = 0;
 
         if (getStereotypeFig().isVisible()) {
@@ -328,8 +332,7 @@
             int attributesHeight = 
                 attributesFigCompartment.getMinimumSize().height;
             if (isOperationsVisible()) {
-                attributesHeight = Math.max(attributesHeight, 
-                        (h - currentHeight) / 2);
+                attributesHeight += whitespace / 2;
             }
             attributesFigCompartment.setBounds(
                     x,

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

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.