projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GUIBitDisplay, GUIManualSwitch, WCP now "directly" know their logicWidth
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
components
/
atomic
/
GUIBitDisplay.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java
index
5574d32
..
9d6b57e
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIBitDisplay.java
@@
-27,6
+27,7
@@
public class GUIBitDisplay extends GUIComponent
private static final double height = 15;
private static final double fontHeight = 5;
private static final double height = 15;
private static final double fontHeight = 5;
+ public final int logicWidth;
private final Pin inputPin;
private final LogicObserver logicObs;
private final Pin inputPin;
private final LogicObserver logicObs;
@@
-40,6
+41,7
@@
public class GUIBitDisplay extends GUIComponent
public GUIBitDisplay(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
public GUIBitDisplay(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
+ this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
@@
-93,7
+95,7
@@
public class GUIBitDisplay extends GUIComponent
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
- return new JsonPrimitive(
inputPin.
logicWidth);
+ return new JsonPrimitive(logicWidth);
}
static
}
static