projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented GUIAm2901ALUInclSourceDecodeInclFunctionDecode
[Mograsim.git]
/
net.mograsim.logic.ui
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
components
/
SimpleRectangularGUIGate.java
diff --git
a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java
b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java
index
9058d2e
..
96bf11e
100644
(file)
--- a/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java
+++ b/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SimpleRectangularGUIGate.java
@@
-2,6
+2,7
@@
package net.mograsim.logic.ui.model.components;
import java.util.ArrayList;
import java.util.List;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
@@
-26,6
+27,8
@@
public class SimpleRectangularGUIGate extends GUIComponent
private MovablePin outputPin;
private final List<Pin> inputPins;
private MovablePin outputPin;
private final List<Pin> inputPins;
+ public static final String kLogicWidth = "logicWidth";
+
protected SimpleRectangularGUIGate(ViewModelModifiable model, int logicWidth, String label, boolean isInverted)
{
super(model);
protected SimpleRectangularGUIGate(ViewModelModifiable model, int logicWidth, String label, boolean isInverted)
{
super(model);
@@
-74,4
+77,12
@@
public class SimpleRectangularGUIGate extends GUIComponent
if (isInverted)
gc.drawOval(posX + rectWidth, posY + (height - invertedCircleDiam) / 2, invertedCircleDiam, invertedCircleDiam);
}
if (isInverted)
gc.drawOval(posX + rectWidth, posY + (height - invertedCircleDiam) / 2, invertedCircleDiam, invertedCircleDiam);
}
+
+ @Override
+ public Map<String, Object> getInstantiationParameters()
+ {
+ Map<String, Object> m = super.getInstantiationParameters();
+ m.put(kLogicWidth, logicWidth);
+ return m;
+ }
}
\ No newline at end of file
}
\ No newline at end of file