svn commit: r16487 - trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-01-02 20:49:04-0800
New Revision: 16487

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java

Log:
Rename constant to avoid name conflict

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java?view=diff&pathrev=16487&r1=16486&r2=16487
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/FigClassifierRole.java	2009-01-02 20:49:04-0800
@@ -76,7 +76,7 @@
     /**
      * The width of an activation box.
      */
-    public static final int WIDTH = 20;
+    public static final int ROLE_WIDTH = 20;
 
     /**
      * The margin between the outer box and the name and stereotype text box.
@@ -144,7 +144,7 @@
         getNameFig().setFilled(false);
         getNameFig().setLineWidth(0);
         lifeLineFig =
-            new FigLifeLine(MIN_HEAD_WIDTH / 2 - WIDTH / 2, MIN_HEAD_HEIGHT);
+            new FigLifeLine(MIN_HEAD_WIDTH / 2 - ROLE_WIDTH / 2, MIN_HEAD_HEIGHT);
         linkPositions.add(new MessageNode(this));
         for (int i = 0;
                 i <= lifeLineFig.getHeight() 
@@ -294,9 +294,9 @@
         headFig.setBounds(x, y, w, headFig.getMinimumSize().height);
 
         lifeLineFig.setBounds(
-                (x + w / 2) - WIDTH / 2,
+                (x + w / 2) - ROLE_WIDTH / 2,
                 y + headFig.getHeight(),
-                WIDTH,
+                ROLE_WIDTH,
                 h - headFig.getHeight());
 
         this.updateEdges(); //???
@@ -430,7 +430,7 @@
                 int fmpY = lifeLineFig.getYCoordinate(i);
                 if (figMessagePort.getY() != fmpY) {
                     figMessagePort.setBounds(lifeLineFig.getX(), 
-                            fmpY, WIDTH, 1);
+                            fmpY, ROLE_WIDTH, 1);
                 }
                 Object message = figMessagePort.getOwner();
                 boolean selfMessage =
@@ -572,14 +572,16 @@
                 lifeLineFig.addActivationFig(
                     new FigLine(x,
                     	    y + SequenceDiagramLayer.LINK_DISTANCE / 2,
-                    	    x + WIDTH,
-                    	    y + SequenceDiagramLayer.LINK_DISTANCE));
+                    	    x + ROLE_WIDTH,
+                    	    y + SequenceDiagramLayer.LINK_DISTANCE, LINE_COLOR)
+                    );
                 lifeLineFig.addActivationFig(
                     new FigLine(x,
                     	    y + SequenceDiagramLayer.LINK_DISTANCE,
-                    	    x + WIDTH,
+                    	    x + ROLE_WIDTH,
                     	    y
-                    	    + SequenceDiagramLayer.LINK_DISTANCE / 2));
+                    	    + SequenceDiagramLayer.LINK_DISTANCE / 2, LINE_COLOR)
+                    );
             }
             if (startActivationNode == null) {
                 switch (nextState) {
@@ -631,7 +633,7 @@
                         y2 += SequenceDiagramLayer.LINK_DISTANCE / 2;
                     }
                     lifeLineFig.addActivationFig(
-                            new FigActivation(x, y1, WIDTH, y2 - y1));
+                            new FigActivation(x, y1, ROLE_WIDTH, y2 - y1));
                 }
                 startActivationNode = null;
                 endActivationNode = null;
@@ -651,7 +653,7 @@
                 y2 += SequenceDiagramLayer.LINK_DISTANCE / 2;
             }
             lifeLineFig.addActivationFig(
-                    new FigActivation(x, y1, WIDTH, y2 - y1));
+                    new FigActivation(x, y1, ROLE_WIDTH, y2 - y1));
             startActivationNode = null;
             endActivationNode = null;
             startFull = false;
@@ -1089,7 +1091,7 @@
         return new TempFig(
                 messageNode, lifeLineFig.getX(),
                 getYCoordinate((MessageNode) messageNode),
-                lifeLineFig.getX() + WIDTH);
+                lifeLineFig.getX() + ROLE_WIDTH);
     }
 
     /**

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

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.