X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fwires%2FWireCrossPoint.java;h=da0a45062ac4d0dc2c6a1788f77dadccbfa2f553;hb=5ece0acf049bf9af2933f513fe0206565681f622;hp=7a2fcf4b4cbf8bea9f82c4234c1ac9b9e6b9c8bf;hpb=a2eef1d1616d03af5b464f347f6176ea9d2cc75e;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/WireCrossPoint.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/WireCrossPoint.java index 7a2fcf4b..da0a4506 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/WireCrossPoint.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/WireCrossPoint.java @@ -46,7 +46,12 @@ public class WireCrossPoint extends GUIComponent public WireCrossPoint(ViewModelModifiable model, int logicWidth) { - super(model); + this(model, logicWidth, null); + } + + public WireCrossPoint(ViewModelModifiable model, int logicWidth, String name) + { + super(model, name); logicObs = (i) -> requestRedraw(); setSize(CIRCLE_DIAM, CIRCLE_DIAM); @@ -117,7 +122,7 @@ public class WireCrossPoint extends GUIComponent static { - IndirectGUIComponentCreator.setComponentProvider(WireCrossPoint.class.getCanonicalName(), - (m, p) -> new WireCrossPoint(m, p.getAsInt())); + IndirectGUIComponentCreator.setComponentSupplier(WireCrossPoint.class.getCanonicalName(), + (m, p, n) -> new WireCrossPoint(m, p.getAsInt(), n)); } } \ No newline at end of file