svn commit: r12619 - trunk/src_new/org/argouml/uml/diagram: activity/ui state/ui static_structure/ui use_case/ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-05-14 11:14:02-0700
New Revision: 12619

Modified:
   trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java
   trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java
   trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java
   trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java
   trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java

Log:
Fix icon array addressing

Modified: trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java?view=diff&rev=12619&p1=trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java&p2=trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java&r1=12618&r2=12619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/activity/ui/SelectionActionState.java	2007-05-14 11:14:02-0700
@@ -134,18 +134,19 @@
 
     @Override
     protected Icon[] getIcons() {
-        Icon[] workingIcons = icons;
+        Icon[] workingIcons = new Icon[icons.length];
+        System.arraycopy(icons, 0, workingIcons, 0, icons.length);
         if (!showOutgoingBelow) {
-            workingIcons[11] = null;
+            workingIcons[BOTTOM - BASE] = null;
         }
         if (!showIncomingAbove) {
-            workingIcons[12] = null;
+            workingIcons[TOP - BASE] = null;
         }
         if (!showIncomingLeft) {
-            workingIcons[12] = null;
+            workingIcons[LEFT - BASE] = null;
         }
         if (!showOutgoingRight) {
-            workingIcons[13] = null;
+            workingIcons[RIGHT - BASE] = null;
         }
         return icons;
     }

Modified: trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java?view=diff&rev=12619&p1=trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java&p2=trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java&r1=12618&r2=12619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/state/ui/SelectionState.java	2007-05-14 11:14:02-0700
@@ -89,10 +89,10 @@
         System.arraycopy(icons, 0, workingIcons, 0, icons.length);
 
         if (!showOutgoing) {
-            workingIcons[LEFT] = null;
+            workingIcons[LEFT - BASE] = null;
         }
         if (!showIncoming) {
-            workingIcons[RIGHT] = null;
+            workingIcons[RIGHT - BASE] = null;
         }
         
         return workingIcons;

Modified: trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java?view=diff&rev=12619&p1=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java&p2=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java&r1=12618&r2=12619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java	2007-05-14 11:14:02-0700
@@ -97,12 +97,12 @@
         // No Generalizations on Deployment Diagram
         if (Globals.curEditor().getGraphModel() 
                 instanceof DeploymentDiagramGraphModel) {
-            workingIcons[TOP] = null;
-            workingIcons[BOTTOM] = null;
+            workingIcons[TOP - BASE] = null;
+            workingIcons[BOTTOM - BASE] = null;
         }
         if (useComposite) {
-            workingIcons[LEFT] = compos;
-            workingIcons[LEFT] = compos;
+            workingIcons[LEFT - BASE] = compos;
+            workingIcons[LEFT - BASE] = compos;
         } 
         return workingIcons;
     }

Modified: trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java?view=diff&rev=12619&p1=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java&p2=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java&r1=12618&r2=12619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java	2007-05-14 11:14:02-0700
@@ -75,7 +75,7 @@
 
     @Override
     protected String getInstructions(int index) {
-        return instructions[index - 10];
+        return instructions[index - BASE];
     }
 
     @Override

Modified: trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java?view=diff&rev=12619&p1=trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java&p2=trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java&r1=12618&r2=12619
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/use_case/ui/SelectionUseCase.java	2007-05-14 11:14:02-0700
@@ -84,12 +84,12 @@
 
     @Override
     protected String getInstructions(int index) {
-        return instructions[index - 10];
+        return instructions[index - BASE];
     }
 
     @Override
     protected Object getNewEdgeType(int index) {
-        return edgeType[index - 10];
+        return edgeType[index - BASE];
     }
 
     @Override
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.