svn commit: r12518 - trunk/src_new/org/argouml: i18n uml/ui uml/ui/foundation/core uml/ui/model_management

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-05-04 00:11:31-0700
New Revision: 12518

Modified:
   trunk/src_new/org/argouml/i18n/checkbox.properties
   trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java
   trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java
   trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java
   trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java
   trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java
   trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java

Log:
Issue 4252 - Add "derived" checkbox to a few property panels.  More work required.

Modified: trunk/src_new/org/argouml/i18n/checkbox.properties
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/i18n/checkbox.properties?view=diff&rev=12518&p1=trunk/src_new/org/argouml/i18n/checkbox.properties&p2=trunk/src_new/org/argouml/i18n/checkbox.properties&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/i18n/checkbox.properties	(original)
+++ trunk/src_new/org/argouml/i18n/checkbox.properties	2007-05-04 00:11:31-0700
@@ -38,6 +38,8 @@
 checkbox.compile-generated-source = Compile Generated Source
 checkbox.compile-generated-source.mnemonic = C
 checkbox.extension-points = Extension Points
+checkbox.derived-lc = derived
+checkbox.deprecated-lc = deprecated
 checkbox.final-lc = leaf
 checkbox.final-uc = Leaf
 checkbox.is-specification = Specification

Modified: trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java&p2=trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/UMLTaggedValueCheckBox.java	2007-05-04 00:11:31-0700
@@ -24,6 +24,7 @@
 
 package org.argouml.uml.ui;
 
+import org.argouml.i18n.Translator;
 import org.argouml.model.Model;
 
 /**
@@ -38,7 +39,9 @@
     private String tagName;
     
     public UMLTaggedValueCheckBox(String name) {
-        super(null, new ActionBooleanTaggedValue(name), name);
+        super(Translator.localize("checkbox." + name + "-lc"), 
+                new ActionBooleanTaggedValue(name), 
+                name);
         tagName = name;
     }
 

Modified: trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java	2007-05-04 00:11:31-0700
@@ -25,7 +25,6 @@
 package org.argouml.uml.ui.foundation.core;
 
 import org.argouml.i18n.Translator;
-import org.argouml.ui.targetmanager.TargetManager;
 import org.argouml.uml.ui.ActionNavigateNamespace;
 import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewStereotype;
 import org.argouml.util.ConfigLoader;

Modified: trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelClassifier.java	2007-05-04 00:11:31-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2007 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -30,18 +30,12 @@
 
 import org.argouml.i18n.Translator;
 import org.argouml.uml.ui.ScrollList;
+import org.argouml.uml.ui.UMLDerivedCheckBox;
 import org.argouml.uml.ui.behavior.common_behavior.ActionNewReception;
 import org.tigris.swidgets.Orientation;
 
 /**
  * The abstract properties panel for Classifiers.
- * 
- * TODO: A number of the get*Scroll() methods and the associated
- * UMLClassifier*Model classes are unused and don't appear to provide
- * useful functionality for the UML 1.4 metamodel (ie they map 
- * unnavigable or non-existent association ends in the metamodel).
- * The marked 
- *
  */
 public abstract class PropPanelClassifier extends PropPanelNamespace {
 
@@ -55,18 +49,9 @@
     private JScrollPane generalizationScroll;
     private JScrollPane specializationScroll;
     private JScrollPane featureScroll;
-    // TODO: participant list is unused (and appears incorrect to me) - tfm
-    private JScrollPane participantScroll;
     private JScrollPane createActionScroll;
-    private JScrollPane instanceScroll;
-    private JScrollPane collaborationScroll;
-    private JScrollPane classifierRoleScroll;
-    private JScrollPane classifierInStateScroll;
-    private JScrollPane objectFlowStateScroll;
     private JScrollPane powerTypeRangeScroll;
     private JScrollPane associationEndScroll;
-    private JScrollPane parameterScroll;
-    private JScrollPane structuralFeatureScroll;
     private JScrollPane attributeScroll;
     private JScrollPane operationScroll;
 
@@ -83,42 +68,14 @@
             new UMLGeneralizableElementSpecializationListModel();
     private static UMLClassifierFeatureListModel featureListModel =
         new UMLClassifierFeatureListModel();
-    // TODO: participant list is unused (and appears incorrect to me) - tfm
-    private static UMLClassifierParticipantListModel participantListModel =
-        new UMLClassifierParticipantListModel();
     private static UMLClassifierCreateActionListModel createActionListModel =
         new UMLClassifierCreateActionListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierInstanceListModel instanceListModel =
-        new UMLClassifierInstanceListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierCollaborationListModel collaborationListModel =
-        new UMLClassifierCollaborationListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierClassifierRoleListModel
-        classifierRoleListModel =
-            new UMLClassifierClassifierRoleListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierClassifierInStateListModel
-        classifierInStateListModel =
-            new UMLClassifierClassifierInStateListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierObjectFlowStateListModel
-        objectFlowStateListModel =
-            new UMLClassifierObjectFlowStateListModel();
     private static UMLClassifierPowertypeRangeListModel
     powertypeRangeListModel =
             new UMLClassifierPowertypeRangeListModel();
     private static UMLClassifierAssociationEndListModel
     associationEndListModel =
             new UMLClassifierAssociationEndListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierParameterListModel parameterListModel =
-        new UMLClassifierParameterListModel();
-    // TODO: Unused - tfm 20070114
-    private static UMLClassifierStructuralFeatureListModel
-        structuralFeatureListModel =
-            new UMLClassifierStructuralFeatureListModel();
     private static UMLClassAttributeListModel attributeListModel =
         new UMLClassAttributeListModel();
     private static UMLClassOperationListModel operationListModel =
@@ -152,16 +109,12 @@
      * Initialize the panel with the common fields and stuff.
      */
     private void initialize() {
-
         modifiersPanel = 
             createBorderPanel(Translator.localize("label.modifiers"));
-        modifiersPanel.add(
-            new UMLGeneralizableElementAbstractCheckBox());
-        modifiersPanel.add(
-            new UMLGeneralizableElementLeafCheckBox());
-        modifiersPanel.add(
-            new UMLGeneralizableElementRootCheckBox());
-
+        modifiersPanel.add(new UMLGeneralizableElementAbstractCheckBox());
+        modifiersPanel.add(new UMLGeneralizableElementLeafCheckBox());
+        modifiersPanel.add(new UMLGeneralizableElementRootCheckBox());
+        modifiersPanel.add(new UMLDerivedCheckBox());
     }
 
     /**
@@ -177,43 +130,6 @@
     }
 
     /**
-     * Returns the classifierInStateScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getClassifierInStateScroll() {
-        // TODO: Unused - tfm 20070114
-        if (classifierInStateScroll == null) {
-            classifierInStateScroll = 
-                new ScrollList(classifierInStateListModel);
-        }
-        return classifierInStateScroll;
-    }
-
-    /**
-     * Returns the classifierRoleScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getClassifierRoleScroll() {
-        // TODO: Unused - tfm 20070114
-        if (classifierRoleScroll == null) {
-            classifierRoleScroll = new ScrollList(classifierRoleListModel);
-        }
-        return classifierRoleScroll;
-    }
-
-    /**
-     * Returns the collaborationScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getCollaborationScroll() {
-        // TODO: Unused - tfm 20070114
-        if (collaborationScroll == null) {
-            collaborationScroll = new ScrollList(collaborationListModel);
-        }
-        return collaborationScroll;
-    }
-
-    /**
      * Returns the createActionScroll.
      * @return JScrollPane
      */
@@ -247,54 +163,6 @@
     }
 
     /**
-     * Returns the instanceScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getInstanceScroll() {
-        // TODO: Unused - tfm 20070114
-        if (instanceScroll == null) {
-            instanceScroll = new ScrollList(instanceListModel);
-        }
-        return instanceScroll;
-    }
-
-    /**
-     * Returns the objectFlowStateScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getObjectFlowStateScroll() {
-        // TODO: Unused - tfm 20070114
-        if (objectFlowStateScroll == null) {
-            objectFlowStateScroll = new ScrollList(objectFlowStateListModel);
-        }
-        return objectFlowStateScroll;
-    }
-
-    /**
-     * Returns the parameterScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getParameterScroll() {
-        // TODO: Unused - tfm 20070114
-        if (parameterScroll == null) {
-            parameterScroll = new ScrollList(parameterListModel);
-        }
-        return parameterScroll;
-    }
-
-    /**
-     * Returns the participantScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getParticipantScroll() {
-        // TODO: participant list is unused (and appears incorrect to me) - tfm
-        if (participantScroll == null) {
-            participantScroll = new ScrollList(participantListModel);
-        }
-        return participantScroll;
-    }
-
-    /**
      * Returns the powerTypeRangeScroll.
      * @return JScrollPane
      */
@@ -318,19 +186,6 @@
     }
 
     /**
-     * Returns the structuralFeatureScroll.
-     * @return JScrollPane
-     */
-    public JScrollPane getStructuralFeatureScroll() {
-        // TODO: Unused - tfm 20070114
-        if (structuralFeatureScroll == null) {
-            structuralFeatureScroll = 
-                new ScrollList(structuralFeatureListModel);
-        }
-        return structuralFeatureScroll;
-    }
-
-    /**
      * Returns the attributeScroll.
      *
      * @return JScrollPane

Modified: trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/core/PropPanelModelElement.java	2007-05-04 00:11:31-0700
@@ -38,6 +38,7 @@
 import org.argouml.uml.ui.PropPanel;
 import org.argouml.uml.ui.ScrollList;
 import org.argouml.uml.ui.UMLComboBoxNavigator;
+import org.argouml.uml.ui.UMLDerivedCheckBox;
 import org.argouml.uml.ui.UMLLinkedList;
 import org.argouml.uml.ui.UMLMutableLinkedList;
 import org.argouml.uml.ui.UMLPlainTextDocument;
@@ -95,10 +96,6 @@
     private static UMLModelElementSourceFlowListModel sourceFlowListModel =
 	new UMLModelElementSourceFlowListModel();
 
-    // private static UMLModelElementSupplierDependencyListModel
-    //    supplierDependencyListModel =
-    //        new UMLModelElementSupplierDependencyListModel();
-
     private static UMLModelElementTargetFlowListModel targetFlowListModel =
 	new UMLModelElementTargetFlowListModel();
 
@@ -151,6 +148,9 @@
         addField(Translator.localize("label.constraints"),
                 getConstraintScroll());
         add(getNamespaceVisibilityPanel());
+        
+        addField(Translator.localize("label.derived"),
+                new UMLDerivedCheckBox());
 
     }
 
@@ -180,7 +180,7 @@
     }
 
     /**
-     * Returns the namespace selecter. This is a component which allows the
+     * Returns the namespace selector. This is a component which allows the
      * user to select a single item as the namespace.
      *
      * @return a component for selecting the namespace

Modified: trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java&p2=trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/model_management/PropPanelElementImport.java	2007-05-04 00:11:31-0700
@@ -34,6 +34,7 @@
 import org.argouml.model.Model;
 import org.argouml.uml.ui.ActionNavigateContainerElement;
 import org.argouml.uml.ui.UMLCheckBox2;
+import org.argouml.uml.ui.UMLDerivedCheckBox;
 import org.argouml.uml.ui.UMLLinkedList;
 import org.argouml.uml.ui.UMLModelElementListModel2;
 import org.argouml.uml.ui.UMLPlainTextDocument;
@@ -104,6 +105,8 @@
                 "label.modifiers"));
             modifiersPanel.add(
                     new UMLElementImportIsSpecificationCheckbox());
+            modifiersPanel.add(
+                    new UMLDerivedCheckBox());
         }
         return modifiersPanel;
     }

Modified: trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java?view=diff&rev=12518&p1=trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java&p2=trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java&r1=12517&r2=12518
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/model_management/PropPanelPackage.java	2007-05-04 00:11:31-0700
@@ -41,6 +41,7 @@
 import org.argouml.ui.targetmanager.TargetManager;
 import org.argouml.uml.ui.ActionNavigateNamespace;
 import org.argouml.uml.ui.UMLAddDialog;
+import org.argouml.uml.ui.UMLDerivedCheckBox;
 import org.argouml.uml.ui.UMLLinkedList;
 import org.argouml.uml.ui.UMLMutableLinkedList;
 import org.argouml.uml.ui.foundation.core.ActionAddDataType;
@@ -160,6 +161,8 @@
                     new UMLGeneralizableElementLeafCheckBox());
             modifiersPanel.add(
                     new UMLGeneralizableElementRootCheckBox());
+            modifiersPanel.add(
+                    new UMLDerivedCheckBox());
         }
         return modifiersPanel;
     }
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.