1 package era.mi.gui.model.wires;
3 import era.mi.gui.ColorHelper;
4 import era.mi.gui.model.ViewModel;
5 import era.mi.gui.model.components.GUIComponent;
6 import era.mi.logic.types.BitVectorFormatter;
7 import era.mi.logic.wires.Wire.ReadEnd;
8 import net.haspamelodica.swt.helper.gcs.GeneralGC;
9 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
11 public class WireCrossPoint extends GUIComponent
15 public WireCrossPoint(ViewModel model)
19 addPin(new Pin(this, 0, 0));
23 public void render(GeneralGC gc, Rectangle visibleRegion)
25 ColorHelper.executeWithDifferentBackground(gc, BitVectorFormatter.formatAsColor(end), () -> gc.fillOval(-1, -1, 2, 2));
28 public void setLogicModelBinding(ReadEnd end)
31 end.addObserver((i, o) -> callComponentChangedListeners());