|
@@ -516,7 +516,7 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
|
|
|
g2.drawLine(tempCps.getPosition().x, tempCps.getPosition().y, x, y);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ // draw Edges
|
|
|
for (CpsEdge con : upperNode.getNodeEdges()) {
|
|
|
if (con.getA().getId() != model.getSelectedObjectID() && con.getB().getId() != model.getSelectedObjectID()
|
|
|
&& con != edgeHighlight) {
|
|
@@ -727,12 +727,12 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
|
|
|
if (showedInformation[0]) {
|
|
|
if (ed.getConnected() == 0 || ed.getConnected() == 1) {
|
|
|
g2.drawString(ed.getFlow() + "/" + ed.getCapacity(),
|
|
|
- (ed.getA().getPosition().x + ed.getB().getPosition().x) / 2,
|
|
|
- (ed.getA().getPosition().y + ed.getB().getPosition().y) / 2);
|
|
|
+ (obj.getPosition().x + (borderPos >> 1)) / 2, (obj.getPosition().y
|
|
|
+ + (int) (scalediv20 + 5 + (50 + scalediv20 + 10) * count) + 25) / 2);
|
|
|
} else {
|
|
|
- g2.drawString("not connected",
|
|
|
- (ed.getA().getPosition().x + ed.getB().getPosition().x) / 2,
|
|
|
- (ed.getA().getPosition().y + ed.getB().getPosition().y) / 2);
|
|
|
+ g2.drawString("not connected", (obj.getPosition().x + (borderPos >> 1)) / 2,
|
|
|
+ (obj.getPosition().y + (int) (scalediv20 + 5 + (50 + scalediv20 + 10) * count)
|
|
|
+ + 25) / 2);
|
|
|
}
|
|
|
}
|
|
|
}
|