svn commit: r15212 - branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels: panel xml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: penyaskito
Date: 2008-07-08 15:58:21-0700
New Revision: 15212

Added:
   branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/AssociationEnd.xml   (contents, props changed)
Modified:
   branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java

Log:
A panel for AssociationEnd.

Modified: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java?view=diff&rev=15212&p1=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java&p2=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java&r1=15211&r2=15212
==============================================================================
--- branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java	(original)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java	2008-07-08 15:58:21-0700
@@ -69,6 +69,7 @@
 import org.argouml.uml.ui.UMLSingleRowSelector;
 import org.argouml.uml.ui.UMLTextArea2;
 import org.argouml.uml.ui.UMLTextField2;
+import org.argouml.uml.ui.foundation.core.ActionAddAssociationSpecification;
 import org.argouml.uml.ui.foundation.core.ActionAddClientDependencyAction;
 import org.argouml.uml.ui.foundation.core.ActionAddSupplierDependencyAction;
 import org.argouml.uml.ui.foundation.core.ActionSetGeneralizationPowertype;
@@ -76,6 +77,14 @@
 import org.argouml.uml.ui.foundation.core.ActionSetStructuralFeatureType;
 import org.argouml.uml.ui.foundation.core.UMLAssociationAssociationRoleListModel;
 import org.argouml.uml.ui.foundation.core.UMLAssociationConnectionListModel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndAggregationRadioButtonPanel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndAssociationListModel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndChangeabilityRadioButtonPanel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndNavigableCheckBox;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndOrderingCheckBox;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndQualifiersListModel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndSpecificationListModel;
+import org.argouml.uml.ui.foundation.core.UMLAssociationEndTargetScopeCheckbox;
 import org.argouml.uml.ui.foundation.core.UMLAssociationLinkListModel;
 import org.argouml.uml.ui.foundation.core.UMLBehavioralFeatureQueryCheckBox;
 import org.argouml.uml.ui.foundation.core.UMLClassActiveCheckBox;
@@ -274,6 +283,11 @@
             m.setTarget(target);   
             pane = new UMLSingleRowSelector(m);
         }
+        else if ("association".equals(prop.getName())) {
+            model = new UMLAssociationEndAssociationListModel();
+            model.setTarget(target);
+            pane = new UMLSingleRowSelector(model);
+        }
         if (pane != null) {           
             JLabel label = new JLabel(prop.getName());
             label.setLabelFor(pane);
@@ -425,6 +439,19 @@
             model.setTarget(target);
             list = new ScrollList(model);
         }
+        else if ("specification".equals(prop.getName())) {
+            model = new UMLAssociationEndSpecificationListModel();
+            model.setTarget(target);
+            list = new ScrollList(new UMLMutableLinkedList(
+                    model,
+                    ActionAddAssociationSpecification.getInstance(),
+                    null, null, true));
+        }
+        else if ("qualifiers".equals(prop.getName())) {
+            model = new UMLAssociationEndQualifiersListModel();
+            model.setTarget(target);
+            list = new ScrollList(model);
+        }
         if (list != null) {
             String name = prop.getName();
 
@@ -455,13 +482,21 @@
             control = visibilityPanel;
         }
         else if ("changeability".equals(prop.getName())) {
-            UMLRadioButtonPanel cPanel =   
-                new UMLStructuralFeatureChangeabilityRadioButtonPanel(
-                    Translator.localize("label.changeability"), 
-                    true); 
+            UMLRadioButtonPanel cPanel = null;
+            if (Model.getFacade().isAAssociationEnd(target)) {
+                cPanel = 
+                    new UMLAssociationEndChangeabilityRadioButtonPanel(
+                            "label.changeability", true);
+            }
+            else {
+                cPanel =   
+                    new UMLStructuralFeatureChangeabilityRadioButtonPanel(
+                            Translator.localize("label.changeability"), 
+                            true);
+            }
             cPanel.setTarget(target);
             control = cPanel;
-            
+
         }
         else if ("concurrency".equals(prop.getName())) { 
             UMLRadioButtonPanel cPanel =   
@@ -478,6 +513,13 @@
             cPanel.setTarget(target);
             control = cPanel;   
         }
+        else if ("aggregation".equals(prop.getName())) {
+            UMLRadioButtonPanel cPanel = 
+                new UMLAssociationEndAggregationRadioButtonPanel(
+                        "label.aggregation", true);
+            cPanel.setTarget(target);
+            control = cPanel;   
+        }
         if (control != null) {
             panel.add(control);
         }
@@ -523,11 +565,22 @@
             checkbox = new UMLClassActiveCheckBox();    
         }        
         else if ("static".equals(p.getName())) {
-            checkbox = new UMLFeatureOwnerScopeCheckBox();    
+            if (Model.getFacade().isAAssociationEnd(target)) {
+                checkbox = new UMLAssociationEndTargetScopeCheckbox();
+            }
+            else {
+                checkbox = new UMLFeatureOwnerScopeCheckBox();
+            }
         }
         else if ("query".equals(p.getName())) {
             checkbox = new UMLBehavioralFeatureQueryCheckBox();
         }
+        else if ("navigable".equals(p.getName())) {
+            checkbox = new UMLAssociationEndNavigableCheckBox();
+        }
+        else if ("ordered".equals(p.getName())) {
+            checkbox = new UMLAssociationEndOrderingCheckBox();
+        }
         if (checkbox != null) {
             checkbox.setTarget(target);
             panel.add(checkbox);

Added: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/AssociationEnd.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/AssociationEnd.xml?view=auto&rev=15212
==============================================================================
--- (empty file)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/AssociationEnd.xml	2008-07-08 15:58:21-0700
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<panel>
+	<text name='name' />
+	<singlerow name='association' />
+	<combo name='type' />
+	<combo name='multiplicity' />
+	<separator />
+	<checkgroup name='modifiers'>
+		<checkbox name='navigable' />
+		<checkbox name='ordered' />
+		<checkbox name='static' />
+	</checkgroup>
+	<list name='specification' />
+	<list name='qualifiers' />
+	<separator />
+	<optionbox name='aggregation' />
+	<optionbox name='changeability' />
+	<optionbox name='visibility' />
+</panel>
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.