svn commit: r12765 - branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram: static_structure/ui ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-06-05 18:56:41-0700
New Revision: 12765

Modified:
   branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java
   branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java
   branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java

Log:


Modified: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java?view=diff&rev=12765&p1=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java&p2=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java&r1=12764&r2=12765
==============================================================================
--- branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java	(original)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/static_structure/ui/FigClass.java	2007-06-05 18:56:41-0700
@@ -585,60 +585,64 @@
             final int w, final int h) {
         Rectangle oldBounds = getBounds();
 
-        // set bounds of big box
-        getBigPort().setBounds(x, y, w, h);
-        borderFig.setBounds(x, y, w, h);
-
-        // Save our old boundaries (needed later), and get minimum size
-        // info. "whitespace" will be used to maintain a running calculation
-        // of our size at various points.
-
-        final int whitespace = h - getMinimumSize().height;
-
-        getNameFig().setLineWidth(0);
-        getNameFig().setLineColor(Color.red);
-        int currentHeight = 0;
-
-        if (getStereotypeFig().isVisible()) {
-            int stereotypeHeight = getStereotypeFig().getMinimumSize().height;
-            getStereotypeFig().setBounds(
-                    x,
-                    y,
-                    w,
-                    stereotypeHeight);
-            currentHeight = stereotypeHeight;
-        }
-
-        int nameHeight = getNameFig().getMinimumSize().height;
-        getNameFig().setBounds(x, y + currentHeight, w, nameHeight);
-        currentHeight += nameHeight;
-
-        if (isAttributesVisible()) {
-            int attributesHeight = getAttributesFig().getMinimumSize().height;
-            if (isOperationsVisible()) {
-                attributesHeight += whitespace / 2;
-            }
-            getAttributesFig().setBounds(
-                    x,
-                    y + currentHeight,
-                    w,
-                    attributesHeight);
-            currentHeight += attributesHeight;
-        }
-
-        if (isOperationsVisible()) {
-            int operationsY = y + currentHeight;
-            int operationsHeight = (h + y) - operationsY - 1;
-            if (operationsHeight < getOperationsFig().getMinimumSize().height) {
-                operationsHeight = getOperationsFig().getMinimumSize().height;
-            }
-            getOperationsFig().setBounds(
-                    x,
-                    operationsY,
-                    w,
-                    operationsHeight);
-        }
+	if (stereotypeFigProfileIcon != null) {
+	    stereotypeFigProfileIcon.setBounds(x, y, w, h);
+	} else {
+	        // set bounds of big box
+	        getBigPort().setBounds(x, y, w, h);
+	        borderFig.setBounds(x, y, w, h);
+
+	        // Save our old boundaries (needed later), and get minimum size
+	        // info. "whitespace" will be used to maintain a running calculation
+	        // of our size at various points.
+
+	        final int whitespace = h - getMinimumSize().height;
+
+	        getNameFig().setLineWidth(0);
+	        getNameFig().setLineColor(Color.red);
+	        int currentHeight = 0;
+
+	        if (getStereotypeFig().isVisible()) {
+	            int stereotypeHeight = getStereotypeFig().getMinimumSize().height;
+	            getStereotypeFig().setBounds(
+	                    x,
+	                    y,
+	                    w,
+	                    stereotypeHeight);
+	            currentHeight = stereotypeHeight;
+	        }
+
+	        int nameHeight = getNameFig().getMinimumSize().height;
+	        getNameFig().setBounds(x, y + currentHeight, w, nameHeight);
+	        currentHeight += nameHeight;
+
+	        if (isAttributesVisible()) {
+	            int attributesHeight = getAttributesFig().getMinimumSize().height;
+	            if (isOperationsVisible()) {
+	                attributesHeight += whitespace / 2;
+	            }
+	            getAttributesFig().setBounds(
+	                    x,
+	                    y + currentHeight,
+	                    w,
+	                    attributesHeight);
+	            currentHeight += attributesHeight;
+	        }
+
+	        if (isOperationsVisible()) {
+	            int operationsY = y + currentHeight;
+	            int operationsHeight = (h + y) - operationsY - 1;
+	            if (operationsHeight < getOperationsFig().getMinimumSize().height) {
+	                operationsHeight = getOperationsFig().getMinimumSize().height;
+	            }
+	            getOperationsFig().setBounds(
+	                    x,
+	                    operationsY,
+	                    w,
+	                    operationsHeight);
+	        }
 
+	}
         // Now force calculation of the bounds of the figure, update the edges
         // and trigger anyone who's listening to see if the "bounds" property
         // has changed.
@@ -646,6 +650,7 @@
         calcBounds();
         updateEdges();
         firePropChange("bounds", oldBounds, getBounds());
+	System.out.println("FIGNODEMODELELEMENT: " + getBounds());
     }
 
     /**

Modified: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&rev=12765&p1=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java&p2=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java&r1=12764&r2=12765
==============================================================================
--- branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2007-06-05 18:56:41-0700
@@ -225,7 +225,7 @@
 
     /**
      */
-    private FigProfileIcon stereotypeFigProfileIcon;
+    protected FigProfileIcon stereotypeFigProfileIcon;
     
     private FigText originalNameFig;
     
@@ -1467,15 +1467,10 @@
             	}
 	    }
     	    this.redraw();
-        }	
-    }
-
-    protected void setBoundsImpl(int x, int y, int w, int h) {	
-	if (stereotypeFigProfileIcon != null) {
-	    stereotypeFigProfileIcon.setBounds(x, y, w, h);
-	} else {
-	    super.setBoundsImpl(x, y, w, h);
-	}
+        }
+        
+        System.out.println("ICON: "+stereotypeFigProfileIcon);
+        System.out.println("NAME: "+getNameFig() + "[" + originalNameFig);
     }
     
     /*

Modified: branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java?view=diff&rev=12765&p1=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java&p2=branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java&r1=12764&r2=12765
==============================================================================
--- branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java	(original)
+++ branches/gsoc2007/maurelio1234/argouml/org/argouml/uml/diagram/ui/FigProfileIcon.java	2007-06-05 18:56:41-0700
@@ -55,6 +55,9 @@
 	

 	image.setLocation(x + (width - image.getWidth())/2, y);

 	label.setLocation(x + (width - label.getWidth())/2, y + image.getHeight()+GAP);

+	

+        calcBounds();

+	System.out.println("FIGPROFILEICON: " + getBounds());

     }

 

     public FigText getLabelFig() {
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.