Author: tfmorris
Date: 2007-05-06 13:46:30-0700
New Revision: 12558
Added:
trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/ActionSetSynch.java (contents, props changed)
trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/UMLActionSynchCheckBox.java (contents, props changed)
Modified:
trunk/src_new/org/argouml/i18n/checkbox.properties
trunk/src_new/org/argouml/i18n/label.properties
trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java
Log:
Issue 4569 - add isSynch for ObjectFlowState
Also fix NPE & ClassCastException in findClassifierByName and findStateByName
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=12558&p1=trunk/src_new/org/argouml/i18n/checkbox.properties&p2=trunk/src_new/org/argouml/i18n/checkbox.properties&r1=12557&r2=12558
==============================================================================
--- trunk/src_new/org/argouml/i18n/checkbox.properties (original)
+++ trunk/src_new/org/argouml/i18n/checkbox.properties 2007-05-06 13:46:30-0700
@@ -55,6 +55,7 @@
checkbox.static = Static
checkbox.static-lc = static
checkbox.static-uc = Static
+checkbox.synch-lc = synch
checkbox.visibility.private-lc = private
checkbox.visibility.private-uc = Private
checkbox.visibility.protected-lc = protected
Modified: trunk/src_new/org/argouml/i18n/label.properties
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/i18n/label.properties?view=diff&rev=12558&p1=trunk/src_new/org/argouml/i18n/label.properties&p2=trunk/src_new/org/argouml/i18n/label.properties&r1=12557&r2=12558
==============================================================================
--- trunk/src_new/org/argouml/i18n/label.properties (original)
+++ trunk/src_new/org/argouml/i18n/label.properties 2007-05-06 13:46:30-0700
@@ -328,6 +328,7 @@
label.subvertex = Subvertices:
label.supplier-dependencies = Supplier Dependencies:
label.suppliers = Suppliers:
+label.synch-state = Synch State:
label.tagdefinition = Tag definition:
label.tagdefinitions = Tag definitions:
label.tagged-values = Tagged Values:
Added: trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/ActionSetSynch.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/ActionSetSynch.java?view=auto&rev=12558
==============================================================================
--- (empty file)
+++ trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/ActionSetSynch.java 2007-05-06 13:46:30-0700
@@ -0,0 +1,83 @@
+// $Id$
+// Copyright (c) 1996-2006 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui.behavior.activity_graphs;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+
+import org.argouml.i18n.Translator;
+import org.argouml.model.Model;
+import org.argouml.uml.ui.UMLCheckBox2;
+import org.tigris.gef.undo.UndoableAction;
+
+/**
+ * Set the isSynch attribte of an ObjectFlowState.
+ *
+ * @author Tom Morris
+ */
+public class ActionSetSynch extends UndoableAction {
+
+ /**
+ * The instance.
+ */
+ private static final ActionSetSynch SINGLETON =
+ new ActionSetSynch();
+
+ /**
+ * Constructor for ActionSetElementOwnershipSpecification.
+ */
+ protected ActionSetSynch() {
+ super(Translator.localize("action.set"), null);
+ // Set the tooltip string:
+ putValue(Action.SHORT_DESCRIPTION,
+ Translator.localize("action.set"));
+ }
+
+ /*
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ public void actionPerformed(ActionEvent e) {
+ super.actionPerformed(e);
+ if (e.getSource() instanceof UMLCheckBox2) {
+ UMLCheckBox2 source = (UMLCheckBox2) e.getSource();
+ Object target = source.getTarget();
+ if (Model.getFacade().isAObjectFlowState(target)) {
+ Object m = target;
+ Model.getActivityGraphsHelper().setSynch(
+ m,
+ source.isSelected());
+ }
+ }
+ }
+
+ /**
+ * @return Returns the SINGLETON.
+ */
+ public static ActionSetSynch getInstance() {
+ return SINGLETON;
+ }
+
+}
Modified: trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java?view=diff&rev=12558&p1=trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java&p2=trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java&r1=12557&r2=12558
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java (original)
+++ trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/PropPanelObjectFlowState.java 2007-05-06 13:46:30-0700
@@ -77,6 +77,9 @@
addField(Translator.localize("label.container"),
getContainerScroll());
+ addField(Translator.localize("label.synch-state"),
+ new UMLActionSynchCheckBox());
+
// field for Type (Classifier)
addField(Translator.localize("label.type"),
new UMLComboBoxNavigator(
Added: trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/UMLActionSynchCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/UMLActionSynchCheckBox.java?view=auto&rev=12558
==============================================================================
--- (empty file)
+++ trunk/src_new/org/argouml/uml/ui/behavior/activity_graphs/UMLActionSynchCheckBox.java 2007-05-06 13:46:30-0700
@@ -0,0 +1,55 @@
+// $Id$
+// Copyright (c) 1996-2006 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
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui.behavior.activity_graphs;
+
+import org.argouml.i18n.Translator;
+import org.argouml.model.Model;
+import org.argouml.uml.ui.UMLCheckBox2;
+
+/**
+ * Set the isSynch attribute for a ObjectFlowState.
+ *
+ * @author Tom Morris
+ */
+public class UMLActionSynchCheckBox extends UMLCheckBox2 {
+
+ /**
+ * Constructor for UMLAssociationEndNavigableCheckBox.
+ */
+ public UMLActionSynchCheckBox() {
+ super(Translator.localize("checkbox.synch-lc"),
+ ActionSetSynch.getInstance(), "isSynch");
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLCheckBox2#buildModel()
+ */
+ public void buildModel() {
+ if (getTarget() != null) {
+ setSelected(Model.getFacade().isSynch(getTarget()));
+ }
+ }
+
+}
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.