diff --git a/src/main/java/ui/avatarad/AvatarADAcceptEventAction.java b/src/main/java/ui/avatarad/AvatarADAcceptEventAction.java index 0ad392be3d400c4d43b503df17943b52647f46ed..cf3dd819f13293dd0bf791f6d3b21a98a58ce72d 100755 --- a/src/main/java/ui/avatarad/AvatarADAcceptEventAction.java +++ b/src/main/java/ui/avatarad/AvatarADAcceptEventAction.java @@ -138,8 +138,8 @@ public class AvatarADAcceptEventAction extends AvatarADBasicCanBeDisabledCompon g.drawLine(x, y, x+linebreak, y+height/2); g.drawLine(x, y+height, x+linebreak, y+height/2); - //g.drawString("evt", x+(width-w) / 2, y); - g.drawString(value, x + linebreak + textX1, y + (int)((textY*tdp.getZoom()))); + //drawSingleString(g, "evt", x+(width-w) / 2, y); + drawSingleString(g, value, x + linebreak + textX1, y + (int)((textY*tdp.getZoom()))); } diff --git a/src/main/java/ui/avatarad/AvatarADAction.java b/src/main/java/ui/avatarad/AvatarADAction.java index 3d0e619b91a3c5eb614519cad869b7870684915a..443124e9e8ea620a1f591b55cf2100ac39a63839 100755 --- a/src/main/java/ui/avatarad/AvatarADAction.java +++ b/src/main/java/ui/avatarad/AvatarADAction.java @@ -55,8 +55,8 @@ import java.awt.geom.Line2D; */ public class AvatarADAction extends AvatarADBasicCanBeDisabledComponent/* Issue #69 AvatarADBasicComponent*/ implements EmbeddedComment, BasicErrorHighlight { protected int lineLength = 5; - protected int textX = 5; - protected int textY = 15; +// protected int textX = 5; +// protected int textY = 15; protected int arc = 5; protected int stateOfError = 0; // Not yet checked @@ -66,6 +66,8 @@ public class AvatarADAction extends AvatarADBasicCanBeDisabledComponent/* Issue public AvatarADAction(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); + textX = 5; + textY = 15; initScaling(30, 20); minWidth = (int)(30* tdp.getZoom()); oldScaleFactor = tdp.getZoom(); @@ -112,7 +114,7 @@ public class AvatarADAction extends AvatarADBasicCanBeDisabledComponent/* Issue g.drawLine(x+(width/2), y, x+(width/2), y - lineLength); g.drawLine(x+(width/2), y+height, x+(width/2), y + lineLength + height); - g.drawString(value, x + (width - w) / 2 , y + (int)((textY*tdp.getZoom()))); + drawSingleString(g, value, x + (width - w) / 2 , y + (int)((textY*tdp.getZoom()))); } diff --git a/src/main/java/ui/avatarad/AvatarADActivity.java b/src/main/java/ui/avatarad/AvatarADActivity.java index 1ce5f672c63b03884e3a807fccb5bac8f7c146c7..4fb2916b0e2c5d060408bd53d0a500e0a966ef48 100644 --- a/src/main/java/ui/avatarad/AvatarADActivity.java +++ b/src/main/java/ui/avatarad/AvatarADActivity.java @@ -63,13 +63,14 @@ public class AvatarADActivity extends TGCScalableWithInternalComponent implement // private int minFontSize = 4; //private int currentFontSize = -1; private boolean displayText = true; - private int textX = 7; +// private int textX = 7; public String oldValue; public AvatarADActivity(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); - + + textX = 7; initScaling(100, 50); minWidth = (int)(40* tdp.getZoom()); minHeight = (int)(30* tdp.getZoom()); @@ -204,7 +205,7 @@ public class AvatarADActivity extends TGCScalableWithInternalComponent implement g.drawLine(x, y+decY, x+decY, y+decY); g.drawLine(x+decY, y+decY, x+decX, y+decY-5); g.drawLine(x+decX, y+decY-5, x+decX, y); - g.drawString("act", x+1, y+decY-2); + drawSingleString(g, "act", x+1, y+decY-2); } //g.drawRoundRect(x, y, width, height, 5, 5); @@ -221,7 +222,7 @@ public class AvatarADActivity extends TGCScalableWithInternalComponent implement h = g.getFontMetrics().getHeight(); //h = currentFontSize + (int)(textY1 * tdp.getZoom()); if ((w < (2*textX + width)) && (h < height)) { - g.drawString(value, x + (width - w)/2, y+h+1); + drawSingleString(g, value, x + (width - w)/2, y+h+1); } //g.setFont(f0); } diff --git a/src/main/java/ui/avatarad/AvatarADSendSignalAction.java b/src/main/java/ui/avatarad/AvatarADSendSignalAction.java index 6737d597a2207ce6c8863c927dc4931c319e1f41..96528572620f3b43ccb6842797d19bda6c2e2d1c 100755 --- a/src/main/java/ui/avatarad/AvatarADSendSignalAction.java +++ b/src/main/java/ui/avatarad/AvatarADSendSignalAction.java @@ -55,8 +55,8 @@ import java.awt.geom.Line2D; */ public class AvatarADSendSignalAction extends AvatarADBasicCanBeDisabledComponent/* Issue #69 AvatarADBasicComponent*/ implements EmbeddedComment, BasicErrorHighlight { protected int lineLength = 5; - protected int textX = 5; - protected int textY = 15; +// protected int textX = 5; +// protected int textY = 15; protected int arc = 5; protected int linebreak = 10; @@ -64,7 +64,8 @@ public class AvatarADSendSignalAction extends AvatarADBasicCanBeDisabledComponen public AvatarADSendSignalAction(int _x, int _y, int _minX, int _maxX, int _minY, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp) { super(_x, _y, _minX, _maxX, _minY, _maxY, _pos, _father, _tdp); - + textX = 5; + textY = 15; initScaling(30, 20); minWidth = (int)(30* tdp.getZoom()); oldScaleFactor = tdp.getZoom(); @@ -139,8 +140,8 @@ public class AvatarADSendSignalAction extends AvatarADBasicCanBeDisabledComponen g.drawLine(x+width-linebreak, y, x+width, y+height/2); g.drawLine(x+width-linebreak, y+height, x+width, y+height/2); - //g.drawString("sig", x+(width-w) / 2, y); - g.drawString(value, x + (width - w) / 2 , y + (int)((textY*tdp.getZoom()))); + //drawSingleString(g, "sig", x+(width-w) / 2, y); + drawSingleString(g, value, x + (width - w) / 2 , y + (int)((textY*tdp.getZoom()))); } @Override diff --git a/src/main/java/ui/avatarad/AvatarADToolBar.java b/src/main/java/ui/avatarad/AvatarADToolBar.java index b1ba6354ffc0924c3f5b0bee4f23f5e6a1ebe3c2..b75b010ef1f8a3899a603f155a41348e1f496379 100644 --- a/src/main/java/ui/avatarad/AvatarADToolBar.java +++ b/src/main/java/ui/avatarad/AvatarADToolBar.java @@ -59,7 +59,8 @@ public class AvatarADToolBar extends TToolBar { public AvatarADToolBar(MainGUI _mgui) { super(_mgui); } - + + @Override protected void setActive(boolean b) { mgui.actions[TGUIAction.ACT_ZOOM_MORE].setEnabled(b); mgui.actions[TGUIAction.ACT_ZOOM_LESS].setEnabled(b); @@ -86,7 +87,8 @@ public class AvatarADToolBar extends TToolBar { mgui.actions[TGUIAction.ACT_MODEL_CHECKING].setEnabled(!b); } - + + @Override protected void setButtons() { JButton button;