projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wires connected to a component now get deleted with the component
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
wires
/
ModelWireCrossPoint.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/ModelWireCrossPoint.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/ModelWireCrossPoint.java
index
f8d32ac
..
0a63499
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/ModelWireCrossPoint.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/ModelWireCrossPoint.java
@@
-5,7
+5,7
@@
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.LogicObserver;
import net.mograsim.logic.core.types.BitVectorFormatter;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
import net.mograsim.logic.core.LogicObserver;
import net.mograsim.logic.core.types.BitVectorFormatter;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
-import net.mograsim.logic.model.model.
View
ModelModifiable;
+import net.mograsim.logic.model.model.
Logic
ModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.serializing.IdentifyParams;
import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.serializing.IdentifyParams;
import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
@@
-46,19
+46,19
@@
public class ModelWireCrossPoint extends ModelComponent
// creation and destruction
// creation and destruction
- public ModelWireCrossPoint(
View
ModelModifiable model, int logicWidth)
+ public ModelWireCrossPoint(
Logic
ModelModifiable model, int logicWidth)
{
this(model, logicWidth, null);
}
{
this(model, logicWidth, null);
}
- public ModelWireCrossPoint(
View
ModelModifiable model, int logicWidth, String name)
+ public ModelWireCrossPoint(
Logic
ModelModifiable model, int logicWidth, String name)
{
super(model, name);
this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(CIRCLE_DIAM, CIRCLE_DIAM);
{
super(model, name);
this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(CIRCLE_DIAM, CIRCLE_DIAM);
- addPin(this.pin = new Pin(this, "", logicWidth, PinUsage.TRISTATE, CIRCLE_RADIUS, CIRCLE_RADIUS));
+ addPin(this.pin = new Pin(
model,
this, "", logicWidth, PinUsage.TRISTATE, CIRCLE_RADIUS, CIRCLE_RADIUS));
}
// pins
}
// pins
@@
-89,7
+89,7
@@
public class ModelWireCrossPoint extends ModelComponent
gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM);
}
gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM);
}
- //
logic
model binding
+ //
core
model binding
/**
* Binds this {@link ModelWireCrossPoint} to the given {@link ReadEnd}: The color of this {@link ModelWireCrossPoint} will now depend on
/**
* Binds this {@link ModelWireCrossPoint} to the given {@link ReadEnd}: The color of this {@link ModelWireCrossPoint} will now depend on
@@
-99,7
+99,7
@@
public class ModelWireCrossPoint extends ModelComponent
*
* @author Daniel Kirschten
*/
*
* @author Daniel Kirschten
*/
- public void set
Logic
ModelBinding(ReadEnd end)
+ public void set
Core
ModelBinding(ReadEnd end)
{
if (this.end != null)
this.end.deregisterObserver(logicObs);
{
if (this.end != null)
this.end.deregisterObserver(logicObs);
@@
-109,9
+109,9
@@
public class ModelWireCrossPoint extends ModelComponent
}
/**
}
/**
- * Returns whether this {@link ModelWireCrossPoint} has a
logic
model binding or not.
+ * Returns whether this {@link ModelWireCrossPoint} has a
core
model binding or not.
*/
*/
- public boolean has
Logic
ModelBinding()
+ public boolean has
Core
ModelBinding()
{
return end != null;
}
{
return end != null;
}