summaryrefslogtreecommitdiff
path: root/src/main/java/org/cristalise/gui/graph/controller/Selection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/cristalise/gui/graph/controller/Selection.java')
-rw-r--r--src/main/java/org/cristalise/gui/graph/controller/Selection.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/java/org/cristalise/gui/graph/controller/Selection.java b/src/main/java/org/cristalise/gui/graph/controller/Selection.java
new file mode 100644
index 0000000..cf634a7
--- /dev/null
+++ b/src/main/java/org/cristalise/gui/graph/controller/Selection.java
@@ -0,0 +1,36 @@
+package org.cristalise.gui.graph.controller;
+
+import org.cristalise.kernel.graph.model.DirectedEdge;
+import org.cristalise.kernel.graph.model.Vertex;
+
+
+
+public class Selection
+{
+ // 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;
+ }
+}