MCPcopy Create free account
hub / github.com/Nurtak/ObjectGraphVisualization / Arrow

Class Arrow

src/ch/hsr/ogv/view/Arrow.java:24–561  ·  view source on GitHub ↗

@author Simon Gwerder, Adrian Rieser @version OGV 3.1, May 2015

Source from the content-addressed store, hash-verified

22 *
23 */
24public class Arrow extends Group implements Selectable {
25
26 protected static final int INIT_WIDTH = 2;
27 protected static final int SELECTION_HELPER_WIDTH = 20;
28 protected double width = INIT_WIDTH;
29 protected static final Color SELECTION_COLOR = Color.DODGERBLUE;
30 protected static final double EDGE_SPACING = 3;
31 protected static final double LABEL_SPACING = 30;
32 protected double startEndDistance;
33 protected double rotateYAngle;
34 protected double rotateXAngle;
35
36 protected int arrowNumber = 1;
37 protected int totalArrowNumber = 1;
38
39 protected Point3D startPoint;
40 protected Point3D endPoint;
41
42 protected ArrowEdge arrowStart;
43 protected ArrowEdge arrowEnd;
44
45 protected ArrowLabel labelStartRight; // start multiplicity
46 protected ArrowLabel labelStartLeft; // start role
47 protected ArrowLabel labelEndRight; // end multiplicity
48 protected ArrowLabel labelEndLeft; // end role
49
50 protected RelationType type = RelationType.BIDIRECTED_ASSOCIATION;
51
52 protected Box line;
53
54 public static final Color DEFAULT_COLOR = Color.BLACK;
55 protected Color color = DEFAULT_COLOR;
56 protected ArrowSelection selection = null;
57 protected List<Box> lineSelectionHelpers = new ArrayList<Box>();
58 protected Box startSelectionHelper;
59 protected Box endSelectionHelper;
60 private boolean isSelected = false;
61
62 public Arrow(Point3D startPoint, Point3D endPoint, RelationType type) {
63 setPoints(startPoint, endPoint);
64 this.type = type;
65 buildArrow();
66 drawArrow();
67 }
68
69 public Arrow(PaneBox startBox, Point3D endPoint, RelationType type) {
70 setPoints(startBox, endPoint);
71 this.type = type;
72 buildArrow();
73 drawArrow();
74 }
75
76 public Arrow(Point3D startPoint, PaneBox endBox, RelationType type) {
77 setPoints(startPoint, endBox);
78 this.type = type;
79 buildArrow();
80 drawArrow();
81 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected