X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2FSimpleRectangularGUIGate.java;h=96bf11e6aa788078fd596b01e1d3ce09192a5760;hb=baa16105359d2a233893a3d1b4bcf8a72fd08877;hp=9058d2e0204470ea2ff7f9c905685a7c30bf9281;hpb=19ee1a7fdb06a1df65cd7df78fed935124496707;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java index 9058d2e0..96bf11e6 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java @@ -2,6 +2,7 @@ package net.mograsim.logic.ui.model.components; import java.util.ArrayList; import java.util.List; +import java.util.Map; import net.haspamelodica.swt.helper.gcs.GeneralGC; import net.haspamelodica.swt.helper.swtobjectwrappers.Font; @@ -26,6 +27,8 @@ public class SimpleRectangularGUIGate extends GUIComponent private MovablePin outputPin; private final List inputPins; + public static final String kLogicWidth = "logicWidth"; + protected SimpleRectangularGUIGate(ViewModelModifiable model, int logicWidth, String label, boolean isInverted) { super(model); @@ -74,4 +77,12 @@ public class SimpleRectangularGUIGate extends GUIComponent if (isInverted) gc.drawOval(posX + rectWidth, posY + (height - invertedCircleDiam) / 2, invertedCircleDiam, invertedCircleDiam); } + + @Override + public Map getInstantiationParameters() + { + Map m = super.getInstantiationParameters(); + m.put(kLogicWidth, logicWidth); + return m; + } } \ No newline at end of file