Skip to content
Snippets Groups Projects
Commit adf130df authored by Irina LEE's avatar Irina LEE
Browse files

add condition on connector (syscams)

parent 55690975
No related branches found
No related tags found
1 merge request!72Syscams
......@@ -45,6 +45,9 @@ import java.awt.*;
import java.awt.geom.Point2D;
import java.util.Vector;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import myutil.GraphicLib;
/**
......@@ -97,8 +100,8 @@ public class SysCAMSPortConnector extends TGConnector implements ScalableTGCompo
}
}
if ((pt1.port != null) && (pt2.port != null)) {
if ((pt1.port.getFather() instanceof SysCAMSBlockTDF) && (pt2.port.getFather() instanceof SysCAMSBlockGPIO2VCI)
|| (pt2.port.getFather() instanceof SysCAMSBlockTDF) && (pt1.port.getFather() instanceof SysCAMSBlockGPIO2VCI)) {
if ((pt1.port instanceof SysCAMSPortConverter) && (pt2.port instanceof SysCAMSPortDE)
|| (pt2.port instanceof SysCAMSPortConverter) && (pt1.port instanceof SysCAMSPortDE)) {
if (Point2D.distance(x1, y1, x2, y2) < GraphicLib.longueur * 1.5) {
Stroke dashed = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[] { 9 }, 0);
g.setStroke(dashed);
......@@ -108,7 +111,8 @@ public class SysCAMSPortConnector extends TGConnector implements ScalableTGCompo
g.setStroke(dashed);
GraphicLib.arrowWithLine(g, 1, 0, 10, x1, y1, x2, y2, true);
}
} else {
} else if ((pt1.port instanceof SysCAMSPortTDF) && (pt2.port instanceof SysCAMSPortTDF)
|| (pt2.port instanceof SysCAMSPortTDF) && (pt1.port instanceof SysCAMSPortTDF)) {
if (Point2D.distance(x1, y1, x2, y2) < GraphicLib.longueur * 1.5) {
g.drawLine(x1, y1, x2, y2);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment