projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GUIComponents now have names
[Mograsim.git]
/
net.mograsim.logic.ui.am2900
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
components
/
mi
/
nandbased
/
GUIand41.java
diff --git
a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
index
3bfb814
..
73e5fa1
100644
(file)
--- a/
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
+++ b/
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
@@
-6,12
+6,18
@@
import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
import net.mograsim.logic.ui.model.wires.GUIWire;
import net.mograsim.logic.ui.model.wires.Pin;
import net.mograsim.logic.ui.model.wires.WireCrossPoint;
import net.mograsim.logic.ui.model.wires.GUIWire;
import net.mograsim.logic.ui.model.wires.Pin;
import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
public class GUIand41 extends SimpleRectangularSubmodelComponent
{
public GUIand41(ViewModelModifiable model)
{
public class GUIand41 extends SimpleRectangularSubmodelComponent
{
public GUIand41(ViewModelModifiable model)
{
- super(model, 1, "GUIand41");
+ this(model, null);
+ }
+
+ public GUIand41(ViewModelModifiable model, String name)
+ {
+ super(model, 1, "GUIand41", name);
setSubmodelScale(.4);
setInputPins("A1", "A2", "A3", "A4", "B");
setOutputPins("Y1", "Y2", "Y3", "Y4");
setSubmodelScale(.4);
setInputPins("A1", "A2", "A3", "A4", "B");
setOutputPins("Y1", "Y2", "Y3", "Y4");
@@
-64,4
+70,9
@@
public class GUIand41 extends SimpleRectangularSubmodelComponent
new GUIWire(submodelModifiable, and3.getPin("Y"), Y3, new Point[0]);
new GUIWire(submodelModifiable, and4.getPin("Y"), Y4, new Point[0]);
}
new GUIWire(submodelModifiable, and3.getPin("Y"), Y3, new Point[0]);
new GUIWire(submodelModifiable, and4.getPin("Y"), Y4, new Point[0]);
}
+
+ static
+ {
+ IndirectGUIComponentCreator.setComponentSupplier(GUIand41.class.getCanonicalName(), (m, p, n) -> new GUIand41(m, n));
+ }
}
\ No newline at end of file
}
\ No newline at end of file