Author: penyaskito
Date: 2008-11-07 02:12:34-0800
New Revision: 15976
Modified:
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java
branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java
Log:
Reverting solution to issue 5462 (the two previous commits) after listening Bob's arguments. This won't be included in the release
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLList2.java 2008-11-07 02:12:34-0800
@@ -24,7 +24,6 @@
package org.argouml.uml.ui;
-import java.awt.Cursor;
import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
@@ -99,18 +98,12 @@
* @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
*/
public void mouseEntered(MouseEvent e) {
- if (hasPopup()) {
- setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
- }
}
/*
* @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
*/
public void mouseExited(MouseEvent e) {
- if (hasPopup()) {
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- }
}
/*
@@ -142,11 +135,4 @@
}
}
}
-
- protected boolean hasPopup() {
- if (getModel() instanceof UMLModelElementListModel2) {
- return ((UMLModelElementListModel2) getModel()).hasPopup();
- }
- return false;
- }
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/UMLModelElementListModel2.java 2008-11-07 02:12:34-0800
@@ -535,9 +535,5 @@
public boolean buildPopup(JPopupMenu popup, int index) {
return false;
}
-
- protected boolean hasPopup() {
- return false;
- }
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PopupMenuNewAction.java 2008-11-07 02:12:34-0800
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// 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
@@ -24,7 +24,6 @@
package org.argouml.uml.ui.behavior.common_behavior;
-import javax.swing.Action;
import javax.swing.JMenu;
import javax.swing.JPopupMenu;
@@ -52,63 +51,55 @@
public PopupMenuNewAction(String role, UMLMutableLinkedList list) {
super();
- buildMenu(this, role, list.getTarget());
- }
-
- public static void buildMenu(JPopupMenu pmenu,
- String role, Object target) {
-
JMenu newMenu = new JMenu();
newMenu.setText(Translator.localize("action.new"));
newMenu.add(ActionNewCallAction.getInstance());
- ActionNewCallAction.getInstance().setTarget(target);
+ ActionNewCallAction.getInstance().setTarget(list.getTarget());
ActionNewCallAction.getInstance().putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewCreateAction.getInstance());
- ActionNewCreateAction.getInstance().setTarget(target);
+ ActionNewCreateAction.getInstance().setTarget(list.getTarget());
ActionNewCreateAction.getInstance()
.putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewDestroyAction.getInstance());
- ActionNewDestroyAction.getInstance().setTarget(target);
+ ActionNewDestroyAction.getInstance().setTarget(list.getTarget());
ActionNewDestroyAction.getInstance()
.putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewReturnAction.getInstance());
- ActionNewReturnAction.getInstance().setTarget(target);
+ ActionNewReturnAction.getInstance().setTarget(list.getTarget());
ActionNewReturnAction.getInstance()
.putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewSendAction.getInstance());
- ActionNewSendAction.getInstance().setTarget(target);
+ ActionNewSendAction.getInstance().setTarget(list.getTarget());
ActionNewSendAction.getInstance().putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewTerminateAction.getInstance());
- ActionNewTerminateAction.getInstance().setTarget(target);
+ ActionNewTerminateAction.getInstance().setTarget(list.getTarget());
ActionNewTerminateAction.getInstance()
.putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewUninterpretedAction.getInstance());
- ActionNewUninterpretedAction.getInstance().setTarget(target);
+ ActionNewUninterpretedAction.getInstance().setTarget(list.getTarget());
ActionNewUninterpretedAction.getInstance()
.putValue(ActionNewAction.ROLE, role);
newMenu.add(ActionNewActionSequence.getInstance());
- ActionNewActionSequence.getInstance().setTarget(target);
+ ActionNewActionSequence.getInstance().setTarget(list.getTarget());
ActionNewActionSequence.getInstance()
.putValue(ActionNewAction.ROLE, role);
- pmenu.add(newMenu);
+ add(newMenu);
- pmenu.addSeparator();
+ addSeparator();
// TODO: This needs to be fixed to work for ActionSequences - tfm
ActionRemoveModelElement.SINGLETON.setObjectToRemove(ActionNewAction
- .getAction(role, target));
- ActionRemoveModelElement.SINGLETON.putValue(Action.NAME,
- Translator.localize("action.delete-from-model"));
- pmenu.add(ActionRemoveModelElement.SINGLETON);
+ .getAction(role, list.getTarget()));
+ add(ActionRemoveModelElement.SINGLETON);
}
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/PopupMenuNewEvent.java 2008-11-07 02:12:34-0800
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// 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
@@ -24,7 +24,6 @@
package org.argouml.uml.ui.behavior.state_machines;
-import javax.swing.Action;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
@@ -98,8 +97,6 @@
ActionRemoveModelElement.SINGLETON.setObjectToRemove(
ActionNewEvent.getAction(role, target));
- ActionRemoveModelElement.SINGLETON.putValue(Action.NAME,
- Translator.localize("action.delete-from-model"));
pmenu.add(ActionRemoveModelElement.SINGLETON);
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionEffectListModel.java 2008-11-07 02:12:34-0800
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// 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
@@ -24,12 +24,8 @@
package org.argouml.uml.ui.behavior.state_machines;
-import javax.swing.JPopupMenu;
-
import org.argouml.model.Model;
import org.argouml.uml.ui.UMLModelElementListModel2;
-import org.argouml.uml.ui.behavior.common_behavior.ActionNewAction;
-import org.argouml.uml.ui.behavior.common_behavior.PopupMenuNewAction;
/**
* @since Dec 15, 2002
@@ -59,15 +55,4 @@
return element == Model.getFacade().getEffect(getTarget());
}
- @Override
- public boolean buildPopup(JPopupMenu popup, int index) {
- PopupMenuNewAction.buildMenu(popup,
- ActionNewAction.Roles.EFFECT, getTarget());
- return true;
- }
-
- @Override
- protected boolean hasPopup() {
- return true;
- }
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionGuardListModel.java 2008-11-07 02:12:34-0800
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2008 The Regents of the University of California. All
+// 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
@@ -24,11 +24,7 @@
package org.argouml.uml.ui.behavior.state_machines;
-import javax.swing.JPopupMenu;
-
import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetManager;
-import org.argouml.uml.ui.AbstractActionNewModelElement;
import org.argouml.uml.ui.UMLModelElementListModel2;
/**
@@ -59,16 +55,4 @@
return element == Model.getFacade().getGuard(getTarget());
}
- @Override
- public boolean buildPopup(JPopupMenu popup, int index) {
- AbstractActionNewModelElement a = ActionNewGuard.getSingleton();
- a.setTarget(TargetManager.getInstance().getTarget());
- popup.add(a);
- return true;
- }
-
- @Override
- protected boolean hasPopup() {
- return true;
- }
}
Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java?view=diff&rev=15976&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java&r1=15975&r2=15976
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java (original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/UMLTransitionTriggerListModel.java 2008-11-07 02:12:34-0800
@@ -64,11 +64,4 @@
ActionNewEvent.Roles.TRIGGER, getTarget());
return true;
}
-
- @Override
- protected boolean hasPopup() {
- return true;
- }
-
-
}
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.