projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restructured ComponentAdapter; added ManualSwitchAdapter
[Mograsim.git]
/
LogicUI
/
src
/
era
/
mi
/
gui
/
model
/
wires
/
WireCrossPoint.java
diff --git
a/LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java
b/LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java
index
ebe30c3
..
73d98f5
100644
(file)
--- a/
LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java
+++ b/
LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java
@@
-11,12
+11,14
@@
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
public class WireCrossPoint extends GUIComponent
{
private ReadEnd end;
public class WireCrossPoint extends GUIComponent
{
private ReadEnd end;
+ private final int logicWidth;
- public WireCrossPoint(ViewModel model)
+ public WireCrossPoint(ViewModel model
, int logicWidth
)
{
super(model);
{
super(model);
+ this.logicWidth = logicWidth;
setSize(0, 0);
setSize(0, 0);
- addPin(new Pin(this, 0, 0));
+ addPin(new Pin(this,
logicWidth,
0, 0));
}
@Override
}
@Override
@@
-28,6
+30,11
@@
public class WireCrossPoint extends GUIComponent
public void setLogicModelBinding(ReadEnd end)
{
this.end = end;
public void setLogicModelBinding(ReadEnd end)
{
this.end = end;
- end.addObserver((i, o) -> callComponentChangedListeners());
+ end.addObserver((i, o) -> callComponentLookChangedListeners());
+ }
+
+ public int getLogicWidth()
+ {
+ return logicWidth;
}
}
\ No newline at end of file
}
}
\ No newline at end of file