X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fmodel%2Fwires%2FPin.java;h=abafc07125746ee41cccf422960f8663262718ac;hb=80bfbd8ebf0ad8a7ad98584544a0c73f43e6f3b6;hp=cf596405d651fb9c7093f8482680bf421a152f0c;hpb=8eb61f917f31b0cff935538606df04e1c610bdf9;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/model/wires/Pin.java b/LogicUI/src/era/mi/gui/model/wires/Pin.java index cf596405..abafc071 100644 --- a/LogicUI/src/era/mi/gui/model/wires/Pin.java +++ b/LogicUI/src/era/mi/gui/model/wires/Pin.java @@ -11,15 +11,17 @@ import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; public class Pin { public final GUIComponent component; + public final int logicWidth; protected double relX; protected double relY; - private final List> pinMovedListeners; + private final List> pinMovedListeners; - public Pin(GUIComponent component, double relX, double relY) + public Pin(GUIComponent component, int logicWidth, double relX, double relY) { this.component = component; + this.logicWidth = logicWidth; this.relX = relX; this.relY = relY; @@ -50,9 +52,9 @@ public class Pin } // @formatter:off - public void addPinMovedListener (Consumer listener){pinMovedListeners.add (listener);} + public void addPinMovedListener (Consumer listener){pinMovedListeners.add (listener);} - public void removePinMovedListener(Consumer listener){pinMovedListeners.remove(listener);} + public void removePinMovedListener(Consumer listener){pinMovedListeners.remove(listener);} private void callPinMovedListeners() {pinMovedListeners.forEach(l -> l.accept(this));} // @formatter:on