Merge lp:~yrke/tapaal/tapaal-fix1827039-constantHightlight into lp:tapaal
- tapaal-fix1827039-constantHightlight
- Merge into trunk
Proposed by
Kenneth Yrke Jørgensen
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~yrke/tapaal/tapaal-fix1827039-constantHightlight | ||||
Merge into: | lp:tapaal | ||||
Diff against target: |
358 lines (+64/-44) 9 files modified
src/pipe/gui/graphicElements/Arc.java (+17/-16) src/pipe/gui/graphicElements/PetriNetObject.java (+12/-1) src/pipe/gui/graphicElements/Place.java (+2/-2) src/pipe/gui/graphicElements/PlaceTransitionObject.java (+4/-0) src/pipe/gui/graphicElements/Transition.java (+2/-2) src/pipe/gui/graphicElements/tapn/TimedInhibitorArcComponent.java (+4/-4) src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java (+11/-9) src/pipe/gui/graphicElements/tapn/TimedOutputArcComponent.java (+2/-2) src/pipe/gui/graphicElements/tapn/TimedTransportArcComponent.java (+10/-8) |
||||
To merge this branch: | bzr merge lp:~yrke/tapaal/tapaal-fix1827039-constantHightlight | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
TAPAAL Reviewers | Pending | ||
Review via email: mp+367175@code.launchpad.net |
This proposal has been superseded by a proposal from 2019-05-09.
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/pipe/gui/graphicElements/Arc.java' | |||
2 | --- src/pipe/gui/graphicElements/Arc.java 2019-03-13 07:27:29 +0000 | |||
3 | +++ src/pipe/gui/graphicElements/Arc.java 2019-05-09 09:07:50 +0000 | |||
4 | @@ -28,7 +28,7 @@ | |||
5 | 28 | 0, -10, -7, -10 }, 4); | 28 | 0, -10, -7, -10 }, 4); |
6 | 29 | protected boolean fillHead = true; //If true, fill the shape when drawing, if false, fill with bg color. | 29 | protected boolean fillHead = true; //If true, fill the shape when drawing, if false, fill with bg color. |
7 | 30 | 30 | ||
9 | 31 | protected NameLabel label; | 31 | //protected NameLabel label; |
10 | 32 | 32 | ||
11 | 33 | private static Point2D.Double point; | 33 | private static Point2D.Double point; |
12 | 34 | 34 | ||
13 | @@ -62,7 +62,7 @@ | |||
14 | 62 | double endPositionXInput, double endPositionYInput, | 62 | double endPositionXInput, double endPositionYInput, |
15 | 63 | PlaceTransitionObject sourceInput, | 63 | PlaceTransitionObject sourceInput, |
16 | 64 | PlaceTransitionObject targetInput, int weightInput, String idInput) { | 64 | PlaceTransitionObject targetInput, int weightInput, String idInput) { |
18 | 65 | label = new NameLabel(zoom); | 65 | pnName = new NameLabel(zoom); |
19 | 66 | myPath.addPoint((float) startPositionXInput, | 66 | myPath.addPoint((float) startPositionXInput, |
20 | 67 | (float) startPositionYInput, ArcPathPoint.STRAIGHT); | 67 | (float) startPositionYInput, ArcPathPoint.STRAIGHT); |
21 | 68 | myPath.addPoint((float) endPositionXInput, (float) endPositionYInput, | 68 | myPath.addPoint((float) endPositionXInput, (float) endPositionYInput, |
22 | @@ -83,7 +83,7 @@ | |||
23 | 83 | */ | 83 | */ |
24 | 84 | public Arc(PlaceTransitionObject newSource) { | 84 | public Arc(PlaceTransitionObject newSource) { |
25 | 85 | isPrototype = true; | 85 | isPrototype = true; |
27 | 86 | label = new NameLabel(zoom); | 86 | pnName = new NameLabel(zoom); |
28 | 87 | source = newSource; | 87 | source = newSource; |
29 | 88 | myPath.addPoint(); | 88 | myPath.addPoint(); |
30 | 89 | myPath.addPoint(); | 89 | myPath.addPoint(); |
31 | @@ -96,7 +96,7 @@ | |||
32 | 96 | public Arc() { | 96 | public Arc() { |
33 | 97 | super(); | 97 | super(); |
34 | 98 | 98 | ||
36 | 99 | label = new NameLabel(zoom); | 99 | pnName = new NameLabel(zoom); |
37 | 100 | //XXX see comment in function | 100 | //XXX see comment in function |
38 | 101 | setLableHandler(); | 101 | setLableHandler(); |
39 | 102 | } | 102 | } |
40 | @@ -138,7 +138,8 @@ | |||
41 | 138 | } | 138 | } |
42 | 139 | 139 | ||
43 | 140 | public void setLabelPosition() { | 140 | public void setLabelPosition() { |
45 | 141 | label.setPosition(Grid.getModifiedX((double) (myPath.midPoint.x + Zoomer.getZoomedValue(nameOffsetX, zoom))), | 141 | |
46 | 142 | pnName.setPosition(Grid.getModifiedX((double) (myPath.midPoint.x + Zoomer.getZoomedValue(nameOffsetX, zoom))), | ||
47 | 142 | Grid.getModifiedY((double) (myPath.midPoint.y + Zoomer.getZoomedValue(nameOffsetY, zoom)))); | 143 | Grid.getModifiedY((double) (myPath.midPoint.y + Zoomer.getZoomedValue(nameOffsetY, zoom)))); |
48 | 143 | } | 144 | } |
49 | 144 | @Override | 145 | @Override |
50 | @@ -170,7 +171,7 @@ | |||
51 | 170 | 171 | ||
52 | 171 | @Override | 172 | @Override |
53 | 172 | public NameLabel getNameLabel() { | 173 | public NameLabel getNameLabel() { |
55 | 173 | return label; | 174 | return pnName; |
56 | 174 | } | 175 | } |
57 | 175 | 176 | ||
58 | 176 | /** | 177 | /** |
59 | @@ -279,10 +280,10 @@ | |||
60 | 279 | //Draw Path | 280 | //Draw Path |
61 | 280 | if (selected) { | 281 | if (selected) { |
62 | 281 | g2.setPaint(Pipe.SELECTION_LINE_COLOUR); | 282 | g2.setPaint(Pipe.SELECTION_LINE_COLOUR); |
64 | 282 | this.label.setForeground(Pipe.SELECTION_LINE_COLOUR); | 283 | //this.label.setForeground(Pipe.SELECTION_LINE_COLOUR); |
65 | 283 | } else { | 284 | } else { |
66 | 284 | g2.setPaint(Pipe.ELEMENT_LINE_COLOUR); | 285 | g2.setPaint(Pipe.ELEMENT_LINE_COLOUR); |
68 | 285 | this.label.setForeground(Pipe.ELEMENT_LINE_COLOUR); | 286 | //this.label.setForeground(Pipe.ELEMENT_LINE_COLOUR); |
69 | 286 | } | 287 | } |
70 | 287 | 288 | ||
71 | 288 | g2.setStroke(new BasicStroke(0.01f * zoom)); | 289 | g2.setStroke(new BasicStroke(0.01f * zoom)); |
72 | @@ -302,10 +303,10 @@ | |||
73 | 302 | 303 | ||
74 | 303 | if (selected) { | 304 | if (selected) { |
75 | 304 | g2.setPaint(Pipe.SELECTION_LINE_COLOUR); | 305 | g2.setPaint(Pipe.SELECTION_LINE_COLOUR); |
77 | 305 | this.label.setForeground(Pipe.SELECTION_LINE_COLOUR); | 306 | //this.label.setForeground(Pipe.SELECTION_LINE_COLOUR); |
78 | 306 | } else { | 307 | } else { |
79 | 307 | g2.setPaint(Pipe.ELEMENT_LINE_COLOUR); | 308 | g2.setPaint(Pipe.ELEMENT_LINE_COLOUR); |
81 | 308 | this.label.setForeground(Pipe.ELEMENT_LINE_COLOUR); | 309 | //this.label.setForeground(Pipe.ELEMENT_LINE_COLOUR); |
82 | 309 | } | 310 | } |
83 | 310 | 311 | ||
84 | 311 | g2.setStroke(new BasicStroke(0.8f)); | 312 | g2.setStroke(new BasicStroke(0.8f)); |
85 | @@ -350,8 +351,8 @@ | |||
86 | 350 | myPath.addPointsToGui((DrawingSurfaceImpl) getParent()); | 351 | myPath.addPointsToGui((DrawingSurfaceImpl) getParent()); |
87 | 351 | 352 | ||
88 | 352 | updateArcPosition(); | 353 | updateArcPosition(); |
91 | 353 | if (getParent() != null && label.getParent() == null) { | 354 | if (getParent() != null && pnName.getParent() == null) { |
92 | 354 | getParent().add(label); | 355 | getParent().add(pnName); |
93 | 355 | } | 356 | } |
94 | 356 | } | 357 | } |
95 | 357 | 358 | ||
96 | @@ -359,7 +360,7 @@ | |||
97 | 359 | public void delete() { | 360 | public void delete() { |
98 | 360 | if (!deleted) { | 361 | if (!deleted) { |
99 | 361 | if (getParent() != null) { | 362 | if (getParent() != null) { |
101 | 362 | getParent().remove(label); | 363 | getParent().remove(pnName); |
102 | 363 | } | 364 | } |
103 | 364 | if(source != null) source.removeFromArc(this); | 365 | if(source != null) source.removeFromArc(this); |
104 | 365 | if(target != null) target.removeToArc(this); | 366 | if(target != null) target.removeToArc(this); |
105 | @@ -388,7 +389,7 @@ | |||
106 | 388 | 389 | ||
107 | 389 | public void removeFromView() { | 390 | public void removeFromView() { |
108 | 390 | if (getParent() != null) { | 391 | if (getParent() != null) { |
110 | 391 | getParent().remove(label); | 392 | getParent().remove(pnName); |
111 | 392 | } | 393 | } |
112 | 393 | myPath.forceHidePoints(); | 394 | myPath.forceHidePoints(); |
113 | 394 | removeFromContainer(); | 395 | removeFromContainer(); |
114 | @@ -429,8 +430,8 @@ | |||
115 | 429 | zoom = percent; | 430 | zoom = percent; |
116 | 430 | this.updateArcPosition(); | 431 | this.updateArcPosition(); |
117 | 431 | this.updateOnMoveOrZoom(); | 432 | this.updateOnMoveOrZoom(); |
120 | 432 | label.zoomUpdate(percent); | 433 | pnName.zoomUpdate(percent); |
121 | 433 | label.updateSize(); | 434 | pnName.updateSize(); |
122 | 434 | } | 435 | } |
123 | 435 | 436 | ||
124 | 436 | public void setZoom(int percent) { | 437 | public void setZoom(int percent) { |
125 | 437 | 438 | ||
126 | === modified file 'src/pipe/gui/graphicElements/PetriNetObject.java' | |||
127 | --- src/pipe/gui/graphicElements/PetriNetObject.java 2019-03-13 07:27:29 +0000 | |||
128 | +++ src/pipe/gui/graphicElements/PetriNetObject.java 2019-05-09 09:07:50 +0000 | |||
129 | @@ -219,17 +219,28 @@ | |||
130 | 219 | } | 219 | } |
131 | 220 | 220 | ||
132 | 221 | public void select(boolean shouldRepaint) { | 221 | public void select(boolean shouldRepaint) { |
134 | 222 | if (selectable && !selected) { | 222 | if (selectable && !selected) { |
135 | 223 | selected = true; | 223 | selected = true; |
136 | 224 | |||
137 | 225 | if (pnName != null) { | ||
138 | 226 | pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); | ||
139 | 227 | } | ||
140 | 228 | |||
141 | 224 | if (shouldRepaint) { | 229 | if (shouldRepaint) { |
142 | 225 | repaint(); | 230 | repaint(); |
143 | 226 | } | 231 | } |
144 | 227 | } | 232 | } |
145 | 233 | |||
146 | 228 | } | 234 | } |
147 | 229 | 235 | ||
148 | 230 | public void deselect() { | 236 | public void deselect() { |
149 | 231 | if (selected) { | 237 | if (selected) { |
150 | 232 | selected = false; | 238 | selected = false; |
151 | 239 | |||
152 | 240 | if (pnName != null) { | ||
153 | 241 | pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR); | ||
154 | 242 | } | ||
155 | 243 | |||
156 | 233 | repaint(); | 244 | repaint(); |
157 | 234 | } | 245 | } |
158 | 235 | } | 246 | } |
159 | 236 | 247 | ||
160 | === modified file 'src/pipe/gui/graphicElements/Place.java' | |||
161 | --- src/pipe/gui/graphicElements/Place.java 2019-03-13 08:30:09 +0000 | |||
162 | +++ src/pipe/gui/graphicElements/Place.java 2019-05-09 09:07:50 +0000 | |||
163 | @@ -68,10 +68,10 @@ | |||
164 | 68 | 68 | ||
165 | 69 | if (selected) { | 69 | if (selected) { |
166 | 70 | g2.setColor(Pipe.SELECTION_FILL_COLOUR); | 70 | g2.setColor(Pipe.SELECTION_FILL_COLOUR); |
168 | 71 | pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); | 71 | //pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); |
169 | 72 | } else { | 72 | } else { |
170 | 73 | g2.setColor(Pipe.ELEMENT_FILL_COLOUR); | 73 | g2.setColor(Pipe.ELEMENT_FILL_COLOUR); |
172 | 74 | pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR); | 74 | //pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR); |
173 | 75 | } | 75 | } |
174 | 76 | g2.fill(placeEllipse); | 76 | g2.fill(placeEllipse); |
175 | 77 | 77 | ||
176 | 78 | 78 | ||
177 | === modified file 'src/pipe/gui/graphicElements/PlaceTransitionObject.java' | |||
178 | --- src/pipe/gui/graphicElements/PlaceTransitionObject.java 2018-10-21 18:14:13 +0000 | |||
179 | +++ src/pipe/gui/graphicElements/PlaceTransitionObject.java 2019-05-09 09:07:50 +0000 | |||
180 | @@ -320,6 +320,10 @@ | |||
181 | 320 | if (selectable && !selected) { | 320 | if (selectable && !selected) { |
182 | 321 | selected = true; | 321 | selected = true; |
183 | 322 | 322 | ||
184 | 323 | if (pnName != null) { | ||
185 | 324 | pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); | ||
186 | 325 | } | ||
187 | 326 | |||
188 | 323 | // Select arcs that are connected from this object to another selected object. | 327 | // Select arcs that are connected from this object to another selected object. |
189 | 324 | for (Arc arc : getPostset()) { | 328 | for (Arc arc : getPostset()) { |
190 | 325 | if(arc.getTarget().isSelected()){ | 329 | if(arc.getTarget().isSelected()){ |
191 | 326 | 330 | ||
192 | === modified file 'src/pipe/gui/graphicElements/Transition.java' | |||
193 | --- src/pipe/gui/graphicElements/Transition.java 2019-03-13 07:27:29 +0000 | |||
194 | +++ src/pipe/gui/graphicElements/Transition.java 2019-05-09 09:07:50 +0000 | |||
195 | @@ -97,10 +97,10 @@ | |||
196 | 97 | 97 | ||
197 | 98 | if (selected) { | 98 | if (selected) { |
198 | 99 | g2.setColor(Pipe.SELECTION_FILL_COLOUR); | 99 | g2.setColor(Pipe.SELECTION_FILL_COLOUR); |
200 | 100 | pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); | 100 | //pnName.setForeground(Pipe.SELECTION_LINE_COLOUR); |
201 | 101 | } else { | 101 | } else { |
202 | 102 | g2.setColor(Pipe.ELEMENT_FILL_COLOUR); | 102 | g2.setColor(Pipe.ELEMENT_FILL_COLOUR); |
204 | 103 | pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR); | 103 | //pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR); |
205 | 104 | } | 104 | } |
206 | 105 | 105 | ||
207 | 106 | if (highlighted) { | 106 | if (highlighted) { |
208 | 107 | 107 | ||
209 | === modified file 'src/pipe/gui/graphicElements/tapn/TimedInhibitorArcComponent.java' | |||
210 | --- src/pipe/gui/graphicElements/tapn/TimedInhibitorArcComponent.java 2019-03-13 07:27:29 +0000 | |||
211 | +++ src/pipe/gui/graphicElements/tapn/TimedInhibitorArcComponent.java 2019-05-09 09:07:50 +0000 | |||
212 | @@ -80,9 +80,9 @@ | |||
213 | 80 | 80 | ||
214 | 81 | @Override | 81 | @Override |
215 | 82 | public void updateLabel(boolean displayConstantNames) { | 82 | public void updateLabel(boolean displayConstantNames) { |
217 | 83 | label.setText(""); | 83 | pnName.setText(""); |
218 | 84 | if(getWeight().value() > 1 || displayConstantNames){ | 84 | if(getWeight().value() > 1 || displayConstantNames){ |
220 | 85 | label.setText(getWeight().toString(displayConstantNames)); | 85 | pnName.setText(getWeight().toString(displayConstantNames)); |
221 | 86 | } | 86 | } |
222 | 87 | 87 | ||
223 | 88 | boolean focusedConstant = false; | 88 | boolean focusedConstant = false; |
224 | @@ -92,9 +92,9 @@ | |||
225 | 92 | } | 92 | } |
226 | 93 | } | 93 | } |
227 | 94 | if(focusedConstant){ | 94 | if(focusedConstant){ |
229 | 95 | label.setForeground(Pipe.SELECTION_TEXT_COLOUR); | 95 | pnName.setForeground(Pipe.SELECTION_TEXT_COLOUR); |
230 | 96 | }else{ | 96 | }else{ |
232 | 97 | label.setForeground(Pipe.ELEMENT_TEXT_COLOUR); | 97 | pnName.setForeground(Pipe.ELEMENT_TEXT_COLOUR); |
233 | 98 | } | 98 | } |
234 | 99 | 99 | ||
235 | 100 | this.setLabelPosition(); | 100 | this.setLabelPosition(); |
236 | 101 | 101 | ||
237 | === modified file 'src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java' | |||
238 | --- src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java 2018-10-18 15:08:44 +0000 | |||
239 | +++ src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java 2019-05-09 09:07:50 +0000 | |||
240 | @@ -120,21 +120,21 @@ | |||
241 | 120 | } | 120 | } |
242 | 121 | if (!CreateGui.getModel().netType().equals(NetType.UNTIMED)) { | 121 | if (!CreateGui.getModel().netType().equals(NetType.UNTIMED)) { |
243 | 122 | if (inputArc == null) | 122 | if (inputArc == null) |
245 | 123 | label.setText(""); | 123 | pnName.setText(""); |
246 | 124 | else { | 124 | else { |
247 | 125 | if (!CreateGui.getApp().showZeroToInfinityIntervals()) { | 125 | if (!CreateGui.getApp().showZeroToInfinityIntervals()) { |
248 | 126 | if (inputArc.interval().toString(showConstantNames).equals("[0,inf)")){ | 126 | if (inputArc.interval().toString(showConstantNames).equals("[0,inf)")){ |
250 | 127 | label.setText(""); | 127 | pnName.setText(""); |
251 | 128 | } | 128 | } |
252 | 129 | else { | 129 | else { |
254 | 130 | label.setText(inputArc.interval().toString(showConstantNames)); | 130 | pnName.setText(inputArc.interval().toString(showConstantNames)); |
255 | 131 | } | 131 | } |
256 | 132 | } | 132 | } |
257 | 133 | else { | 133 | else { |
259 | 134 | label.setText(inputArc.interval().toString(showConstantNames)); | 134 | pnName.setText(inputArc.interval().toString(showConstantNames)); |
260 | 135 | } | 135 | } |
263 | 136 | 136 | ||
264 | 137 | label.setText(getWeight().toString(showConstantNames)+" "+label.getText()); | 137 | pnName.setText(getWeight().toString(showConstantNames)+" "+pnName.getText()); |
265 | 138 | 138 | ||
266 | 139 | // Handle constant highlighting | 139 | // Handle constant highlighting |
267 | 140 | boolean focusedConstant = false; | 140 | boolean focusedConstant = false; |
268 | @@ -154,9 +154,9 @@ | |||
269 | 154 | } | 154 | } |
270 | 155 | } | 155 | } |
271 | 156 | if(focusedConstant){ | 156 | if(focusedConstant){ |
273 | 157 | label.setForeground(Pipe.SELECTION_TEXT_COLOUR); | 157 | pnName.setForeground(Pipe.SELECTION_TEXT_COLOUR); |
274 | 158 | }else{ | 158 | }else{ |
276 | 159 | label.setForeground(Pipe.ELEMENT_TEXT_COLOUR); | 159 | pnName.setForeground(Pipe.ELEMENT_TEXT_COLOUR); |
277 | 160 | } | 160 | } |
278 | 161 | 161 | ||
279 | 162 | } | 162 | } |
280 | @@ -169,8 +169,10 @@ | |||
281 | 169 | /*label.setPosition((int) (myPath.midPoint.x + nameOffsetX) | 169 | /*label.setPosition((int) (myPath.midPoint.x + nameOffsetX) |
282 | 170 | + label.getWidth() / 2 - 4, (int) (myPath.midPoint.y + nameOffsetY) | 170 | + label.getWidth() / 2 - 4, (int) (myPath.midPoint.y + nameOffsetY) |
283 | 171 | - ((zoom / 55) * (zoom / 55)));*/ | 171 | - ((zoom / 55) * (zoom / 55)));*/ |
285 | 172 | label.setPosition(Grid.getModifiedX((double) (myPath.midPoint.x + Zoomer.getZoomedValue(nameOffsetX, zoom))), | 172 | |
286 | 173 | pnName.setPosition(Grid.getModifiedX((double) (myPath.midPoint.x + Zoomer.getZoomedValue(nameOffsetX, zoom))), | ||
287 | 173 | Grid.getModifiedY((double) (myPath.midPoint.y + Zoomer.getZoomedValue(nameOffsetY, zoom)))); | 174 | Grid.getModifiedY((double) (myPath.midPoint.y + Zoomer.getZoomedValue(nameOffsetY, zoom)))); |
288 | 175 | |||
289 | 174 | } | 176 | } |
290 | 175 | 177 | ||
291 | 176 | public dk.aau.cs.model.tapn.TimedInputArc underlyingTimedInputArc() { | 178 | public dk.aau.cs.model.tapn.TimedInputArc underlyingTimedInputArc() { |
292 | 177 | 179 | ||
293 | === modified file 'src/pipe/gui/graphicElements/tapn/TimedOutputArcComponent.java' | |||
294 | --- src/pipe/gui/graphicElements/tapn/TimedOutputArcComponent.java 2019-03-16 13:57:33 +0000 | |||
295 | +++ src/pipe/gui/graphicElements/tapn/TimedOutputArcComponent.java 2019-05-09 09:07:50 +0000 | |||
296 | @@ -133,8 +133,8 @@ | |||
297 | 133 | } | 133 | } |
298 | 134 | 134 | ||
299 | 135 | public void updateLabel(boolean displayConstantNames) { | 135 | public void updateLabel(boolean displayConstantNames) { |
302 | 136 | label.setText(""); | 136 | pnName.setText(""); |
303 | 137 | label.setText(getWeight().toString(displayConstantNames)+" " + label.getText()); | 137 | pnName.setText(getWeight().toString(displayConstantNames)+" " + pnName.getText()); |
304 | 138 | setLabelPosition(); | 138 | setLabelPosition(); |
305 | 139 | } | 139 | } |
306 | 140 | 140 | ||
307 | 141 | 141 | ||
308 | === modified file 'src/pipe/gui/graphicElements/tapn/TimedTransportArcComponent.java' | |||
309 | --- src/pipe/gui/graphicElements/tapn/TimedTransportArcComponent.java 2019-01-27 12:49:43 +0000 | |||
310 | +++ src/pipe/gui/graphicElements/tapn/TimedTransportArcComponent.java 2019-05-09 09:07:50 +0000 | |||
311 | @@ -97,17 +97,19 @@ | |||
312 | 97 | public void updateLabel(boolean displayConstantNames) { | 97 | public void updateLabel(boolean displayConstantNames) { |
313 | 98 | if (isInPreSet && underlyingTransportArc != null) { | 98 | if (isInPreSet && underlyingTransportArc != null) { |
314 | 99 | if (CreateGui.getApp().showZeroToInfinityIntervals()){ | 99 | if (CreateGui.getApp().showZeroToInfinityIntervals()){ |
316 | 100 | label.setText(underlyingTransportArc.interval().toString( | 100 | pnName.setText(underlyingTransportArc.interval().toString( |
317 | 101 | displayConstantNames) | 101 | displayConstantNames) |
318 | 102 | + " : " + getGroup()); | 102 | + " : " + getGroup()); |
319 | 103 | } | 103 | } |
320 | 104 | else { | 104 | else { |
321 | 105 | if (underlyingTransportArc.interval().toString( | 105 | if (underlyingTransportArc.interval().toString( |
322 | 106 | displayConstantNames).equals("[0,inf)")) { | 106 | displayConstantNames).equals("[0,inf)")) { |
324 | 107 | label.setText(" : " + String.valueOf(getGroup())); | 107 | |
325 | 108 | pnName.setText(" : " + String.valueOf(getGroup())); | ||
326 | 109 | |||
327 | 108 | } | 110 | } |
328 | 109 | else { | 111 | else { |
330 | 110 | label.setText(underlyingTransportArc.interval().toString( | 112 | pnName.setText(underlyingTransportArc.interval().toString( |
331 | 111 | displayConstantNames) | 113 | displayConstantNames) |
332 | 112 | + " : " + getGroup()); | 114 | + " : " + getGroup()); |
333 | 113 | } | 115 | } |
334 | @@ -131,19 +133,19 @@ | |||
335 | 131 | } | 133 | } |
336 | 132 | } | 134 | } |
337 | 133 | if(focusedConstant){ | 135 | if(focusedConstant){ |
339 | 134 | label.setForeground(Pipe.SELECTION_TEXT_COLOUR); | 136 | pnName.setForeground(Pipe.SELECTION_TEXT_COLOUR); |
340 | 135 | }else{ | 137 | }else{ |
342 | 136 | label.setForeground(Pipe.ELEMENT_TEXT_COLOUR); | 138 | pnName.setForeground(Pipe.ELEMENT_TEXT_COLOUR); |
343 | 137 | } | 139 | } |
344 | 138 | 140 | ||
345 | 139 | } else if (!isInPreSet) { | 141 | } else if (!isInPreSet) { |
347 | 140 | label.setText(" : " + String.valueOf(getGroup())); | 142 | pnName.setText(" : " + String.valueOf(getGroup())); |
348 | 141 | } else { | 143 | } else { |
350 | 142 | label.setText(""); | 144 | pnName.setText(""); |
351 | 143 | } | 145 | } |
352 | 144 | 146 | ||
353 | 145 | if(underlyingTransportArc != null){ | 147 | if(underlyingTransportArc != null){ |
355 | 146 | label.setText(getWeight().toString(displayConstantNames)+" "+label.getText()); | 148 | pnName.setText(getWeight().toString(displayConstantNames)+" "+pnName.getText()); |
356 | 147 | } | 149 | } |
357 | 148 | 150 | ||
358 | 149 | this.setLabelPosition(); | 151 | this.setLabelPosition(); |