diff --git a/Makefile b/Makefile index 709896e86d30e67c3821ce12b22a926e04d2be2a..f76d41c9b04a48369a0708a6742d99919a4ba50b 100755 --- a/Makefile +++ b/Makefile @@ -64,6 +64,7 @@ RELEASE_STD_FILES_BIN = $(TTOOL_CONFIG) $(LAUNCHER_BINARY) $(TTOOL_BINARY) $(TIF RELEASE_STD_FILES_LICENSES = LICENSE LICENSE_CECILL_ENG LICENSE_CECILL_FR all: + date svn update build.txt src/ui/DefaultText.java $(JAVA) -jar $(BUILDER) $(BUILD_INFO) $(BUILD_TO_MODIFY) svn commit build.txt src/ui/DefaultText.java -m 'update on build version: builder.txt' diff --git a/src/ui/TDiagramPanel.java b/src/ui/TDiagramPanel.java index 478ef9155e7000ce32ecb7c5c265c99f43ee368f..ec9c9abf2b89a1114b8e06626e29e933eb9ece3d 100755 --- a/src/ui/TDiagramPanel.java +++ b/src/ui/TDiagramPanel.java @@ -397,13 +397,13 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree { // Draw name of component selected if (componentPointed != null) { - String name = componentPointed.getName(); + String name1 = componentPointed.getName(); if (componentPointed.hasFather()) { - name = componentPointed.getTopLevelName() + ": " + name; + name1 = componentPointed.getTopLevelName() + ": " + name1; } //g.setColor(Color.black); //g.drawString(name, 20, 20); - mgui.setStatusBarText(name); + mgui.setStatusBarText(name1); } //Draw component being added diff --git a/src/ui/TGConnectingPoint.java b/src/ui/TGConnectingPoint.java index fd238e3a904514b8e678ebabf1c5df161b5fae7e..698d1c4de58b331f5dd6786b47c1fe0de6847113 100755 --- a/src/ui/TGConnectingPoint.java +++ b/src/ui/TGConnectingPoint.java @@ -52,6 +52,8 @@ import myutil.*; public class TGConnectingPoint implements CDElement { + protected TGComponent father; + //private static int ID = 0; protected int x, y; // relative cd and center of the point @@ -249,6 +251,18 @@ public class TGConnectingPoint implements CDElement { protected String saveInXML(int num) { return "<TGConnectingPoint num=\"" + num + "\" id=\"" + getId() + "\" />\n"; } + + /*protected boolean hasFather() { + return (father != null); + } + + protected void setFather(TGComponent tgc) { + father = tgc; + } + + protected TGComponent getFather() { + return father; + }*/ } diff --git a/src/ui/ncdd/NCConnectorNode.java b/src/ui/ncdd/NCConnectorNode.java index d20f92c1491e92609e46b411e281773535d46274..09faa3fa35b2fa5c50db4e1c2d79086504c3f9a5 100755 --- a/src/ui/ncdd/NCConnectorNode.java +++ b/src/ui/ncdd/NCConnectorNode.java @@ -112,11 +112,11 @@ public class NCConnectorNode extends TGConnector implements WithAttributes { } - widthValue = g.getFontMetrics().stringWidth(value); + widthValue = g.getFontMetrics().stringWidth(interfaceName); if (!tdp.isScaled()) { maxWidthValue = Math.max(maxWidthValue, widthValue); } - //g.drawString(value, ((p1.getX() + p2.getX()) / 2)-widthValue/2, ((p1.getY() + p2.getY()) / 2) - (h/2)); + g.drawString(interfaceName, ((p1.getX() + p2.getX()) / 2)-widthValue/2, ((p1.getY() + p2.getY()) / 2) - (h/2)); } public boolean editOndoubleClick(JFrame frame) { diff --git a/src/ui/tmlcompd/TMLCPortConnectingPoint.java b/src/ui/tmlcompd/TMLCPortConnectingPoint.java index 080bd028c637ad992974b5db10128c93d6142952..cfb609b723e762779200ab0a4f20b889a78ed12c 100755 --- a/src/ui/tmlcompd/TMLCPortConnectingPoint.java +++ b/src/ui/tmlcompd/TMLCPortConnectingPoint.java @@ -50,7 +50,9 @@ package ui.tmlcompd; import ui.*; public class TMLCPortConnectingPoint extends TGConnectingPointWidthHeight{ - + public TMLCPrimitivePort port; + public boolean positionned; + public TMLCPortConnectingPoint(CDElement _container, int _x, int _y, boolean _in, boolean _out, double _w, double _h) { super(_container, _x, _y, _in, _out, _w, _h); } diff --git a/src/ui/tmlcompd/TMLCPortConnector.java b/src/ui/tmlcompd/TMLCPortConnector.java index 90216170424e22af1ce86ed4c8480000287e7ee8..5b49164e6ac400164c086bbde9d9080600095d92 100755 --- a/src/ui/tmlcompd/TMLCPortConnector.java +++ b/src/ui/tmlcompd/TMLCPortConnector.java @@ -108,7 +108,40 @@ public class TMLCPortConnector extends TGConnector implements ScalableTGCompone ((TMLComponentTaskDiagramPanel)tdp).updateConnectors(this, oldp1, oldp2, p1, p2); } }*/ + + TMLCPortConnectingPoint pt1 = (TMLCPortConnectingPoint)p1; + TMLCPortConnectingPoint pt2 = (TMLCPortConnectingPoint)p2; + + if (!pt1.positionned) { + pt1.positionned = true; + if (pt1.getFather() instanceof TMLCPrimitivePort) { + pt1.port = (TMLCPrimitivePort)(pt1.getFather()); + } + } + + if (!pt2.positionned) { + pt2.positionned = true; + if (pt2.getFather() instanceof TMLCPrimitivePort) { + pt2.port = (TMLCPrimitivePort)(pt2.getFather()); + } + } + + if ((pt1.port != null) && (pt2.port != null)) { + String name1 = pt1.port.getPortName(); + String name2 = pt2.port.getPortName(); + if (name1.equals(name2)) { + int w = g.getFontMetrics().stringWidth(name1); + Font fold = g.getFont(); + Font f = fold.deriveFont(Font.ITALIC, (float)(tdp.getFontSize())); + g.setFont(f); + g.drawString(name1, (x1 + x2 - w)/2, (y1 + y2)/2); + g.setFont(fold); + } + } + g.drawLine(x1, y1, x2, y2); + + //} else { // GraphicLib.arrowWithLine(g, 1, 0, 10, x1, y1, x2, y2, true); //} diff --git a/src/ui/tmlcompd/TMLCPrimitiveComponent.java b/src/ui/tmlcompd/TMLCPrimitiveComponent.java index 39f418ab0e5d4a4b252786bfa179483cad432fae..fdf08a43cc3e1d17f14bfc2faf454f02a5399124 100755 --- a/src/ui/tmlcompd/TMLCPrimitiveComponent.java +++ b/src/ui/tmlcompd/TMLCPrimitiveComponent.java @@ -59,7 +59,7 @@ import ui.window.*; import tmltranslator.*; public class TMLCPrimitiveComponent extends TGCScalableWithInternalComponent implements SwallowTGComponent, SwallowedTGComponent { - private int maxFontSize = 20; + private int maxFontSize = 14; private int minFontSize = 4; private int currentFontSize = -1; private boolean displayText = true; diff --git a/src/ui/tmlcompd/TMLComponentTaskDiagramPanel.java b/src/ui/tmlcompd/TMLComponentTaskDiagramPanel.java index 78c4fbc71b1838c3e0cbd2302cf1e81dff396097..d0b2ff5d6307bc90f01dbbd7a4b3498a16363070 100755 --- a/src/ui/tmlcompd/TMLComponentTaskDiagramPanel.java +++ b/src/ui/tmlcompd/TMLComponentTaskDiagramPanel.java @@ -251,6 +251,7 @@ public class TMLComponentTaskDiagramPanel extends TDiagramPanel implements TDPWi } public String getXMLHead() { + System.out.println("Name=" + name); return "<TMLComponentTaskDiagramPanel name=\"" + name + "\"" + sizeParam() + displayParam() + zoomParam() +" >"; } diff --git a/src/ui/tmldd/TMLArchiBridgeNode.java b/src/ui/tmldd/TMLArchiBridgeNode.java index 4f9c2a9746541c42684dae6117492617cd801a03..ab436c4322596cd521946b1f8cc52b3d767615bd 100755 --- a/src/ui/tmldd/TMLArchiBridgeNode.java +++ b/src/ui/tmldd/TMLArchiBridgeNode.java @@ -73,7 +73,7 @@ public class TMLArchiBridgeNode extends TMLArchiCommunicationNode implements Swa width = 250; height = 100; minWidth = 100; - minHeight = 100; + minHeight = 50; nbConnectingPoint = 16; connectingPoint = new TGConnectingPoint[16];