svn commit: r18558 - trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: linus
Date: 2010-07-24 08:53:42-0700
New Revision: 18558

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

Log:
Made the static initialization static.

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java?view=diff&pathrev=18558&r1=18557&r2=18558
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMessage.java	2010-07-24 08:53:42-0700
@@ -1,6 +1,6 @@
 /* $Id$
  *****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    mvw
+ *    Linus Tolke
  *****************************************************************************
  *
  * Some portions of this file was previously release using the BSD License:
@@ -65,13 +66,22 @@
 
     private static Vector<String> arrowDirections;
 
-    private FigPoly figPoly;
-
     private static final int SOUTH = 0;
     private static final int EAST = 1;
     private static final int WEST = 2;
     private static final int NORTH = 3;
 
+    static {
+        arrowDirections = new Vector<String>(4);
+        // TODO: i18n
+        arrowDirections.add(SOUTH, "South");
+        arrowDirections.add(EAST, "East");
+        arrowDirections.add(WEST, "West");
+        arrowDirections.add(NORTH, "North");
+    }
+
+    private FigPoly figPoly;
+
     /**
      * The current arrow direction set to constants above.
      */
@@ -101,17 +111,6 @@
 	addFig(figPoly);
     }
 
-    private void initArrows() {
-        if (arrowDirections == null) {
-            arrowDirections = new Vector<String>(4);
-            // TODO: i18n
-            arrowDirections.add(SOUTH, "South");
-            arrowDirections.add(EAST, "East");
-            arrowDirections.add(WEST, "West");
-            arrowDirections.add(NORTH, "North");
-        }
-    }
-
     /**
      * Construct a FigMessage.
      * 
@@ -122,7 +121,6 @@
     public FigMessage(Object owner, Rectangle bounds, 
             DiagramSettings settings) {
         super(owner, bounds, settings);
-        initArrows();
         initFigs();
         updateNameText();
     }

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

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.