Mercurial > hg > truffle
annotate visualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java @ 7302:f9f40467383e
Fixes for new Word type
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Fri, 04 Jan 2013 15:08:18 -0800 |
parents | 24d9f3310ed6 |
children |
rev | line source |
---|---|
4512
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 * |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 */ |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 package com.sun.hotspot.igv.graph; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 import com.sun.hotspot.igv.data.Source; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 import com.sun.hotspot.igv.layout.Link; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 import com.sun.hotspot.igv.layout.Port; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 import java.awt.Color; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 import java.awt.Point; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 import java.util.ArrayList; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 import java.util.List; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 /** |
4573
24d9f3310ed6
Visualizer: Fix edge tooltip showing wrong node ids. GraalEdgeColorFilter: Don't change style of dashed lines.
Andreas Woess <andreas.woess@jku.at>
parents:
4512
diff
changeset
|
35 * |
4512
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 * @author Thomas Wuerthinger |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 */ |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 public class Connection implements Source.Provider, Link { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 public boolean isVIP() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 return style == ConnectionStyle.BOLD; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 public enum ConnectionStyle { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 NORMAL, |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 DASHED, |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 BOLD |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 private InputSlot inputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 private OutputSlot outputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 private Source source; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 private Color color; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 private ConnectionStyle style; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 private List<Point> controlPoints; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 private String label; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 protected Connection(InputSlot inputSlot, OutputSlot outputSlot, String label) { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 this.inputSlot = inputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 this.outputSlot = outputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 this.label = label; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 this.inputSlot.connections.add(this); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 this.outputSlot.connections.add(this); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 controlPoints = new ArrayList<>(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 Figure sourceFigure = this.outputSlot.getFigure(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 Figure destFigure = this.inputSlot.getFigure(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 sourceFigure.addSuccessor(destFigure); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 destFigure.addPredecessor(sourceFigure); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 source = new Source(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 this.color = Color.BLACK; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 this.style = ConnectionStyle.NORMAL; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 public InputSlot getInputSlot() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 return inputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 public OutputSlot getOutputSlot() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 return outputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
84 public Color getColor() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
85 return color; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 public ConnectionStyle getStyle() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 return style; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 public void setColor(Color c) { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 color = c; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
95 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 public void setStyle(ConnectionStyle s) { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 style = s; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 public Source getSource() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 return source; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 public String getLabel() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 return label; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 public void remove() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 inputSlot.getFigure().removePredecessor(outputSlot.getFigure()); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 inputSlot.connections.remove(this); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 outputSlot.getFigure().removeSuccessor(inputSlot.getFigure()); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 outputSlot.connections.remove(this); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 } |
4573
24d9f3310ed6
Visualizer: Fix edge tooltip showing wrong node ids. GraalEdgeColorFilter: Don't change style of dashed lines.
Andreas Woess <andreas.woess@jku.at>
parents:
4512
diff
changeset
|
115 |
4512
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 public String getToolTipText() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 StringBuilder builder = new StringBuilder(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 if (label != null) { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 builder.append(label).append(": from "); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 } else { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 builder.append("From "); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 } |
4573
24d9f3310ed6
Visualizer: Fix edge tooltip showing wrong node ids. GraalEdgeColorFilter: Don't change style of dashed lines.
Andreas Woess <andreas.woess@jku.at>
parents:
4512
diff
changeset
|
123 builder.append(getOutputSlot().getFigure().getSource().getSourceNodes().get(0).getId()); |
4512
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 builder.append(" to "); |
4573
24d9f3310ed6
Visualizer: Fix edge tooltip showing wrong node ids. GraalEdgeColorFilter: Don't change style of dashed lines.
Andreas Woess <andreas.woess@jku.at>
parents:
4512
diff
changeset
|
125 builder.append(getInputSlot().getFigure().getSource().getSourceNodes().get(0).getId()); |
4512
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 return builder.toString(); |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
127 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 public String toString() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 return "Connection('" + label + "', " + getFrom().getVertex() + " to " + getTo().getVertex() + ")"; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
133 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 public Port getFrom() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
136 return outputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
137 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
138 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
139 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 public Port getTo() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
141 return inputSlot; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
142 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
143 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
144 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
145 public List<Point> getControlPoints() { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
146 return controlPoints; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
147 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
149 @Override |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
150 public void setControlPoints(List<Point> list) { |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
151 controlPoints = list; |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
152 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
153 } |
015fb895586b
Moved visualizer to new directory.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
154 |