summaryrefslogtreecommitdiff
path: root/src/main/java/org/cristalise/gui/graph/controller/Selection.java
blob: cf634a76c577e21e266c57d55170a07a2aa44caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
    }
}