Author: penyaskito
Date: 2008-07-06 09:28:11-0700
New Revision: 15177
Modified:
branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/panel/UIFactory.java
branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml
Log:
Added single row capabilities to the UIFactory. Added owner to the attribute panel.
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=15177&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=15176&r2=15177
==============================================================================
--- 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-06 09:28:11-0700
@@ -51,6 +51,7 @@
import org.argouml.uml.ui.UMLMutableLinkedList;
import org.argouml.uml.ui.UMLRadioButtonPanel;
import org.argouml.uml.ui.UMLSearchableComboBox;
+import org.argouml.uml.ui.UMLSingleRowSelector;
import org.argouml.uml.ui.UMLTextField2;
import org.argouml.uml.ui.foundation.core.ActionAddClientDependencyAction;
import org.argouml.uml.ui.foundation.core.ActionAddSupplierDependencyAction;
@@ -61,6 +62,7 @@
import org.argouml.uml.ui.foundation.core.UMLClassOperationListModel;
import org.argouml.uml.ui.foundation.core.UMLClassifierAssociationEndListModel;
import org.argouml.uml.ui.foundation.core.UMLClassifierFeatureListModel;
+import org.argouml.uml.ui.foundation.core.UMLFeatureOwnerListModel;
import org.argouml.uml.ui.foundation.core.UMLGeneralizableElementAbstractCheckBox;
import org.argouml.uml.ui.foundation.core.UMLGeneralizableElementGeneralizationListModel;
import org.argouml.uml.ui.foundation.core.UMLGeneralizableElementLeafCheckBox;
@@ -152,6 +154,12 @@
panel.add(p);
}
}
+ else if ("singlerow".equals(prop.getType())) {
+ JPanel p = buildSingleRow(target, prop);
+ if (p != null) {
+ panel.add(p);
+ }
+ }
else if ("list".equals(prop.getType())) {
JPanel p = new JPanel();
JComponent list = buildList(target, prop);
@@ -172,6 +180,28 @@
return panel;
}
+ private JPanel buildSingleRow(Object target,
+ XMLPropertyPanelsDataRecord prop) {
+ JPanel p = new JPanel();
+
+ UMLModelElementListModel2 model = null;
+ UMLSingleRowSelector pane = null;
+ if ("owner".equals(prop.getName())) {
+ model = new UMLFeatureOwnerListModel();
+ model.setTarget(target);
+ }
+ if (model != null) {
+ pane = new UMLSingleRowSelector(model);
+ // TODO: We'll need to use addField in the future.
+ JLabel label = new JLabel(prop.getName());
+ label.setLabelFor(pane);
+ p.add(label);
+ p.add(pane);
+ return p;
+ }
+ return null;
+ }
+
protected JComponent buildList(Object target,
XMLPropertyPanelsDataRecord prop) {
JComponent list = null;
Modified: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml?view=diff&rev=15177&p1=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml&p2=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml&r1=15176&r2=15177
==============================================================================
--- branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml (original)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Attribute.xml 2008-07-06 09:28:11-0700
@@ -3,7 +3,7 @@
<text name='name' />
<combo name='type' />
<combo name='multiplicity' />
- <list name="owner" />
+ <singlerow name="owner" />
<separator />
<optionbox name='visibility' />
<optionbox name='changeability' />
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.