Moved LogicUI
[Mograsim.git] / LogicUI / src / era / mi / components / gui / GUINotGate.java
index 8078b0c..b428888 100644 (file)
@@ -9,6 +9,7 @@ import era.mi.logic.wires.WireArray;
 import net.haspamelodica.swt.helper.gcs.GeneralGC;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
 
 public class GUINotGate extends NotGate implements BasicGUIComponent
 {
@@ -34,6 +35,11 @@ public class GUINotGate extends NotGate implements BasicGUIComponent
                this.wireArrayConnectionPoints = Collections.unmodifiableList(wireArrayConnectionPointsModifiable);
        }
 
+       @Override
+       public Rectangle getBounds()
+       {
+               return new Rectangle(0, 0, 20, 10);
+       }
        @Override
        public void render(GeneralGC gc)
        {
@@ -42,7 +48,7 @@ public class GUINotGate extends NotGate implements BasicGUIComponent
                Font labelFont = new Font(oldFont.getName(), 5, oldFont.getStyle());
                gc.setFont(labelFont);
                Point textExtent = gc.textExtent(LABEL);
-               gc.drawText(LABEL, 10 - textExtent.x / 2, 5 - textExtent.y / 2, true);
+               gc.drawText(LABEL, 8.5 - textExtent.x / 2, 5 - textExtent.y / 2, true);
                gc.setFont(oldFont);
                gc.drawOval(17, 3.5, 3, 3);
        }