X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fmodel%2Fwires%2FWireCrossPoint.java;fp=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fmodel%2Fwires%2FWireCrossPoint.java;h=0000000000000000000000000000000000000000;hb=a28f7aa0dab4248e99159c5a647676170cb17a4e;hp=04c5f1e8406cc3ef892f693e37d740478de08e5f;hpb=80bfbd8ebf0ad8a7ad98584544a0c73f43e6f3b6;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java b/LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java deleted file mode 100644 index 04c5f1e8..00000000 --- a/LogicUI/src/era/mi/gui/model/wires/WireCrossPoint.java +++ /dev/null @@ -1,49 +0,0 @@ -package era.mi.gui.model.wires; - -import era.mi.gui.ColorHelper; -import era.mi.gui.model.ViewModel; -import era.mi.gui.model.components.GUIComponent; -import era.mi.logic.types.BitVectorFormatter; -import era.mi.logic.wires.Wire.ReadEnd; -import net.haspamelodica.swt.helper.gcs.GeneralGC; -import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; - -public class WireCrossPoint extends GUIComponent -{ - private final Pin pin; - - private ReadEnd end; - private final int logicWidth; - - public WireCrossPoint(ViewModel model, int logicWidth) - { - super(model); - this.logicWidth = logicWidth; - setSize(0, 0); - addPin(this.pin = new Pin(this, logicWidth, 0, 0)); - } - - @Override - public void render(GeneralGC gc, Rectangle visibleRegion) - { - Rectangle bounds = getBounds(); - ColorHelper.executeWithDifferentBackground(gc, BitVectorFormatter.formatAsColor(end), - () -> gc.fillOval(bounds.x - 1, bounds.y - 1, 2, 2)); - } - - public void setLogicModelBinding(ReadEnd end) - { - this.end = end; - end.addObserver((i, o) -> callComponentLookChangedListeners()); - } - - public int getLogicWidth() - { - return logicWidth; - } - - public Pin getPin() - { - return pin; - } -} \ No newline at end of file