1
|
/*******************************************************************************
|
2
|
* Copyright 2006, CHISEL Group, University of Victoria, Victoria, BC, Canada.
|
3
|
* All rights reserved. This program and the accompanying materials are made
|
4
|
* available under the terms of the Eclipse Public License v1.0 which
|
5
|
* accompanies this distribution, and is available at
|
6
|
* http://www.eclipse.org/legal/epl-v10.html
|
7
|
*
|
8
|
* Contributors: The Chisel Group, University of Victoria
|
9
|
*******************************************************************************/
|
10
|
package org.eclipse.zest.layouts.dataStructures;
|
11
|
|
12
|
import org.eclipse.zest.layouts.LayoutBendPoint;
|
13
|
|
14
|
/**
|
15
|
* Implements a single bend point in a graph relationship.
|
16
|
*
|
17
|
* @author Ian Bull
|
18
|
* @author Chris Bennett
|
19
|
*/
|
20
|
public class BendPoint extends DisplayIndependentPoint implements LayoutBendPoint {
|
21
|
|
22
|
private boolean isControlPoint = false; // is this a control point (for use in curves)
|
23
|
|
24
|
public BendPoint(double x, double y) {
|
25
|
super(x, y);
|
26
|
}
|
27
|
|
28
|
public BendPoint(double x, double y, boolean isControlPoint) {
|
29
|
this(x, y);
|
30
|
this.isControlPoint = isControlPoint;
|
31
|
}
|
32
|
|
33
|
public double getX() {
|
34
|
return x;
|
35
|
}
|
36
|
|
37
|
public double getY() {
|
38
|
return y;
|
39
|
}
|
40
|
|
41
|
public void setX(double x) {
|
42
|
this.x = x;
|
43
|
}
|
44
|
|
45
|
public void setY(double y) {
|
46
|
this.y = y;
|
47
|
}
|
48
|
|
49
|
public boolean getIsControlPoint() {
|
50
|
return isControlPoint;
|
51
|
}
|
52
|
|
53
|
}
|