import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.types.BitVectorFormatter;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
-import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.wires.PinUsage;
private ReadEnd inputEnd;
private final ReadEnd[] outputEnds;
- public ModelSplitter(ViewModelModifiable model, int logicWidth)
+ public ModelSplitter(LogicModelModifiable model, int logicWidth)
{
this(model, logicWidth, null);
}
- public ModelSplitter(ViewModelModifiable model, int logicWidth, String name)
+ public ModelSplitter(LogicModelModifiable model, int logicWidth, String name)
{
- super(model, name);
+ super(model, name, false);
this.logicWidth = logicWidth;
setSize(width, (logicWidth - 1) * heightPerPin);
- addPin(this.inputPin = new Pin(this, "I", logicWidth, PinUsage.TRISTATE, 0, (logicWidth - 1) * heightPerPin / 2));
+ addPin(this.inputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, 0, (logicWidth - 1) * heightPerPin / 2));
double outputHeight = (logicWidth - 1) * heightPerPin;
for (int i = 0; i < logicWidth; i++, outputHeight -= 10)
- addPin(new Pin(this, "O" + i, 1, PinUsage.TRISTATE, width, outputHeight));
+ addPin(new Pin(model, this, "O" + i, 1, PinUsage.TRISTATE, width, outputHeight));
outputEnds = new ReadEnd[logicWidth];
+
+ init();
}
@Override