summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/gui/graph/controller/Selection.java
blob: 3700e445a2245ad28dfece270de5d3b60f8a7fc1 (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 com.c2kernel.gui.graph.controller;

import com.c2kernel.graph.model.DirectedEdge;
import com.c2kernel.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;
    }
}