projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added an visual-only text component and modelling helper class
[Mograsim.git]
/
net.mograsim.logic.ui
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
components
/
GUINandGate.java
diff --git
a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINandGate.java
b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINandGate.java
index
8078ddb
..
6a3e694
100644
(file)
--- a/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINandGate.java
+++ b/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUINandGate.java
@@
-1,6
+1,9
@@
package net.mograsim.logic.ui.model.components;
package net.mograsim.logic.ui.model.components;
+import net.mograsim.logic.core.components.gates.NandGate;
import net.mograsim.logic.ui.model.ViewModelModifiable;
import net.mograsim.logic.ui.model.ViewModelModifiable;
+import net.mograsim.logic.ui.modeladapter.ViewLogicModelAdapter;
+import net.mograsim.logic.ui.modeladapter.componentadapters.SimpleGateAdapter;
public class GUINandGate extends SimpleRectangularGUIGate
{
public class GUINandGate extends SimpleRectangularGUIGate
{
@@
-9,4
+12,9
@@
public class GUINandGate extends SimpleRectangularGUIGate
super(model, logicWidth, "&", true);
setInputCount(2);// TODO make variable
}
super(model, logicWidth, "&", true);
setInputCount(2);// TODO make variable
}
+
+ static
+ {
+ ViewLogicModelAdapter.addComponentAdapter(new SimpleGateAdapter<>(GUINandGate.class, NandGate::new));
+ }
}
\ No newline at end of file
}
\ No newline at end of file