diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2012-06-29 16:20:11 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2012-06-29 16:20:11 +0200 |
| commit | 11eb9557a35e17450c0aefb758471f1ff3148336 (patch) | |
| tree | 10251f415012336189dd8a7f4385434ad807d7ad | |
| parent | bc4d8f9fca275eceee86e38c52975461ca504d07 (diff) | |
Pull remaining graph GUI components into cristal-gui
30 files changed, 65 insertions, 610 deletions
@@ -3,8 +3,8 @@ <modelVersion>4.0.0</modelVersion>
<groupId>cristal</groupId>
<artifactId>cristal-kernel</artifactId>
- <version>2.3.1</version>
<name>cristal-kernel</name>
+ <version>2.3.2-SNAPSHOT</version>
<description>CRISTAL kernel</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/src/main/java/com/c2kernel/collection/AggregationMember.java b/src/main/java/com/c2kernel/collection/AggregationMember.java index e3b213e..49b9ab7 100644 --- a/src/main/java/com/c2kernel/collection/AggregationMember.java +++ b/src/main/java/com/c2kernel/collection/AggregationMember.java @@ -1,6 +1,5 @@ package com.c2kernel.collection;
-import java.awt.Image;
import java.util.StringTokenizer;
import com.c2kernel.common.ObjectNotFoundException;
@@ -12,7 +11,6 @@ import com.c2kernel.persistency.ClusterStorage; import com.c2kernel.process.Gateway;
import com.c2kernel.property.Property;
import com.c2kernel.utils.Logger;
-import com.c2kernel.utils.Resource;
/**
* @version $Revision: 1.11 $ $Date: 2005/12/01 14:23:15 $
@@ -31,7 +29,6 @@ public class AggregationMember extends GraphableVertex implements CollectionMemb private Aggregation mCollection = null;
private String mClassProps = null;
String entityName;
- Image image;
/**************************************************************************
@@ -134,13 +131,6 @@ public class AggregationMember extends GraphableVertex implements CollectionMemb }
- public Image getImage() {
- if (image == null) {
- image = Resource.findImage("typeicons/"+getProperties().get("Type")+"_16.png").getImage();
- }
- return image;
- }
-
public String getEntityName() {
if (entityName == null) {
if (mEntityKey > -1) {
diff --git a/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexFactory.java b/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexFactory.java index 7094644..88dcc3a 100644 --- a/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexFactory.java +++ b/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexFactory.java @@ -1,7 +1,5 @@ package com.c2kernel.collection.gui.model;
-import java.awt.Point;
-
import com.c2kernel.collection.Aggregation;
import com.c2kernel.graph.model.GraphModelManager;
import com.c2kernel.graph.model.GraphPoint;
@@ -27,12 +25,12 @@ public class AggregationVertexFactory implements VertexFactory public void create
(
GraphModelManager graphModelManager,
- Point location,
+ GraphPoint location,
TypeNameAndConstructionInfo typeNameAndConstructionInfo
) throws Exception
{
if (typeNameAndConstructionInfo.mInfo.equals("AggregationMember")) {
- mAggregation.addMember(-1, new CastorHashMap(), "", new GraphPoint(location.x, location.y), 40, 40);
+ mAggregation.addMember(-1, new CastorHashMap(), "",location, 40, 40);
}
}
}
diff --git a/src/main/java/com/c2kernel/graph/event/ElasticBandResizedEvent.java b/src/main/java/com/c2kernel/graph/event/ElasticBandResizedEvent.java deleted file mode 100644 index cb8ae3e..0000000 --- a/src/main/java/com/c2kernel/graph/event/ElasticBandResizedEvent.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.c2kernel.graph.event;
-
-
-public class ElasticBandResizedEvent extends GraphModelEvent
-{
-}
diff --git a/src/main/java/com/c2kernel/graph/event/ElasticBandSetEvent.java b/src/main/java/com/c2kernel/graph/event/ElasticBandSetEvent.java deleted file mode 100644 index 6211513..0000000 --- a/src/main/java/com/c2kernel/graph/event/ElasticBandSetEvent.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.c2kernel.graph.event;
-
-
-public class ElasticBandSetEvent extends GraphModelEvent
-{
-}
diff --git a/src/main/java/com/c2kernel/graph/event/SelectionChangedEvent.java b/src/main/java/com/c2kernel/graph/event/SelectionChangedEvent.java deleted file mode 100644 index f95e6d3..0000000 --- a/src/main/java/com/c2kernel/graph/event/SelectionChangedEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.c2kernel.graph.event;
-
-import com.c2kernel.graph.model.Selection;
-
-
-public class SelectionChangedEvent extends GraphModelEvent
-{
- public Selection mSelection = null;
-}
diff --git a/src/main/java/com/c2kernel/graph/event/SelectionMovedEvent.java b/src/main/java/com/c2kernel/graph/event/SelectionMovedEvent.java deleted file mode 100644 index 2d892a9..0000000 --- a/src/main/java/com/c2kernel/graph/event/SelectionMovedEvent.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.c2kernel.graph.event;
-
-
-
-public class SelectionMovedEvent extends GraphModelEvent
-{
-}
diff --git a/src/main/java/com/c2kernel/graph/model/ElasticBand.java b/src/main/java/com/c2kernel/graph/model/ElasticBand.java deleted file mode 100644 index 38497ef..0000000 --- a/src/main/java/com/c2kernel/graph/model/ElasticBand.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.c2kernel.graph.model;
-
-import java.awt.Point;
-
-
-public class ElasticBand
-{
- public Point mFixedCorner = null;
- public Point mMovingCorner = null;
-
-
- public ElasticBand(Point fixedCorner, Point movingCorner)
- {
- mFixedCorner = fixedCorner;
- mMovingCorner = movingCorner;
- }
-}
diff --git a/src/main/java/com/c2kernel/graph/model/GraphModel.java b/src/main/java/com/c2kernel/graph/model/GraphModel.java index 6f5ced5..c428e79 100644 --- a/src/main/java/com/c2kernel/graph/model/GraphModel.java +++ b/src/main/java/com/c2kernel/graph/model/GraphModel.java @@ -1,7 +1,5 @@ package com.c2kernel.graph.model;
-import java.awt.Point;
-import java.awt.Polygon;
import java.io.Serializable;
import java.util.Hashtable;
import java.util.Vector;
@@ -9,14 +7,10 @@ import java.util.Vector; import com.c2kernel.graph.event.ClearedEvent;
import com.c2kernel.graph.event.EdgeRemovedEvent;
import com.c2kernel.graph.event.EdgesChangedEvent;
-import com.c2kernel.graph.event.ElasticBandResizedEvent;
-import com.c2kernel.graph.event.ElasticBandSetEvent;
import com.c2kernel.graph.event.ForcedNotifyEvent;
import com.c2kernel.graph.event.GraphModelEvent;
import com.c2kernel.graph.event.GraphModelResizedEvent;
import com.c2kernel.graph.event.NewEdgeEndPointChangedEvent;
-import com.c2kernel.graph.event.SelectionChangedEvent;
-import com.c2kernel.graph.event.SelectionMovedEvent;
import com.c2kernel.graph.event.StartVertexIdChangedEvent;
import com.c2kernel.graph.event.VertexAddedEvent;
import com.c2kernel.graph.event.VertexCreatedEvent;
@@ -25,8 +19,8 @@ import com.c2kernel.graph.event.VertexRemovedEvent; import com.c2kernel.graph.event.VerticesChangedEvent;
import com.c2kernel.utils.Logger;
-public class GraphModel implements Serializable{
- /* Persistant data */
+public class GraphModel implements Serializable {
+ /* Persistent data */
private int mWidth = 0;
private int mHeight = 0;
@@ -38,11 +32,9 @@ public class GraphModel implements Serializable{ /* Transient data */
- // There should always be a Selection object
- protected Selection mSelection = new Selection(null, null, 0, 0, 0, 0);
protected Vertex mNewEdgeOriginVertex = null;
- protected Point mNewEdgeEndPoint = null;
- private ElasticBand mElasticBand = null;
+ protected GraphPoint mNewEdgeEndPoint = null;
+
private GraphModelManager mManager = null;
/* External factories */
@@ -61,16 +53,12 @@ public class GraphModel implements Serializable{ private final EdgesChangedEvent mEdgesChangedEvent = new EdgesChangedEvent();
private final ForcedNotifyEvent mForcedNotifyEvent = new ForcedNotifyEvent();
private final NewEdgeEndPointChangedEvent mNewEdgeEndPointChangedEvent = new NewEdgeEndPointChangedEvent();
- private final SelectionChangedEvent mSelectionChangedEvent = new SelectionChangedEvent();
private final StartVertexIdChangedEvent mStartVertexIdChangedEvent = new StartVertexIdChangedEvent();
private final VertexAddedEvent mVertexAddedEvent = new VertexAddedEvent();
private final VertexCreatedEvent mVertexCreatedEvent = new VertexCreatedEvent();
private final VertexMovedEvent mVertexMovedEvent = new VertexMovedEvent();
- private final SelectionMovedEvent mSelectionMovedEvent = new SelectionMovedEvent();
private final VertexRemovedEvent mVertexRemovedEvent = new VertexRemovedEvent();
private final VerticesChangedEvent mVerticesChangedEvent = new VerticesChangedEvent();
- private final ElasticBandSetEvent mElasticBandSetEvent = new ElasticBandSetEvent();
- private final ElasticBandResizedEvent mElasticBandResizedEvent = new ElasticBandResizedEvent();
private final GraphModelResizedEvent mGraphModelResizedEvent = new GraphModelResizedEvent();
// Calling this constructor does not create a vertex outline creator
@@ -90,16 +78,6 @@ public class GraphModel implements Serializable{ return number;
}
- private void setChanged() {
- if (mManager != null)
- mManager.setChanged();
- }
-
- private void notifyObservers(GraphModelEvent ev) {
- if (mManager != null)
- mManager.notifyObservers(ev);
- }
-
public void setNextId(int id) {
mNextId = id;
}
@@ -152,14 +130,14 @@ public class GraphModel implements Serializable{ }
if (resized) {
- setChanged();
- notifyObservers(mGraphModelResizedEvent);
+ publishEvent(mGraphModelResizedEvent);
}
}
public void setStartVertexId(int id) {
mStartVertexId = id;
+ publishEvent(mStartVertexIdChangedEvent);
}
public int getStartVertexId() {
@@ -190,8 +168,7 @@ public class GraphModel implements Serializable{ checkSize(vertice);
}
- setChanged();
- notifyObservers(mVerticesChangedEvent);
+ publishEvent(mVerticesChangedEvent);
}
public Vertex[] getVertices() {
@@ -209,8 +186,7 @@ public class GraphModel implements Serializable{ for (DirectedEdge edge : edges) {
mEdgeHashtable.put(String.valueOf(edge.getID()), edge);
}
- setChanged();
- notifyObservers(mEdgesChangedEvent);
+ publishEvent(mEdgesChangedEvent);
}
public DirectedEdge[] getEdges() {
@@ -304,12 +280,7 @@ public class GraphModel implements Serializable{ terminus.removeInEdgeId(edgeId);
// Remove the edge
mEdgeHashtable.remove(String.valueOf(e.getID()));
- setChanged();
- notifyObservers(mEdgeRemovedEvent);
- }
-
- public int addVertexAndCreateId(Vertex v, Point location) {
- return addVertexAndCreateId(v, new GraphPoint(location.x, location.y));
+ publishEvent(mEdgeRemovedEvent);
}
public int addVertexAndCreateId(Vertex v, GraphPoint location) {
@@ -332,8 +303,7 @@ public class GraphModel implements Serializable{ if (mVertexOutlineCreator != null) {
mVertexOutlineCreator.setOutline(v);
}
- setChanged();
- notifyObservers(mVertexAddedEvent);
+ publishEvent(mVertexAddedEvent);
checkSize(v);
}
@@ -365,8 +335,7 @@ public class GraphModel implements Serializable{ }
// Remove the vertex
mVertexHashtable.remove(String.valueOf(v.getID()));
- setChanged();
- notifyObservers(mVertexRemovedEvent);
+ publishEvent(mVertexRemovedEvent);
}
public void moveAbsoluteVertex(Vertex v, GraphPoint p) {
@@ -376,8 +345,7 @@ public class GraphModel implements Serializable{ if (p.x > mWidth) p.x = mWidth;
if (p.y > mHeight) p.y = mHeight;
moveAbsoluteVertexAndConnectingEdges(v, p);
- setChanged();
- notifyObservers(mVertexMovedEvent);
+ publishEvent(mVertexMovedEvent);
}
private void moveAbsoluteVertexAndConnectingEdges(Vertex v, GraphPoint p) {
@@ -397,43 +365,7 @@ public class GraphModel implements Serializable{ checkSize(v);
}
- public void moveAbsoluteSelection(int newTopLeftX, int newTopLeftY) {
- int selectionHeight = mSelection.mBottomRightY - mSelection.mTopLeftY;
- int selectionWidth = mSelection.mBottomRightX - mSelection.mTopLeftX;
- int bottomRightX = newTopLeftX + selectionWidth;
- int bottomRightY = newTopLeftY + selectionHeight;
- GraphPoint oldCentrePoint = null;
- GraphPoint newCentrePoint = null;
- int distXFromTopLeft = 0;
- int distYFromTopLeft = 0;
- int i = 0;
- // Make sure the selection does not move
- // outside the boundaries of the graph
- if (newTopLeftX < 0) newTopLeftX = 0;
- if (newTopLeftY < 0) newTopLeftY = 0;
- if (bottomRightX > mWidth) newTopLeftX = mWidth - selectionWidth;
- if (bottomRightY > mHeight) newTopLeftY = mHeight - selectionHeight;
- // For each selected vertex
- for (i = 0; i < mSelection.mVertices.length; i++) {
- // Calculate the new centre point of the vertex.
- // First calculate the distance of the centre point
- // from the old top left hand corner of the selection,
- // then move the point to the new top left hand
- // corner plus the distance.
- oldCentrePoint = mSelection.mVertices[i].getCentrePoint();
- distXFromTopLeft = oldCentrePoint.x - mSelection.mTopLeftX;
- distYFromTopLeft = oldCentrePoint.y - mSelection.mTopLeftY;
- newCentrePoint = new GraphPoint(newTopLeftX + distXFromTopLeft, newTopLeftY + distYFromTopLeft);
- moveAbsoluteVertexAndConnectingEdges(mSelection.mVertices[i], newCentrePoint);
- }
- // Update the top left and bottom right corners
- mSelection.mTopLeftX = newTopLeftX;
- mSelection.mTopLeftY = newTopLeftY;
- mSelection.mBottomRightX = newTopLeftX + selectionWidth;
- mSelection.mBottomRightY = newTopLeftY + selectionHeight;
- setChanged();
- notifyObservers(mSelectionMovedEvent);
- }
+
public Vertex resolveVertex(int id) {
return mVertexHashtable.get(String.valueOf(id));
@@ -525,62 +457,17 @@ public class GraphModel implements Serializable{ }
public void forceNotify() {
- setChanged();
- notifyObservers(mForcedNotifyEvent);
+ publishEvent(mForcedNotifyEvent);
}
public void clear() {
mVertexHashtable = new Hashtable<String, Vertex>();
mEdgeHashtable = new Hashtable<String, DirectedEdge>();
mStartVertexId = -1;
- setChanged();
- notifyObservers(mClearedEvent);
+ publishEvent(mClearedEvent);
}
- public void setSelection(Selection s) {
- // If the there is a change
- if (selectionChanged(s)) {
- mSelection = s;
- mSelectionChangedEvent.mSelection = s;
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
- }
- private boolean selectionChanged(Selection newValue) {
- int i = 0;
- if (mSelection.mEdge != newValue.mEdge) {
- return true;
- }
- if (mSelection.mVertices == null) {
- if (newValue.mVertices == null) {
- return false;
- }
- else {
- return true;
- }
- }
- else {
- if (newValue.mVertices == null) {
- return true;
- }
- else {
- if (mSelection.mVertices.length != newValue.mVertices.length) {
- return true;
- }
- for (i = 0; i < mSelection.mVertices.length; i++) {
- if (mSelection.mVertices[i] != newValue.mVertices[i]) {
- return true;
- }
- }
- return false;
- }
- }
- }
-
- public Selection getSelection() {
- return mSelection;
- }
public void setNewEdgeOriginVertex(Vertex v) {
mNewEdgeOriginVertex = v;
@@ -590,13 +477,12 @@ public class GraphModel implements Serializable{ return mNewEdgeOriginVertex;
}
- public void setNewEdgeEndPoint(Point p) {
+ public void setNewEdgeEndPoint(GraphPoint p) {
mNewEdgeEndPoint = p;
- setChanged();
- notifyObservers(mNewEdgeEndPointChangedEvent);
+ publishEvent(mNewEdgeEndPointChangedEvent);
}
- public Point getNewEdgeEndPoint() {
+ public GraphPoint getNewEdgeEndPoint() {
return mNewEdgeEndPoint;
}
@@ -604,15 +490,20 @@ public class GraphModel implements Serializable{ mExternalVertexFactory = factory;
}
- public void createVertex(Point location, TypeNameAndConstructionInfo typeNameAndConstructionInfo) throws Exception {
+ public void createVertex(GraphPoint location, TypeNameAndConstructionInfo typeNameAndConstructionInfo) throws Exception {
if (mExternalVertexFactory != null) {
mExternalVertexFactory.create(mManager, location, typeNameAndConstructionInfo);
- setChanged();
- notifyObservers(mVertexCreatedEvent);
+ publishEvent(mVertexCreatedEvent);
}
}
- public void setExternalEdgeFactory(EdgeFactory factory) {
+ private void publishEvent(GraphModelEvent event) {
+ if (mManager!=null)
+ mManager.notifyObservers(event);
+
+ }
+
+ public void setExternalEdgeFactory(EdgeFactory factory) {
mExternalEdgeFactory = factory;
}
@@ -626,211 +517,7 @@ public class GraphModel implements Serializable{ }
}
- public void selectAll() {
- Vertex[] allVertices = getVertices();
- if (allVertices.length > 0) {
- mSelection.mEdge = null;
- mSelection.mVertices = allVertices;
- updateSelectionCorners();
- mSelectionChangedEvent.mSelection = mSelection;
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
- }
-
- public void selectContentsOfElasticBand() {
- if (mElasticBand == null) return;
- Polygon bandPolygon = new Polygon();
- Vertex[] allVertices = getVertices();
- GraphPoint centrePoint = null;
- Vector<Vertex> verticesInside = new Vector<Vertex>(10, 10);
- int i = 0;
- // Create a polygon representing the elastic band
- bandPolygon.addPoint(mElasticBand.mFixedCorner.x, mElasticBand.mFixedCorner.y);
- bandPolygon.addPoint(mElasticBand.mMovingCorner.x, mElasticBand.mFixedCorner.y);
- bandPolygon.addPoint(mElasticBand.mMovingCorner.x, mElasticBand.mMovingCorner.y);
- bandPolygon.addPoint(mElasticBand.mFixedCorner.x, mElasticBand.mMovingCorner.y);
- // Create a vector of all of the vertices within the elastic band polygon
- for (i = 0; i < allVertices.length; i++) {
- centrePoint = allVertices[i].getCentrePoint();
- if (bandPolygon.contains(centrePoint.x, centrePoint.y)) {
- verticesInside.add(allVertices[i]);
- }
- }
-
- // Select the vertices found within the elastic band polygon
- if (verticesInside.size() == 0) {
- mSelection.mTopLeftX = 0;
- mSelection.mTopLeftY = 0;
- mSelection.mBottomRightX = 0;
- mSelection.mBottomRightY = 0;
- mSelection.mEdge = null;
- if (mContainingVertex != null)
- verticesInside.add(mContainingVertex);
- else
- mSelection.mVertices = null;
- }
-
- if (verticesInside.size() > 0) {
- mSelection.mEdge = null;
- mSelection.mVertices = new Vertex[verticesInside.size()];
- for (i = 0; i < verticesInside.size(); i++) {
- mSelection.mVertices[i] = verticesInside.elementAt(i);
- }
- updateSelectionCorners();
- }
- // Remove the elastic band
- mElasticBand = null;
- mSelectionChangedEvent.mSelection = mSelection;
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
-
- // Updates the top left and bottom right corners of the selection
- private void updateSelectionCorners() {
- Vertex vertex = mSelection.mVertices[0];
- GraphPoint centrePoint = vertex.getCentrePoint();
- if (centrePoint == null) return;
- mSelection.mTopLeftX = centrePoint.x;
- mSelection.mTopLeftY = centrePoint.y;
- mSelection.mBottomRightX = centrePoint.x;
- mSelection.mBottomRightY = centrePoint.y;
- for (Vertex mVertice : mSelection.mVertices) {
- vertex = mVertice;
- centrePoint = vertex.getCentrePoint();
- if (centrePoint.x < mSelection.mTopLeftX) {
- mSelection.mTopLeftX = centrePoint.x;
- }
- if (centrePoint.y < mSelection.mTopLeftY) {
- mSelection.mTopLeftY = centrePoint.y;
- }
- if (centrePoint.x > mSelection.mBottomRightX) {
- mSelection.mBottomRightX = centrePoint.x;
- }
- if (centrePoint.y > mSelection.mBottomRightY) {
- mSelection.mBottomRightY = centrePoint.y;
- }
- }
- }
-
- public void deleteSelection() {
- int i = 0;
- if (mSelection.mVertices != null) {
- for (i = 0; i < mSelection.mVertices.length; i++) {
- removeVertex(mSelection.mVertices[i]);
- }
- }
- else if (mSelection.mEdge != null) {
- removeEdge(mSelection.mEdge);
- }
- // Make sure nothing is selected
- if ((mSelection.mEdge != null) || (mSelection.mVertices != null)) {
- mSelection.mEdge = null;
- mSelection.mVertices = null;
- mSelectionChangedEvent.mSelection = mSelection;
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
- }
- public void setSelectedVertexToBeStart() {
- if (mSelection.mVertices != null) {
- if (mSelection.mVertices.length == 1) {
- setStartVertexId(mSelection.mVertices[0].getID());
- setChanged();
- notifyObservers(mStartVertexIdChangedEvent);
- }
- }
- }
-
- public void setElasticBand(ElasticBand elasticBand) {
- mElasticBand = elasticBand;
- setChanged();
- notifyObservers(mElasticBandSetEvent);
- }
-
- public ElasticBand getElasticBand() {
- return mElasticBand;
- }
-
- public void resizeElasticBand(Point movingCorner) {
- mElasticBand.mMovingCorner = movingCorner;
- setChanged();
- notifyObservers(mElasticBandResizedEvent);
- }
-
- public boolean inSelection(Vertex v) {
- int i = 0;
- if (mSelection.mVertices == null) {
- return false;
- }
- else {
- for (i = 0; i < mSelection.mVertices.length; i++) {
- if (mSelection.mVertices[i] == v) {
- return true;
- }
- }
- return false;
- }
- }
-
- // Only use this method to remove one vertex.
- // If you wish to remove more, it would
- // propably be more efficient to create a
- // new Selection object.
- public void removeFromSelection(Vertex v) {
- Vertex[] vertices = null;
- int i = 0;
- int j = 0;
- if (mSelection.mVertices.length == 1) {
- mSelection.mVertices = null;
- mSelection.mTopLeftX = 0;
- mSelection.mTopLeftY = 0;
- mSelection.mBottomRightX = 0;
- mSelection.mBottomRightY = 0;
- }
- else {
- vertices = new Vertex[mSelection.mVertices.length - 1];
- for (i = 0; i < mSelection.mVertices.length; i++) {
- if (mSelection.mVertices[i] != v) {
- vertices[j] = mSelection.mVertices[i];
- j++;
- }
- }
- mSelection.mVertices = vertices;
- updateSelectionCorners();
- }
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
-
- // Only use this method to add one vertex.
- // If you wish to add more, it would
- // propably be more efficient to create a
- // new Selection object.
- public void addToSelection(Vertex v) {
- Vertex[] vertices = new Vertex[mSelection.mVertices.length + 1];
- GraphPoint centrePoint = null;
- int i = 0;
- if (mSelection.mVertices == null) {
- centrePoint = v.getCentrePoint();
- mSelection.mVertices = new Vertex[] { v };
- mSelection.mTopLeftX = centrePoint.x;
- mSelection.mTopLeftY = centrePoint.y;
- mSelection.mBottomRightX = centrePoint.x;
- mSelection.mBottomRightY = centrePoint.y;
- }
- else {
- for (i = 0; i < mSelection.mVertices.length; i++) {
- vertices[i] = mSelection.mVertices[i];
- }
- vertices[mSelection.mVertices.length] = v;
- mSelection.mVertices = vertices;
- updateSelectionCorners();
- }
- setChanged();
- notifyObservers(mSelectionChangedEvent);
- }
public void resetVertexOutlines() {
Vertex[] vertices = getVertices();
diff --git a/src/main/java/com/c2kernel/graph/model/GraphModelManager.java b/src/main/java/com/c2kernel/graph/model/GraphModelManager.java index 68d47e0..f639d07 100644 --- a/src/main/java/com/c2kernel/graph/model/GraphModelManager.java +++ b/src/main/java/com/c2kernel/graph/model/GraphModelManager.java @@ -18,10 +18,10 @@ public class GraphModelManager extends Observable private EdgeFactory mEdgeFactory;
private VertexFactory mVertexFactory;
private VertexOutlineCreator mVertexOutlineCreator;
- private EntireModelChangedEvent mEntireModelChangedEvent = new EntireModelChangedEvent();
- private ForcedNotifyEvent mForcedNotifyEvent = new ForcedNotifyEvent();
- private Stack<GraphModel> mParentModels = new Stack<GraphModel>();
- private ArrayList<Integer> mParentIds = new ArrayList<Integer>();
+ private final EntireModelChangedEvent mEntireModelChangedEvent = new EntireModelChangedEvent();
+ private final ForcedNotifyEvent mForcedNotifyEvent = new ForcedNotifyEvent();
+ private final Stack<GraphModel> mParentModels = new Stack<GraphModel>();
+ private final ArrayList<Integer> mParentIds = new ArrayList<Integer>();
private boolean mEditable = true;
// Calling this constructor does not create a vertex outline creator
@@ -60,7 +60,6 @@ public class GraphModelManager extends Observable public void setModel(GraphModel newModel) {
// reset transient data
- newModel.mSelection = new Selection(null, null, 0, 0, 0, 0);
newModel.mNewEdgeOriginVertex = null;
newModel.mNewEdgeEndPoint = null;
@@ -74,7 +73,6 @@ public class GraphModelManager extends Observable mGraphModel = newModel;
// notify
- setChanged();
notifyObservers(mEntireModelChangedEvent);
}
@@ -99,7 +97,6 @@ public class GraphModelManager extends Observable public void forceNotify()
{
- setChanged();
notifyObservers(mForcedNotifyEvent);
}
@@ -122,12 +119,8 @@ public class GraphModelManager extends Observable mGraphModel.setVertexOutlineCreator(newVertexOutlineCreator);
}
- @Override
- protected void setChanged() {
- super.setChanged();
- }
-
- protected void notifyObservers(GraphModelEvent ev) {
+ public void notifyObservers(GraphModelEvent ev) {
+ setChanged();
super.notifyObservers(ev);
}
diff --git a/src/main/java/com/c2kernel/graph/model/GraphableVertex.java b/src/main/java/com/c2kernel/graph/model/GraphableVertex.java index fc04743..cb4724d 100644 --- a/src/main/java/com/c2kernel/graph/model/GraphableVertex.java +++ b/src/main/java/com/c2kernel/graph/model/GraphableVertex.java @@ -3,7 +3,7 @@ package com.c2kernel.graph.model; * @version $Revision: 1.24 $ $Date: 2005/10/05 07:39:37 $
* @author $Author: abranson $
*/
-import java.awt.Point;
+
import com.c2kernel.utils.CastorHashMap;
import com.c2kernel.utils.KeyValuePair;
@@ -177,10 +177,7 @@ public abstract class GraphableVertex extends Vertex {
mIsComposite = isComposite;
}
- public void addChild(GraphableVertex graphableVertex, Point p)
- {
- addChild(graphableVertex, new GraphPoint(p.x, p.y));
- }
+
public void addChild(GraphableVertex graphableVertex, GraphPoint g)
{
getChildGraphModel().addVertexAndCreateId(graphableVertex, g);
diff --git a/src/main/java/com/c2kernel/graph/model/Selection.java b/src/main/java/com/c2kernel/graph/model/Selection.java deleted file mode 100644 index dcc7b46..0000000 --- a/src/main/java/com/c2kernel/graph/model/Selection.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.c2kernel.graph.model;
-
-import java.io.Serializable;
-
-
-
-public class Selection implements Serializable
-{
- // Either a single edge can be selected or
- // one or more vertices can be selected.
- // It is impossible to select an edge and a
- // vertex at the same time.
- public DirectedEdge mEdge = null;
- public Vertex[] mVertices = null;
- public int mTopLeftX = 0;
- public int mTopLeftY = 0;
- public int mBottomRightX = 0;
- public int mBottomRightY = 0;
-
-
- public Selection(DirectedEdge edge,
- Vertex[] vertices,
- int topLeftX,
- int topLeftY,
- int bottomRightX,
- int bottomRightY)
- {
- mEdge = edge;
- mVertices = vertices;
- mTopLeftX = topLeftX;
- mTopLeftY = topLeftY;
- mBottomRightX = bottomRightX;
- mBottomRightY = bottomRightY;
- }
-}
diff --git a/src/main/java/com/c2kernel/graph/model/VertexFactory.java b/src/main/java/com/c2kernel/graph/model/VertexFactory.java index 02681bd..069f4ff 100644 --- a/src/main/java/com/c2kernel/graph/model/VertexFactory.java +++ b/src/main/java/com/c2kernel/graph/model/VertexFactory.java @@ -1,14 +1,11 @@ package com.c2kernel.graph.model;
-import java.awt.Point;
-
-
public interface VertexFactory
{
public void create
(
GraphModelManager graphModelManager,
- Point location,
+ GraphPoint location,
TypeNameAndConstructionInfo typeNameAndConstructionInfo
) throws Exception;
diff --git a/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java b/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java index df97086..54487f4 100644 --- a/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java +++ b/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java @@ -1,6 +1,4 @@ package com.c2kernel.lifecycle;
-import java.awt.Point;
-
import com.c2kernel.common.InvalidDataException;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.graph.model.GraphModel;
@@ -83,7 +81,7 @@ public class CompositeActivityDef extends ActivityDef * @param location
* @return WfVertexDef
*/
- public WfVertexDef newChild(String Name, String Type, Point location)
+ public WfVertexDef newChild(String Name, String Type, GraphPoint location)
{
changed = true;
WfVertexDef child;
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java index 8a07d15..8d92522 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Activity.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Activity.java @@ -45,9 +45,6 @@ public class Activity extends WfVertex public boolean active = false;
/** used in verify() */
private boolean loopTested;
- //public Vector eventIds;
- /** Storage of eventIds thrown by the Activity */
- public EventStorage eventIds;
private GTimeStamp mStartDate;
private GTimeStamp mActiveDate;
private String mType;
@@ -58,7 +55,6 @@ public class Activity extends WfVertex setProperties(new WfCastorHashMap());
mErrors = new Vector<String>(0, 1);
machine = new StateMachine(this);
- eventIds = new EventStorage();
mStartDate = new GTimeStamp();
mActiveDate = new GTimeStamp();
DateUtility.setToNow(mActiveDate);
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/CompositeActivity.java b/src/main/java/com/c2kernel/lifecycle/instance/CompositeActivity.java index 74f71ba..0928c83 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/CompositeActivity.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/CompositeActivity.java @@ -1,6 +1,5 @@ package com.c2kernel.lifecycle.instance;
-import java.awt.Point;
import java.util.ArrayList;
import java.util.Vector;
@@ -78,7 +77,7 @@ public class CompositeActivity extends Activity * if true, the activity Waiting will be one of the first
* launched by the parent activity
*/
- public void initChild(Activity act, boolean first, Point point)
+ public void initChild(Activity act, boolean first, GraphPoint point)
{
this.addChild(act, new GraphPoint(point.x, point.y));
if (first)
@@ -96,7 +95,7 @@ public class CompositeActivity extends Activity * @param point
* @return WfVertex
*/
- public WfVertex newExistingChild(Activity child, String Name, Point point)
+ public WfVertex newExistingChild(Activity child, String Name, GraphPoint point)
{
child.setName(Name);
addChild(child, new GraphPoint(point.x, point.y));
@@ -111,7 +110,7 @@ public class CompositeActivity extends Activity * @param point
* @return WfVertex
*/
- public WfVertex newChild(String Name, String Type, Point point)
+ public WfVertex newChild(String Name, String Type, GraphPoint point)
{
WfVertex v = newChild(Type, point);
v.setName(Name);
@@ -125,7 +124,7 @@ public class CompositeActivity extends Activity * @param point
* @return WfVertex
*/
- public WfVertex newChild(String vertexTypeId, Point point)
+ public WfVertex newChild(String vertexTypeId, GraphPoint point)
{
WfVertex wfVertex = null;
if (vertexTypeId.equals("Atomic"))
@@ -168,7 +167,7 @@ public class CompositeActivity extends Activity * @return CompositeActivity Create an initialize a composite Activity
* attached to the current activity
*/
- public CompositeActivity newCompChild(String id, boolean first, Point point)
+ public CompositeActivity newCompChild(String id, boolean first, GraphPoint point)
{
CompositeActivity act = new CompositeActivity();
initChild(act, first, point);
@@ -186,7 +185,7 @@ public class CompositeActivity extends Activity * current activity
*
*/
- public Activity newAtomChild(String id, boolean first, Point point)
+ public Activity newAtomChild(String id, boolean first, GraphPoint point)
{
Activity act = new Activity();
initChild(act, first, point);
@@ -201,7 +200,7 @@ public class CompositeActivity extends Activity * @param point
* @return Split
*/
- public Split newSplitChild(String Type, Point point)
+ public Split newSplitChild(String Type, GraphPoint point)
{
Split split;
if (Type.equals("Or"))
@@ -227,7 +226,7 @@ public class CompositeActivity extends Activity * @param point
* @return Join
*/
- public Join newJoinChild(Point point)
+ public Join newJoinChild(GraphPoint point)
{
Join join = new Join();
join.getProperties().put("Type", "Join");
@@ -235,7 +234,7 @@ public class CompositeActivity extends Activity return join;
}
- public Join newRouteChild(Point point)
+ public Join newRouteChild(GraphPoint point)
{
Join join = new Join();
join.getProperties().put("Type", "Route");
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/EventList.java b/src/main/java/com/c2kernel/lifecycle/instance/EventList.java deleted file mode 100644 index be255fb..0000000 --- a/src/main/java/com/c2kernel/lifecycle/instance/EventList.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.c2kernel.lifecycle.instance;
-
-import java.io.Serializable;
-
-/**
- * @version $Revision: 1.9 $ $Date: 2005/06/08 19:47:59 $
- * @author $Author: abranson $
- */
-public class EventList implements Serializable {
- private int[] dummy = new int[0];
- public int transition=-1;
-
- public int[] getNums() {
- return dummy;
- }
-
- public void setNums(int[] nums) {
- }
-}
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/EventStorage.java b/src/main/java/com/c2kernel/lifecycle/instance/EventStorage.java deleted file mode 100644 index 40cffaf..0000000 --- a/src/main/java/com/c2kernel/lifecycle/instance/EventStorage.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.c2kernel.lifecycle.instance;
-import java.io.Serializable;
-import java.util.Hashtable;
-
-/**
- * @version $Revision: 1.15 $ $Date: 2005/06/08 19:48:00 $
- * @author $Author: abranson $
- */
-public class EventStorage implements Serializable
-{
- private Hashtable<?, ?> mLists;
- private EventList[] dummy = new EventList[0];
- public Integer lastTransitionStored;
-
- public EventList[] getLists()
- {
- return dummy;
- }
-
- public void setLists(EventList[] lists)
- {
- }
-
-}
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/ParserWF.java b/src/main/java/com/c2kernel/lifecycle/instance/ParserWF.java index 02a0c6d..1e52e6b 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/ParserWF.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/ParserWF.java @@ -1,9 +1,9 @@ package com.c2kernel.lifecycle.instance;
-import java.awt.Point;
import java.io.IOException;
import java.util.Vector;
+import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.utils.CastorHashMap;
import com.c2kernel.utils.Logger;
@@ -53,7 +53,7 @@ public class ParserWF {
if (nexts.elementAt(j)[0].equals(nexts.elementAt(k)[0]))
{
- int tmp = act.newSplitChild("And", new Point(0, 0)).getID();
+ int tmp = act.newSplitChild("And", new GraphPoint(0, 0)).getID();
((WfVertex) act.search(nexts.elementAt(k)[0])).addNext(act.search(tmp));
((Split) act.search(tmp)).addNext((WfVertex) act.search(nexts.elementAt(k)[1]));
((Split) act.search(tmp)).addNext((WfVertex) act.search(nexts.elementAt(j)[1]));
@@ -73,7 +73,7 @@ public class ParserWF {
if (nexts.elementAt(j)[1].equals(nexts.elementAt(k)[1]))
{
- int tmp = act.newJoinChild(new Point(0, 0)).getID();
+ int tmp = act.newJoinChild(new GraphPoint(0, 0)).getID();
((WfVertex) act.search(nexts.elementAt(j)[0])).addNext(act.search(tmp));
((WfVertex) act.search(nexts.elementAt(k)[0])).addNext(act.search(tmp));
((Join) act.search(tmp)).addNext(nexts.elementAt(j)[1]);
@@ -122,7 +122,7 @@ public class ParserWF Logger.msg(7, "<STEP");
if (!step[14].equals("done"))
{
- act = parent.newCompChild(step[0], step[12].startsWith("true"), new Point(0, 0));
+ act = parent.newCompChild(step[0], step[12].startsWith("true"), new GraphPoint(0, 0));
}
readStep((CompositeActivity) act);
step[14] = "done";
@@ -319,7 +319,7 @@ public class ParserWF }
i += 7;
if (!step[14].equals("done"))
- act = parent.newAtomChild(step[0], step[12].startsWith("true"), new Point(0, 0));
+ act = parent.newAtomChild(step[0], step[12].startsWith("true"), new GraphPoint(0, 0));
Logger.msg(7, "Step Created");
try
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java b/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java index 1d12ee6..c51d6fe 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/Workflow.java @@ -1,5 +1,4 @@ package com.c2kernel.lifecycle.instance;
-import java.awt.Point;
import java.util.ArrayList;
import com.c2kernel.common.AccessRightsException;
@@ -50,7 +49,7 @@ public class Workflow extends CompositeActivity implements C2KLocalObject public Workflow(CompositeActivity domain) {
this();
domain.setName("domain");
- initChild(domain, true, new Point(150, 100));
+ initChild(domain, true, new GraphPoint(150, 100));
PredefinedStepContainer act = new PredefinedStepContainer();
addChild(act, new GraphPoint(300, 100));
}
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java index f70c053..8f88602 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java @@ -1,11 +1,10 @@ package com.c2kernel.lifecycle.instance.predefined;
//Java
-import java.awt.Point;
-
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidDataException;
import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.lifecycle.CompositeActivityDef;
import com.c2kernel.lifecycle.instance.CompositeActivity;
import com.c2kernel.lifecycle.instance.Workflow;
@@ -38,7 +37,7 @@ public class AddStepsFromDescription extends PredefinedStep lifeCycle.getChildGraphModel().removeVertex(lifeCycle.search("workflow/domain"));
CompositeActivityDef actDef = (CompositeActivityDef) CastorXMLUtility.unmarshall(getDataList(requestData)[0]);
CompositeActivity domain = (CompositeActivity)actDef.instantiate();
- lifeCycle.initChild(domain, true, new Point(150, 100));
+ lifeCycle.initChild(domain, true, new GraphPoint(150, 100));
domain.setName("domain");
domain.setType(actDef.getName());
lifeCycle.run(agent);
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/ReplaceDomainWorkflow.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/ReplaceDomainWorkflow.java index ba3e6c6..a249d51 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/ReplaceDomainWorkflow.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/ReplaceDomainWorkflow.java @@ -1,11 +1,10 @@ package com.c2kernel.lifecycle.instance.predefined;
//Java
-import java.awt.Point;
-
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidDataException;
import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.graph.model.GraphPoint;
import com.c2kernel.lifecycle.instance.CompositeActivity;
import com.c2kernel.lifecycle.instance.Workflow;
import com.c2kernel.lookup.AgentPath;
@@ -36,7 +35,7 @@ public class ReplaceDomainWorkflow extends PredefinedStep Logger.msg(8, "ReplaceDomainWorkflow::request() - data:" + getDataList(requestData)[0]);
lifeCycle.getChildGraphModel().removeVertex(lifeCycle.search("workflow/domain"));
CompositeActivity domain = (CompositeActivity) CastorXMLUtility.unmarshall(getDataList(requestData)[0]);
- lifeCycle.initChild(domain, true, new Point(150, 100));
+ lifeCycle.initChild(domain, true, new GraphPoint(150, 100));
Gateway.getStorage().put(getItemEntityPath().getSysKey(), lifeCycle, null);
Logger.msg(1, "ReplaceDomainWorkflow::request() - DONE.");
sendEventStoreOutcome(transitionID, requestData, agent);
diff --git a/src/main/java/com/c2kernel/utils/Resource.java b/src/main/java/com/c2kernel/utils/Resource.java index 10228da..3065f6a 100644 --- a/src/main/java/com/c2kernel/utils/Resource.java +++ b/src/main/java/com/c2kernel/utils/Resource.java @@ -6,8 +6,6 @@ import java.net.URL; import java.util.HashMap;
import java.util.Hashtable;
-import javax.swing.ImageIcon;
-
import com.c2kernel.common.ObjectNotFoundException;
/**************************************************************************
@@ -17,10 +15,8 @@ import com.c2kernel.common.ObjectNotFoundException; **************************************************************************/
public class Resource {
static private Hashtable<String, String> txtCache = new Hashtable<String, String>();
- static private Hashtable<String, ImageIcon> imgCache = new Hashtable<String, ImageIcon>();
static private URL baseURL = getURLorResURL("com/c2kernel/utils/resources/");
static private HashMap<String, URL> moduleBaseURLs = new HashMap<String, URL>();
- static public final ImageIcon nullImg = new ImageIcon(new byte[] { 0 });
public static URL getKernelBaseURL() {
return baseURL;
@@ -105,55 +101,6 @@ public class Resource { throw new ObjectNotFoundException(e.getMessage(),null);
}
}
- /**
- * Gets an image from the resource directories
- *
- * @param resName - filename after resources/images
- * @return
- */
- static public ImageIcon findImage(String resName) {
- try {
- for (String ns : getModuleBaseURLs().keySet()) {
- try {
- return getImage(ns, resName);
- } catch (ObjectNotFoundException ex) { }
- }
- return getImage(null, resName);
- } catch (ObjectNotFoundException ex) {
- Logger.warning("Image '"+resName+"' not found. Using null icon");
- return nullImg;
- }
- }
-
- static public ImageIcon getImage(String ns, String resName) throws ObjectNotFoundException {
- if (resName == null)
- return nullImg;
-
- if (imgCache.containsKey(ns+'/'+resName)) {
- return imgCache.get(ns+'/'+resName);
- }
-
- URL imgLocation = null;
- if (ns == null)
- try {
- imgLocation = getKernelResourceURL("images/"+resName);
- } catch (MalformedURLException ex) { }
- else
- try {
- imgLocation = getModuleResourceURL(ns, "images/"+resName);
- } catch (MalformedURLException ex) { }
-
- if (imgLocation!= null) {
- ImageIcon newImg = new ImageIcon(imgLocation);
-
- if (newImg.getIconHeight() > -1) {
- imgCache.put(ns+'/'+resName, newImg);
- Logger.msg(0, "Loaded "+resName+" "+newImg.getIconWidth()+"x"+newImg.getIconHeight());
- return newImg;
- }
- }
- throw new ObjectNotFoundException();
- }
static public String getKernelVersion() {
try {
diff --git a/src/main/resources/boot/CA/ManageCompositeActDef.xml b/src/main/resources/boot/CA/ManageCompositeActDef.xml index 9a48f1c..15a60b5 100644 --- a/src/main/resources/boot/CA/ManageCompositeActDef.xml +++ b/src/main/resources/boot/CA/ManageCompositeActDef.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="ManageCompositeActDef" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="13" NextId="26">
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="13" NextId="26">
<LoopDef ID="15" Name="" Height="24" Width="60" IsLayoutable="true" IsComposite="false" isNext="0">
<CentrePoint x="358" y="360"/>
<OutlinePoint x="328" y="348"/>
diff --git a/src/main/resources/boot/CA/ManageElementaryActDef.xml b/src/main/resources/boot/CA/ManageElementaryActDef.xml index 1aa3840..90ffaf8 100644 --- a/src/main/resources/boot/CA/ManageElementaryActDef.xml +++ b/src/main/resources/boot/CA/ManageElementaryActDef.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="ManageElementaryActDef" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="13" NextId="26">
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="13" NextId="26">
<LoopDef ID="15" Name="" Height="24" Width="60" IsLayoutable="true" IsComposite="false" isNext="0">
<CentrePoint x="358" y="360"/>
<OutlinePoint x="328" y="348"/>
diff --git a/src/main/resources/boot/CA/ManageSchema.xml b/src/main/resources/boot/CA/ManageSchema.xml index da501e4..d25ce70 100644 --- a/src/main/resources/boot/CA/ManageSchema.xml +++ b/src/main/resources/boot/CA/ManageSchema.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="ManageSchema" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="13" NextId="22">
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="13" NextId="22">
<LoopDef ID="15" Name="" Height="24" Width="60" IsLayoutable="true" IsComposite="false" isNext="0">
<CentrePoint x="358" y="360"/>
<OutlinePoint x="328" y="348"/>
diff --git a/src/main/resources/boot/CA/ManageScript.xml b/src/main/resources/boot/CA/ManageScript.xml index f8100b0..c629c8e 100644 --- a/src/main/resources/boot/CA/ManageScript.xml +++ b/src/main/resources/boot/CA/ManageScript.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="ManageScript" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="11" NextId="27">
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="11" NextId="27">
<LoopDef ID="15" Name="" Height="24" Width="60" IsLayoutable="true" IsComposite="false" isNext="0">
<CentrePoint x="425" y="291"/>
<OutlinePoint x="395" y="279"/>
diff --git a/src/main/resources/boot/CA/NoWorkflow.xml b/src/main/resources/boot/CA/NoWorkflow.xml index c0e2d6f..e49b1cc 100644 --- a/src/main/resources/boot/CA/NoWorkflow.xml +++ b/src/main/resources/boot/CA/NoWorkflow.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="NoWorkflow" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="-1" NextId="0"/>
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="-1" NextId="0"/>
</childrenGraphModel>
<Properties>
<KeyValuePair Key="Autostart" Boolean="true"/>
diff --git a/src/main/resources/boot/CA/ServerItemWorkflow.xml b/src/main/resources/boot/CA/ServerItemWorkflow.xml index e480b07..7d8531d 100644 --- a/src/main/resources/boot/CA/ServerItemWorkflow.xml +++ b/src/main/resources/boot/CA/ServerItemWorkflow.xml @@ -1,6 +1,6 @@ <CompositeActivityDef ID="-1" Name="ServerItemWorkflow" Height="0" Width="0" IsLayoutable="false" IsComposite="true">
<childrenGraphModel>
- <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.gui.model.WfVertexDefOutlineCreator" StartVertexId="4" NextId="21">
+ <GraphModelCastorData ClassNameOfVertexOutlineCreator="com.c2kernel.lifecycle.WfVertexDefOutlineCreator" StartVertexId="4" NextId="21">
<JoinDef ID="9" Name="" Height="24" Width="60" IsLayoutable="true" IsComposite="false">
<CentrePoint x="244" y="378"/>
<OutlinePoint x="214" y="366"/>
diff --git a/src/main/resources/mapFiles/LifeCycleMap.xml b/src/main/resources/mapFiles/LifeCycleMap.xml index 8291dee..ba75864 100644 --- a/src/main/resources/mapFiles/LifeCycleMap.xml +++ b/src/main/resources/mapFiles/LifeCycleMap.xml @@ -54,9 +54,6 @@ <field name="type" type="string" direct="false">
<bind-xml name="Type" node="attribute"/>
</field>
- <field name="eventIds" type="com.c2kernel.lifecycle.instance.EventStorage" direct="true">
- <bind-xml name="eventIds" node="element"/>
- </field>
<field name="startDate" type="com.c2kernel.common.GTimeStamp" direct="false">
<bind-xml name="startDate" node="element"/>
</field>
@@ -100,22 +97,4 @@ <class name="com.c2kernel.lifecycle.instance.predefined.ServerPredefinedStepContainer" extends="com.c2kernel.lifecycle.instance.predefined.PredefinedStepContainer">
<map-to xml="ServerPredefinedStepContainer"/>
</class>
- <class name="com.c2kernel.lifecycle.instance.EventStorage">
- <map-to xml="EventStorage"/>
- <field name="lastTransitionStored" type="integer" direct="true">
- <bind-xml name="lastTransitionStored" node="attribute"/>
- </field>
- <field name="lists" type="com.c2kernel.lifecycle.instance.EventList" collection="array" direct="false">
- <bind-xml name="lists" node="element"/>
- </field>
- </class>
- <class name="com.c2kernel.lifecycle.instance.EventList">
- <map-to xml="EventList"/>
- <field name="transition" type="integer" direct="true">
- <bind-xml name="transition" node="attribute"/>
- </field>
- <field name="nums" type="integer" collection="array" direct="false">
- <bind-xml name="nums" node="element"/>
- </field>
- </class>
</mapping>
|
