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
/
GUIfulladder.java
diff --git
a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java
b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java
index
23656fa
..
3a793a8
100644
(file)
--- a/
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java
+++ b/
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java
@@
-6,12
+6,18
@@
import net.mograsim.logic.ui.model.components.atomic.GUINandGate;
import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent;
import net.mograsim.logic.ui.model.wires.GUIWire;
import net.mograsim.logic.ui.model.wires.Pin;
import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent;
import net.mograsim.logic.ui.model.wires.GUIWire;
import net.mograsim.logic.ui.model.wires.Pin;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
public class GUIfulladder extends SimpleRectangularSubmodelComponent
{
public GUIfulladder(ViewModelModifiable model)
{
public class GUIfulladder extends SimpleRectangularSubmodelComponent
{
public GUIfulladder(ViewModelModifiable model)
{
- super(model, 1, "GUIfulladder");
+ this(model, null);
+ }
+
+ public GUIfulladder(ViewModelModifiable model, String name)
+ {
+ super(model, 1, "GUIfulladder", name);
setSubmodelScale(.4);
setInputPins("A", "B", "C");
setOutputPins("Y", "Z");
setSubmodelScale(.4);
setInputPins("A", "B", "C");
setOutputPins("Y", "Z");
@@
-45,4
+51,9
@@
public class GUIfulladder extends SimpleRectangularSubmodelComponent
new Point(52.5, 35), new Point(52.5, 45));
new GUIWire(submodelModifiable, nandZ.getPin("Y"), Z);
}
new Point(52.5, 35), new Point(52.5, 45));
new GUIWire(submodelModifiable, nandZ.getPin("Y"), Z);
}
+
+ static
+ {
+ IndirectGUIComponentCreator.setComponentSupplier(GUIfulladder.class.getCanonicalName(), (m, p, n) -> new GUIfulladder(m, n));
+ }
}
\ No newline at end of file
}
\ No newline at end of file