X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2FGUINotGate.java;h=f439f89ab15f73adad35cdff5c2e0dfb3296be9f;hb=f14ea37d69488dd51518a36413af7176916b8bd7;hp=01df349bb9c7d094904e080e4a813c57923cef0f;hpb=07faf07e3acb8b2afdc2bf65a46bc868faaed0f8;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINotGate.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINotGate.java index 01df349b..f439f89a 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINotGate.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINotGate.java @@ -1,12 +1,20 @@ package net.mograsim.logic.ui.model.components; -import net.mograsim.logic.ui.model.ViewModel; +import net.mograsim.logic.core.components.gates.NotGate; +import net.mograsim.logic.ui.model.ViewModelModifiable; +import net.mograsim.logic.ui.modeladapter.ViewLogicModelAdapter; +import net.mograsim.logic.ui.modeladapter.componentadapters.SimpleGateAdapter; public class GUINotGate extends SimpleRectangularGUIGate { - public GUINotGate(ViewModel model, int logicWidth) + public GUINotGate(ViewModelModifiable model, int logicWidth) { super(model, logicWidth, "1", true); setInputCount(1); } + + static + { + ViewLogicModelAdapter.addComponentAdapter(new SimpleGateAdapter<>(GUINotGate.class, (t, p, o, i) -> new NotGate(t, p, i[0], o))); + } } \ No newline at end of file