projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added concept of wire width to GUIComponents and GUIWires
[Mograsim.git]
/
LogicUI
/
src
/
era
/
mi
/
gui
/
model
/
wires
/
Pin.java
diff --git
a/LogicUI/src/era/mi/gui/model/wires/Pin.java
b/LogicUI/src/era/mi/gui/model/wires/Pin.java
index
3dc8967
..
abafc07
100644
(file)
--- a/
LogicUI/src/era/mi/gui/model/wires/Pin.java
+++ b/
LogicUI/src/era/mi/gui/model/wires/Pin.java
@@
-11,14
+11,17
@@
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
public class Pin
{
public final GUIComponent component;
public class Pin
{
public final GUIComponent component;
+ public final int logicWidth;
+
protected double relX;
protected double relY;
protected double relX;
protected double relY;
- private final List<Consumer<Pin>> pinMovedListeners;
+ private final List<Consumer<
? super
Pin>> pinMovedListeners;
- public Pin(GUIComponent component, double relX, double relY)
+ public Pin(GUIComponent component,
int logicWidth,
double relX, double relY)
{
this.component = component;
{
this.component = component;
+ this.logicWidth = logicWidth;
this.relX = relX;
this.relY = relY;
this.relX = relX;
this.relY = relY;
@@
-49,9
+52,9
@@
public class Pin
}
// @formatter:off
}
// @formatter:off
- public void addPinMovedListener (Consumer<Pin> listener){pinMovedListeners.add (listener);}
+ public void addPinMovedListener (Consumer<
? super
Pin> listener){pinMovedListeners.add (listener);}
- public void removePinMovedListener(Consumer<Pin> listener){pinMovedListeners.remove(listener);}
+ public void removePinMovedListener(Consumer<
? super
Pin> listener){pinMovedListeners.remove(listener);}
private void callPinMovedListeners() {pinMovedListeners.forEach(l -> l.accept(this));}
// @formatter:on
private void callPinMovedListeners() {pinMovedListeners.forEach(l -> l.accept(this));}
// @formatter:on