X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2Fatomic%2FModelTriStateBuffer.java;h=93bff320d2a3d370c823d9d5459a0528c1eddba3;hb=8bed58cd47f4e53a0a83e066d38864aa6875502f;hp=45e653cb824556c91b03be7a40ff774a852a9288;hpb=3a52b6bffe52db5dd5ca907b4b3dfd368a58e14f;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelTriStateBuffer.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelTriStateBuffer.java index 45e653cb..93bff320 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelTriStateBuffer.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelTriStateBuffer.java @@ -39,7 +39,7 @@ public class ModelTriStateBuffer extends ModelComponent public ModelTriStateBuffer(LogicModelModifiable model, ModelTriStateBufferParams params, String name) { - super(model, name); + super(model, name, false); this.params = params; oc = new OrientationCalculator(params.orientation, width, height); @@ -48,9 +48,9 @@ public class ModelTriStateBuffer extends ModelComponent double hHalf = height / 2; double hQuar = height / 4; - this.input = new Pin(this, "IN", params.logicWidth, PinUsage.INPUT, oc.newX(0, hHalf), oc.newY(0, hHalf)); - this.output = new Pin(this, "OUT", params.logicWidth, PinUsage.OUTPUT, oc.newX(width, hHalf), oc.newY(width, hHalf)); - this.enable = new Pin(this, "EN", 1, PinUsage.INPUT, oc.newX(wHalf, hQuar), oc.newY(wHalf, hQuar)); + this.input = new Pin(model, this, "IN", params.logicWidth, PinUsage.INPUT, oc.newX(0, hHalf), oc.newY(0, hHalf)); + this.output = new Pin(model, this, "OUT", params.logicWidth, PinUsage.OUTPUT, oc.newX(width, hHalf), oc.newY(width, hHalf)); + this.enable = new Pin(model, this, "EN", 1, PinUsage.INPUT, oc.newX(wHalf, hQuar), oc.newY(wHalf, hQuar)); this.path = new double[] { oc.newX(0, 0), oc.newY(0, 0), oc.newX(width, hHalf), oc.newY(width, hHalf), oc.newX(0, height), oc.newY(0, height) }; @@ -58,6 +58,8 @@ public class ModelTriStateBuffer extends ModelComponent addPin(input); addPin(output); addPin(enable); + + init(); } public final Pin getInputPin()