public class WireCrossPoint extends GUIComponent
{
+ private final Pin pin;
+
private ReadEnd end;
private final int logicWidth;
super(model);
this.logicWidth = logicWidth;
setSize(0, 0);
- addPin(new Pin(this, logicWidth, 0, 0));
+ addPin(this.pin = new Pin(this, logicWidth, 0, 0));
}
@Override
{
return logicWidth;
}
+
+ public Pin getPin()
+ {
+ return pin;
+ }
}
\ No newline at end of file
Map<GUIComponent, Component> oneToOneComponents = new HashMap<>();
for (GUIComponent guiComp : viewModel.getComponents())
{
- // WireCrossPoints just vanish
if (!(guiComp instanceof WireCrossPoint))
oneToOneComponents.put(guiComp, createAndLinkComponent(timeline, params, guiComp, logicWiresPerPinUnmodifiable,
componentAdapters.get(guiComp.getClass())));
+ else
+ {
+ WireCrossPoint guiCompCasted = (WireCrossPoint) guiComp;
+ guiCompCasted.setLogicModelBinding(logicWiresPerPin.get(guiCompCasted.getPin()).createReadOnlyEnd());
+ }
}
// TODO handle complex components