Skip to content
Snippets Groups Projects
Commit ff0ce453 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Adding info to association and adding mm to schemas

parent 667ac894
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
......@@ -59,6 +59,16 @@ public class AvatarCDAssociationConnector extends TGConnectorWithMultiplicity i
public AvatarCDAssociationConnector(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector<Point> _listPoint) {
super(_x, _y, _minX, _minY, _maxX, _maxY, _pos, _father, _tdp, _p1, _p2, _listPoint);
TGCOneLineText tgc = new TGCOneLineText((_p1.getX() + _p2.getX()) / 2, (_p1.getY() + _p2.getY()) / 2, tdp.getMinX(), tdp.getMaxX(),
tdp.getMinY(), tdp.getMaxY(), false, this, _tdp);
tgc.setValue("info");
tgc.setName("semantics");
tgc.setMoveWithFather(false);
addInternalComponent(tgc, getNbInternalTGComponent());
value = "";
editable = true;
}
@Override
......@@ -76,13 +86,13 @@ public class AvatarCDAssociationConnector extends TGConnectorWithMultiplicity i
GraphicLib.dashedLine(g, x1, y1, x2, y2);
}*/
@Override
/*@Override
public TGComponent extraIsOnOnlyMe(int x1, int y1) {
if (GraphicLib.isInRectangle(x1, y1, (p1.getX() + p2.getX() - w) / 2, (p1.getY() + p2.getY())/2 - h, w, h)) {
return this;
}
return null;
}
}*/
@Override
public int getType() {
......
......@@ -118,6 +118,11 @@ public class AvatarSMDReceiveSignal extends AvatarSMDBasicCanBeDisabledComponent
@Override
public void internalDrawing(Graphics g) {
/*if (height != (int)(20 * tdp.getZoom())) {
height = (int)(20 * tdp.getZoom());
}*/
int w = g.getFontMetrics().stringWidth(value + textX);
int w1 = Math.max(minWidth, w + 2 * textX);
if ((w1 != width) & (!tdp.isScaled())) {
......
......@@ -116,6 +116,12 @@ public class AvatarSMDSendSignal extends AvatarSMDBasicCanBeDisabledComponent /*
@Override
public void internalDrawing(Graphics g) {
/*if (height != (int)(20 * tdp.getZoom())) {
height = (int)(20 * tdp.getZoom());
}*/
int w = g.getFontMetrics().stringWidth(value);
int w1 = Math.max(minWidth, w + 2 * textX);
if ((w1 != width) & (!tdp.isScaled())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment