svn commit: r17526 - trunk/src/argouml-core-model/src/org/argouml/model

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-11-23 06:43:51-0800
New Revision: 17526

Modified:
   trunk/src/argouml-core-model/src/org/argouml/model/AbstractUmlHelperDecorator.java
   trunk/src/argouml-core-model/src/org/argouml/model/UmlHelper.java

Log:
Put the model subsystem in charge of moving elements within its owner. This is demonstrated with the move attribute functionality within XML prop panels

Modified: trunk/src/argouml-core-model/src/org/argouml/model/AbstractUmlHelperDecorator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/AbstractUmlHelperDecorator.java?view=diff&pathrev=17526&r1=17525&r2=17526
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/AbstractUmlHelperDecorator.java	(original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/AbstractUmlHelperDecorator.java	2009-11-23 06:43:51-0800
@@ -65,4 +65,12 @@
         return impl.getDestination(relationship);
     }
 
+
+    /*
+     * @see org.argouml.model.UmlHelper#move(java.lang.Object, org.argouml.model.UmlHelper.Direction)
+     */
+    public void move(Object element, Direction direction) {
+        impl.move(element, direction);
+    }
+
 }

Modified: trunk/src/argouml-core-model/src/org/argouml/model/UmlHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/UmlHelper.java?view=diff&pathrev=17526&r1=17525&r2=17526
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/UmlHelper.java	(original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/UmlHelper.java	2009-11-23 06:43:51-0800
@@ -25,6 +25,7 @@
 package org.argouml.model;
 
 import java.util.Collection;
+import java.util.Enumeration;
 
 /**
  * The interface for the Helper for Uml.<p>
@@ -32,6 +33,11 @@
  * Created from the old UmlHelper.
  */
 public interface UmlHelper {
+    
+    public enum Direction {
+        UP, DOWN, TOP, BOTTOM;
+    }
+    
     /**
      * Ensures that all of the elements in a model are registered
      * to the UmlModelListener.  This is useful when the MModel is
@@ -68,4 +74,14 @@
      * @return the destination of the relationship
      */
     Object getDestination(Object relationShip);
+    
+    /**
+     * This is used to change the ordering of elements that are already
+     * in some container. E.g. attributes within a class. They can be moved
+     * up, down or to top or bottom. 
+     * 
+     * @param element the element to move
+     * @param direction the direction of movement
+     */
+    void move(Object element, Direction direction);
 }

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

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.