svn commit: r15049 - 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-06-23 05:33:04-0700
New Revision: 15049

Added:
   branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Interface.xml   (contents, props changed)
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/UmlClass.xml
   branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java

Log:
Fixed namespaces, and removed the derived checkbox so "interface" can have a property panel. We need nested levels on the XML for allowing this, that we have not yet.

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=15049&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=15048&r2=15049
==============================================================================
--- 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-06-23 05:33:04-0700
@@ -171,10 +171,13 @@
             derivedCbx.setTarget(target);
             panel.add(derivedCbx);
             
-            UMLCheckBox2 activeCbx = 
-                new UMLClassActiveCheckBox();
-            activeCbx.setTarget(target);
-            panel.add(activeCbx);                   
+            // TODO: this must be created only if the target is
+            // a class, so I disable it until we are able of
+            // nesting checkboxes to a checkgroup
+//            UMLCheckBox2 activeCbx = 
+//                new UMLClassActiveCheckBox();
+//            activeCbx.setTarget(target);
+//            panel.add(activeCbx);                   
         }
         return panel;
     }
@@ -194,13 +197,11 @@
         if ("namespace".equals(prop.getName())) {
             UMLModelElementNamespaceComboBoxModel namespaceModel =
                 new UMLModelElementNamespaceComboBoxModel();                    
-            
+            namespaceModel.setTarget(target);
             JComboBox namespaceSelector = new UMLSearchableComboBox(
                     namespaceModel,
-                    // this needs a visibility
-                    // change in ArgoUML Core...
                     new ActionSetModelElementNamespace(), true);
-            Object c = target;
+            
             p.add(namespaceSelector);                    
 //                  p.add(new UMLComboBoxNavigator(
 //                  Translator.localize(

Added: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Interface.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Interface.xml?view=auto&rev=15049
==============================================================================
--- (empty file)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/Interface.xml	2008-06-23 05:33:04-0700
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<panel>	
+	<text name='name' />
+	<combo name='namespace' />
+	<optionbox name='visibility' />
+	<!-- TODO: NESTED ELEMENTS! WE NEED A TREE STRUCTURE -->
+	<checkgroup name='modifiers' >
+		<checkbox name='abstract' />
+		<checkbox name='leaf'/>
+		<checkbox name='root'/>
+		<checkbox name='derived'/>	
+	</checkgroup>
+</panel>

Modified: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml?view=diff&rev=15049&p1=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml&p2=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml&r1=15048&r2=15049
==============================================================================
--- branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml	(original)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/UmlClass.xml	2008-06-23 05:33:04-0700
@@ -3,11 +3,12 @@
 	<text name='name' />
 	<combo name='namespace' />
 	<optionbox name='visibility' />
+	<!-- TODO: NESTED ELEMENTS! WE NEED A TREE STRUCTURE -->
 	<checkgroup name='modifiers' >
-		<checkbox />
-		<checkbox />
-		<checkbox />
-		<checkbox />
-		<checkbox />	
+		<checkbox name='abstract' />
+		<checkbox name='leaf'/>
+		<checkbox name='root'/>
+		<checkbox name='derived'/>
+		<checkbox name='active'/>	
 	</checkgroup>
 </panel>

Modified: branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java?view=diff&rev=15049&p1=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java&p2=branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java&r1=15048&r2=15049
==============================================================================
--- branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java	(original)
+++ branches/xmlpropertypanels-penyaskito-soc08/argouml-core-propertypanels-scratch/src/org/argouml/core/propertypanels/xml/XMLPropertyPanelsDataRecord.java	2008-06-23 05:33:04-0700
@@ -24,6 +24,10 @@
 
 package org.argouml.core.propertypanels.xml;
 
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
 /**
  * Entry of the XML that defines the property panels
  *
@@ -34,9 +38,14 @@
     private String type;
     private String name;
     
+    private List<XMLPropertyPanelsDataRecord> children;
+    
+    // TODO: this is a tree node, we must refine the tree structure
+    
     public XMLPropertyPanelsDataRecord (String theType, String theName) {
         this.type = theType;
         this.name = theName;
+        children = new LinkedList<XMLPropertyPanelsDataRecord>();
     }
     
     public String getType() {
@@ -46,4 +55,16 @@
     public String getName() {
         return name;
     }
+    
+    public List<XMLPropertyPanelsDataRecord> getChildren() {
+        return Collections.unmodifiableList(children);
+    }
+    
+    public void addChild(XMLPropertyPanelsDataRecord child) {
+        children.add(child);
+    }
+    public void removeChild(XMLPropertyPanelsDataRecord child) {
+        children.remove(child);
+    }
+    
 }
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.