svn commit: r17548 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui
Bob Tarling <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2009-11-25 02:55:30-0800
New Revision: 17548
Modified:
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementOrderedListModel.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java
Log:
Get rid of popup menus for move
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java 2009-11-25 02:55:30-0800
@@ -62,48 +62,4 @@
* The UID.
*/
private static final long serialVersionUID = -3265997785192090331L;
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getActualArguments(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCommonBehaviorHelper().removeActualArgument(clss, mem);
- Model.getCommonBehaviorHelper().addActualArgument(clss, index + 1,
- mem);
-
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getActualArguments(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCommonBehaviorHelper().removeActualArgument(clss, mem);
- Model.getCommonBehaviorHelper().addActualArgument(clss,
- c.size() - 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getActualArguments(clss);
- if (index > 0) {
- Object mem = c.get(index);
- Model.getCommonBehaviorHelper().removeActualArgument(clss, mem);
- Model.getCommonBehaviorHelper().addActualArgument(clss, 0, mem);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java 2009-11-25 02:55:30-0800
@@ -57,45 +57,4 @@
protected boolean isValidElement(Object element) {
return Model.getFacade().isAAction(element);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index < c.size() - 1) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, index + 1, item);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index < c.size() - 1) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, c.size(), item);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index > 0) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, 0, item);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java 2009-11-25 02:55:30-0800
@@ -103,48 +103,4 @@
return Model.getFacade().isAAssociationEnd(o)
&& Model.getFacade().getConnections(getTarget()).contains(o);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object assoc = getTarget();
- /* Since we are UML 1.4, this is surely a List! */
- List c = (List) Model.getFacade().getConnections(assoc);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeConnection(assoc, mem);
- Model.getCoreHelper().addConnection(assoc, index + 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object assoc = getTarget();
- /* Since we are UML 1.4, this is surely a List! */
- List c = (List) Model.getFacade().getConnections(assoc);
- if (index < c.size() - 1) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeConnection(assoc, mem1);
- Model.getCoreHelper().addConnection(assoc, c.size() - 1, mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object assoc = getTarget();
- /* Since we are UML 1.4, this is surely a List! */
- List c = (List) Model.getFacade().getConnections(assoc);
- if (index > 0) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeConnection(assoc, mem1);
- Model.getCoreHelper().addConnection(assoc, 0, mem1);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java 2009-11-25 02:55:30-0800
@@ -59,46 +59,4 @@
return Model.getFacade().isAAttribute(o)
&& Model.getFacade().getQualifiers(getTarget()).contains(o);
}
-
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object assocEnd = getTarget();
- List c = Model.getFacade().getQualifiers(assocEnd);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeQualifier(assocEnd, mem);
- Model.getCoreHelper().addQualifier(assocEnd, index + 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object assocEnd = getTarget();
- List c = Model.getFacade().getQualifiers(assocEnd);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeQualifier(assocEnd, mem);
- Model.getCoreHelper().addQualifier(assocEnd, c.size() - 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getQualifiers(clss);
- if (index > 0) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeQualifier(clss, mem);
- Model.getCoreHelper().addQualifier(clss, 0, mem);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java 2009-11-25 02:55:30-0800
@@ -60,49 +60,4 @@
protected boolean isValidElement(Object element) {
return (Model.getFacade().getAttributes(getTarget()).contains(element));
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index1) {
- int index2 = index1 + 1;
- Object clss = getTarget();
- List c = Model.getFacade().getAttributes(clss);
- if (index1 < c.size() - 1) {
- Object mem1 = c.get(index1);
- Object mem2 = c.get(index2);
- List f = Model.getFacade().getFeatures(clss);
- index2 = f.indexOf(mem2);
- Model.getCoreHelper().removeFeature(clss, mem1);
- Model.getCoreHelper().addFeature(clss, index2, mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getAttributes(clss);
- if (index < c.size() - 1) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem1);
- Model.getCoreHelper().addFeature(clss, c.size() - 1, mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getAttributes(clss);
- if (index > 0) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem1);
- Model.getCoreHelper().addFeature(clss, 0, mem1);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java 2009-11-25 02:55:30-0800
@@ -62,51 +62,4 @@
return (Model.getFacade().getOperationsAndReceptions(getTarget())
.contains(element));
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index1) {
- int index2 = index1 + 1;
- Object clss = getTarget();
- List c = Model.getFacade().getOperationsAndReceptions(clss);
- if (index1 < c.size() - 1) {
- Object op1 = c.get(index1);
- Object op2 = c.get(index2);
- List f = Model.getFacade().getFeatures(clss);
- index2 = f.indexOf(op2);
- Model.getCoreHelper().removeFeature(clss, op1);
- Model.getCoreHelper().addFeature(clss, index2, op1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getOperationsAndReceptions(clss);
- if (index < c.size() - 1) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem1);
- Model.getCoreHelper().addFeature(clss, c.size() - 1, mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getOperationsAndReceptions(clss);
- if (index > 0) {
- Object mem1 = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem1);
- Model.getCoreHelper().addFeature(clss, 0, mem1);
- }
- }
-
-
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java 2009-11-25 02:55:30-0800
@@ -59,45 +59,4 @@
protected boolean isValidElement(Object element) {
return Model.getFacade().getFeatures(getTarget()).contains(element);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getFeatures(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem);
- Model.getCoreHelper().addFeature(clss, index + 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getFeatures(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem);
- Model.getCoreHelper().addFeature(clss, c.size(), mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getFeatures(clss);
- if (index > 0) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeFeature(clss, mem);
- Model.getCoreHelper().addFeature(clss, 0, mem);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java 2009-11-25 02:55:30-0800
@@ -65,47 +65,4 @@
protected boolean isValidElement(Object element) {
return Model.getFacade().getParameters(getTarget()).contains(element);
}
-
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object clss = getTarget();
- Collection c = Model.getFacade().getParameters(clss);
- if (c instanceof List && index < c.size() - 1) {
- Object mem = ((List) c).get(index);
- Model.getCoreHelper().removeParameter(clss, mem);
- Model.getCoreHelper().addParameter(clss, index + 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- Collection c = Model.getFacade().getParameters(clss);
- if (c instanceof List && index < c.size() - 1) {
- Object mem = ((List) c).get(index);
- Model.getCoreHelper().removeParameter(clss, mem);
- Model.getCoreHelper().addParameter(clss, c.size() - 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- Collection c = Model.getFacade().getParameters(clss);
- if (c instanceof List && index > 0) {
- Object mem = ((List) c).get(index);
- Model.getCoreHelper().removeParameter(clss, mem);
- Model.getCoreHelper().addParameter(clss, 0, mem);
- }
- }
-
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java 2009-11-25 02:55:30-0800
@@ -36,6 +36,11 @@
*/
class UMLEnumerationLiteralsListModel
extends UMLModelElementOrderedListModel {
+
+ /**
+ * The UID.
+ */
+ private static final long serialVersionUID = 4111214628991094451L;
/**
* Constructor for UMLClassifierStructuralFeatureListModel.
@@ -65,50 +70,4 @@
}
return false;
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getEnumerationLiterals(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeLiteral(clss, mem);
- Model.getCoreHelper().addLiteral(clss, index + 1, mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getEnumerationLiterals(clss);
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeLiteral(clss, mem);
- Model.getCoreHelper().addLiteral(clss, c.size(), mem);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object clss = getTarget();
- List c = Model.getFacade().getEnumerationLiterals(clss);
- if (index > 0) {
- Object mem = c.get(index);
- Model.getCoreHelper().removeLiteral(clss, mem);
- Model.getCoreHelper().addLiteral(clss, 0, mem);
- }
- }
-
- /**
- * The UID.
- */
- private static final long serialVersionUID = 4111214628991094451L;
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java 2009-11-25 02:55:30-0800
@@ -61,48 +61,4 @@
return Model.getFacade().isAExtensionPoint(o)
&& Model.getFacade().getExtensionPoints(getTarget()).contains(o);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index1) {
- int index2 = index1 + 1;
- Object extend = getTarget();
- /* In case of an Extend, we are sure an ordered List is returned! */
- List c = (List) Model.getFacade().getExtensionPoints(extend);
- Object mem1 = c.get(index1);
- Model.getUseCasesHelper().removeExtensionPoint(extend, mem1);
- Model.getUseCasesHelper().addExtensionPoint(extend, index2, mem1);
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object extend = getTarget();
- /* In case of an Extend, we are sure an ordered List is returned! */
- List c = (List) Model.getFacade().getExtensionPoints(extend);
- if (index < c.size() - 1) {
- Object mem1 = c.get(index);
- Model.getUseCasesHelper().removeExtensionPoint(extend, mem1);
- Model.getUseCasesHelper().addExtensionPoint(extend, c.size(), mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object extend = getTarget();
- /* In case of an Extend, we are sure an ordered List is returned! */
- List c = (List) Model.getFacade().getExtensionPoints(extend);
- if (index > 0) {
- Object mem1 = c.get(index);
- Model.getUseCasesHelper().removeExtensionPoint(extend, mem1);
- Model.getUseCasesHelper().addExtensionPoint(extend, 0, mem1);
- }
- }
-
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java 2009-11-25 02:55:30-0800
@@ -61,52 +61,4 @@
protected boolean isValidElement(Object element) {
return Model.getFacade().getConnections(getTarget()).contains(element);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object link = getTarget();
- List c = new ArrayList(Model.getFacade().getConnections(link));
- if (index < c.size() - 1) {
- Collections.swap(c, index, index + 1);
- Model.getCoreHelper().setConnections(link, c);
-
- /* The MDR model does not support the 2nd method below for LinkEnds.
- * Hence we can not replace the above inefficient code
- * by the code below. */
-// Model.getCoreHelper().removeConnection(link, mem1);
-// Model.getCoreHelper().addConnection(link, index2, mem1);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object link = getTarget();
- List c = new ArrayList(Model.getFacade().getConnections(link));
- if (index < c.size() - 1) {
- Object mem = c.get(index);
- c.remove(mem);
- c.add(mem);
- Model.getCoreHelper().setConnections(link, c);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object link = getTarget();
- List c = new ArrayList(Model.getFacade().getConnections(link));
- if (index > 0) {
- Object mem = c.get(index);
- c.remove(mem);
- c.add(0, mem);
- Model.getCoreHelper().setConnections(link, c);
- }
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementOrderedListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementOrderedListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementOrderedListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementOrderedListModel.java 2009-11-25 02:55:30-0800
@@ -110,219 +110,4 @@
* @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(java.lang.Object)
*/
protected abstract boolean isValidElement(Object element);
-
- /**
- * Move a element from the given position down one position, i.e. a swap of
- * the two positions. Anyone listening to the model will then be updated by
- * the events/listener mechanism. If the element is already the last element
- * in the list, nothing is done.
- *
- * @param index
- * the current position
- */
- protected abstract void moveDown(int index);
-
- /**
- * Move element at given index to top of list.
- *
- * @param index starting position of element to be moved
- */
- protected abstract void moveToTop(int index);
-
- /**
- * Move element at given index to bottom of list.
- *
- * @param index starting position of element to be moved
- */
- protected abstract void moveToBottom(int index);
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementListModel2#buildPopup(
- * javax.swing.JPopupMenu, int)
- */
- public boolean buildPopup(JPopupMenu popup, int index) {
- JMenuItem moveToTop = new JMenuItem(new MoveToTopAction(this, index));
- JMenuItem moveUp = new JMenuItem(new MoveUpAction(this, index));
- JMenuItem moveDown = new JMenuItem(new MoveDownAction(this, index));
- JMenuItem moveToBottom = new JMenuItem(new MoveToBottomAction(this,
- index));
- popup.add(moveToTop);
- popup.add(moveUp);
- popup.add(moveDown);
- popup.add(moveToBottom);
- return true;
- }
-
-}
-
-/**
- * The action to move an item in the list one place up.
- *
- * @author [email protected]
- */
-class MoveUpAction extends UndoableAction {
- private UMLModelElementOrderedListModel model;
-
- private int index;
-
- /**
- * The constructor.
- */
- public MoveUpAction(
- final UMLModelElementOrderedListModel theModel,
- final int theIndex) {
- super(Translator.localize("menu.popup.moveup"),
- ResourceLoaderWrapper.lookupIconResource("MoveUp"));
- model = theModel;
- index = theIndex;
- }
-
- /*
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- model.moveDown(index - 1);
- }
-
- /*
- * @see javax.swing.Action#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return index > 0;
- }
-}
-
-/**
- * The action to move an item in the list one place down.
- *
- * @author [email protected]
- */
-class MoveDownAction extends UndoableAction {
- private UMLModelElementOrderedListModel model;
-
- private int index;
-
- /**
- * The constructor.
- */
- public MoveDownAction(
- final UMLModelElementOrderedListModel theModel,
- final int theIndex) {
- super(Translator.localize("menu.popup.movedown"),
- ResourceLoaderWrapper.lookupIconResource("MoveDown"));
- model = theModel;
- index = theIndex;
- }
-
- /*
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- model.moveDown(index);
- }
-
- /*
- * @see javax.swing.Action#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return model.getSize() > index + 1;
- }
-}
-
-/**
- * Action to move an item to the top (beginning) of an ordered list model.
- *
- * @author Aleksandar Vucetica
- */
-class MoveToTopAction extends UndoableAction {
- private UMLModelElementOrderedListModel model;
-
- private int index;
-
- /**
- * Construct an action to move the item at the given index to the top of
- * the given list.
- *
- * @param theModel
- * the list model to operate on
- * @param theIndex
- * starting position of element to move
- */
- public MoveToTopAction(
- final UMLModelElementOrderedListModel theModel,
- final int theIndex) {
- super(Translator.localize("menu.popup.movetotop"),
- ResourceLoaderWrapper.lookupIconResource("MoveTop"));
- model = theModel;
- index = theIndex;
- }
-
- /*
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- model.moveToTop(index);
- }
-
- /*
- * @see javax.swing.Action#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return model.getSize() > 1 && index > 0;
- }
-}
-
-/**
- * Move an item to the bottom of the list.
- *
- * @author Aleksandar Vucetica
- */
-class MoveToBottomAction extends UndoableAction {
- private UMLModelElementOrderedListModel model;
-
- private int index;
-
- /**
- * Construct an action to move the item at the given index to the bottom of
- * the given list.
- *
- * @param theModel
- * the list model to operate on
- * @param theIndex
- * starting position of element to move
- */
- public MoveToBottomAction(
- final UMLModelElementOrderedListModel theModel,
- final int theIndex) {
- super(Translator.localize("menu.popup.movetobottom"),
- ResourceLoaderWrapper.lookupIconResource("MoveBottom"));
- model = theModel;
- index = theIndex;
- }
-
- /*
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- model.moveToBottom(index);
- }
-
- /*
- * @see javax.swing.Action#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return model.getSize() > 1 && index < model.getSize() - 1;
- }
}
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java?view=diff&pathrev=17548&r1=17547&r2=17548
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java 2009-11-25 02:55:30-0800
@@ -68,48 +68,4 @@
protected boolean isValidElement(Object o) {
return Model.getFacade().getExtensionPoints(getTarget()).contains(o);
}
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object usecase = getTarget();
- List c = new ArrayList(Model.getFacade().getExtensionPoints(usecase));
- if (index < c.size() - 1) {
- Collections.swap(c, index, index + 1);
- Model.getUseCasesHelper().setExtensionPoints(usecase, c);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object usecase = getTarget();
- List c = new ArrayList(Model.getFacade().getExtensionPoints(usecase));
- if (index < c.size() - 1) {
- Object mem1 = c.get(index);
-
- c.remove(mem1);
- c.add(c.size(), mem1);
- Model.getUseCasesHelper().setExtensionPoints(usecase, c);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object usecase = getTarget();
- List c = new ArrayList(Model.getFacade().getExtensionPoints(usecase));
- if (index > 0) {
- Object mem1 = c.get(index);
-
- c.remove(mem1);
- c.add(0, mem1);
- Model.getUseCasesHelper().setExtensionPoints(usecase, c);
- }
- }
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2424189
To unsubscribe from this discussion, e-mail: [[email protected]].