Author: mvw
Date: 2007-06-02 09:38:50-0700
New Revision: 12743
Modified:
trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java
trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java
trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java
trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java
trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java
Log:
Did a ToDo: Make the ArgoDiagram abstract.
Modified: trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/ArgoDiagram.java 2007-06-02 09:38:50-0700
@@ -32,7 +32,6 @@
import org.apache.log4j.Logger;
import org.argouml.cognitive.ItemUID;
import org.argouml.kernel.Project;
-import org.argouml.kernel.ProjectManager;
import org.argouml.model.Model;
import org.argouml.uml.diagram.activity.ui.FigPool;
import org.argouml.uml.diagram.static_structure.ui.FigComment;
@@ -50,7 +49,7 @@
* This class represents all Diagrams within ArgoUML.
* It is based upon the GEF Diagram.
*/
-public class ArgoDiagram extends Diagram {
+public abstract class ArgoDiagram extends Diagram {
private ItemUID id;
@@ -59,15 +58,6 @@
*/
private static final Logger LOG = Logger.getLogger(ArgoDiagram.class);
- static {
- /**
- * Hack to use vetocheck in constructing names.
- *
- * TODO: Is this needed?
- */
- new ArgoDiagram();
- }
-
/**
* The constructor.
*/
@@ -171,14 +161,6 @@
return fig;
}
- /*
- * @see org.tigris.gef.base.Diagram#initialize(Object)
- */
- public void initialize(Object owner) {
- super.initialize(owner);
- ProjectManager.getManager().getCurrentProject().setActiveDiagram(this);
- }
-
/**
* This will mark the entire visible area of all Editors to be repaired
* from any damage - i.e. repainted.
@@ -491,11 +473,8 @@
* @param oldEncloser the previous encloser
* @param newEncloser the FigNode that encloses the dragged FigNode
*/
- public void encloserChanged(
- FigNode enclosed, FigNode oldEncloser, FigNode newEncloser) {
+ public abstract void encloserChanged(
+ FigNode enclosed, FigNode oldEncloser, FigNode newEncloser);
// Do nothing, override in subclass.
- // TODO: This should really be abstract, can we get rid of the static
- // hack at the start of this class?
- }
} /* end class ArgoDiagram */
Modified: trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/collaboration/ui/UMLCollaborationDiagram.java 2007-06-02 09:38:50-0700
@@ -47,6 +47,7 @@
import org.tigris.gef.base.LayerPerspectiveMutable;
import org.tigris.gef.base.ModeCreatePolyEdge;
import org.tigris.gef.presentation.Fig;
+import org.tigris.gef.presentation.FigNode;
/**
* The base class of the collaboration diagram.<p>
@@ -423,6 +424,10 @@
return false;
}
+ public void encloserChanged(FigNode enclosed,
+ FigNode oldEncloser, FigNode newEncloser) {
+ // Do nothing.
+ }
/**
* The UID.
Modified: trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java 2007-06-02 09:38:50-0700
@@ -35,6 +35,7 @@
import org.argouml.uml.diagram.sequence.SequenceDiagramGraphModel;
import org.argouml.uml.diagram.ui.RadioAction;
import org.argouml.uml.diagram.ui.UMLDiagram;
+import org.tigris.gef.presentation.FigNode;
/**
* The diagram for sequence diagrams.<p>
@@ -220,4 +221,9 @@
return false;
}
+ public void encloserChanged(FigNode enclosed,
+ FigNode oldEncloser, FigNode newEncloser) {
+ // Do nothing.
+ }
+
}
Modified: trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/state/ui/UMLStateDiagram.java 2007-06-02 09:38:50-0700
@@ -53,6 +53,7 @@
import org.tigris.gef.base.LayerPerspective;
import org.tigris.gef.base.LayerPerspectiveMutable;
import org.tigris.gef.base.ModeCreatePolyEdge;
+import org.tigris.gef.presentation.FigNode;
/**
@@ -726,4 +727,9 @@
return false;
}
+ public void encloserChanged(FigNode enclosed,
+ FigNode oldEncloser, FigNode newEncloser) {
+ // Do nothing.
+ }
+
} /* end class UMLStateDiagram */
Modified: trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java 2007-06-02 09:38:50-0700
@@ -42,6 +42,7 @@
import org.argouml.util.ToolBarUtility;
import org.tigris.gef.base.LayerPerspective;
import org.tigris.gef.base.LayerPerspectiveMutable;
+import org.tigris.gef.presentation.FigNode;
/**
* UML Class Diagram.
@@ -600,5 +601,10 @@
damage();
return true;
}
+
+ public void encloserChanged(FigNode enclosed, FigNode oldEncloser,
+ FigNode newEncloser) {
+ // Do nothing.
+ }
} /* end class UMLClassDiagram */
Modified: trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java?view=diff&rev=12743&p1=trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java&p2=trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java&r1=12742&r2=12743
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java (original)
+++ trunk/src_new/org/argouml/uml/diagram/use_case/ui/UMLUseCaseDiagram.java 2007-06-02 09:38:50-0700
@@ -43,6 +43,7 @@
import org.tigris.gef.base.LayerPerspective;
import org.tigris.gef.base.LayerPerspectiveMutable;
import org.tigris.gef.base.ModeCreatePolyEdge;
+import org.tigris.gef.presentation.FigNode;
/**
* The base class of the use case diagram.<p>
@@ -453,4 +454,9 @@
damage();
return true;
}
+
+ public void encloserChanged(FigNode enclosed,
+ FigNode oldEncloser, FigNode newEncloser) {
+ // Do nothing.
+ }
} /* end class UMLUseCaseDiagram */
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.