made a field to a local var

This commit is contained in:
hneemann 2016-04-15 21:03:50 +02:00
parent ee2513d013
commit 1cc4df08d0
3 changed files with 105 additions and 75 deletions

View File

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<circuit>
<version>1</version>
<visualElements>
<visualElement>
<elementName>And</elementName>
<elementAttributes/>
<pos x="300" y="180"/>
<pos x="600" y="360"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>Const</elementName>
<elementAttributes/>
<pos x="220" y="210"/>
<pos x="440" y="420"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
@ -21,7 +22,7 @@
<string>Rot</string>
</entry>
</elementAttributes>
<pos x="350" y="150"/>
<pos x="700" y="300"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
@ -41,7 +42,7 @@
<string>Gelb</string>
</entry>
</elementAttributes>
<pos x="350" y="170"/>
<pos x="700" y="340"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
@ -61,30 +62,34 @@
<string>Grün</string>
</entry>
</elementAttributes>
<pos x="350" y="190"/>
<pos x="700" y="380"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>Clock</elementName>
<elementAttributes>
<entry>
<string>runRealTime</string>
<boolean>true</boolean>
</entry>
<entry>
<string>Label</string>
<string>Clock</string>
</entry>
</elementAttributes>
<pos x="130" y="140"/>
<pos x="260" y="280"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>Or</elementName>
<elementAttributes/>
<pos x="170" y="180"/>
<pos x="340" y="360"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>Not</elementName>
<elementAttributes/>
<pos x="140" y="200"/>
<pos x="280" y="400"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
@ -95,142 +100,156 @@
<string>Feuer</string>
</entry>
</elementAttributes>
<pos x="130" y="200"/>
<pos x="260" y="400"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>MS-JK.dig</elementName>
<elementAttributes/>
<pos x="240" y="130"/>
<pos x="480" y="260"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>MS-JK.dig</elementName>
<elementAttributes/>
<pos x="240" y="190"/>
<pos x="480" y="380"/>
<rotate>0</rotate>
</visualElement>
<visualElement>
<elementName>Data</elementName>
<elementAttributes>
<entry>
<string>maxStepCount</string>
<int>22</int>
</entry>
</elementAttributes>
<pos x="140" y="20"/>
<rotate>0</rotate>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="220" y="210"/>
<p2 x="230" y="210"/>
<p1 x="540" y="400"/>
<p2 x="600" y="400"/>
</wire>
<wire>
<p1 x="230" y="210"/>
<p2 x="240" y="210"/>
<p1 x="440" y="400"/>
<p2 x="480" y="400"/>
</wire>
<wire>
<p1 x="230" y="130"/>
<p2 x="240" y="130"/>
<p1 x="260" y="400"/>
<p2 x="280" y="400"/>
</wire>
<wire>
<p1 x="270" y="130"/>
<p2 x="290" y="130"/>
<p1 x="320" y="400"/>
<p2 x="340" y="400"/>
</wire>
<wire>
<p1 x="210" y="180"/>
<p2 x="290" y="180"/>
<p1 x="320" y="320"/>
<p2 x="420" y="320"/>
</wire>
<wire>
<p1 x="160" y="180"/>
<p2 x="170" y="180"/>
<p1 x="440" y="420"/>
<p2 x="480" y="420"/>
</wire>
<wire>
<p1 x="290" y="180"/>
<p2 x="300" y="180"/>
<p1 x="460" y="260"/>
<p2 x="480" y="260"/>
</wire>
<wire>
<p1 x="230" y="150"/>
<p2 x="240" y="150"/>
<p1 x="540" y="260"/>
<p2 x="580" y="260"/>
</wire>
<wire>
<p1 x="280" y="150"/>
<p2 x="350" y="150"/>
<p1 x="460" y="340"/>
<p2 x="560" y="340"/>
</wire>
<wire>
<p1 x="270" y="200"/>
<p2 x="300" y="200"/>
<p1 x="560" y="340"/>
<p2 x="700" y="340"/>
</wire>
<wire>
<p1 x="220" y="200"/>
<p2 x="240" y="200"/>
<p1 x="420" y="360"/>
<p2 x="580" y="360"/>
</wire>
<wire>
<p1 x="130" y="200"/>
<p2 x="140" y="200"/>
<p1 x="320" y="360"/>
<p2 x="340" y="360"/>
</wire>
<wire>
<p1 x="160" y="200"/>
<p2 x="170" y="200"/>
<p1 x="580" y="360"/>
<p2 x="600" y="360"/>
</wire>
<wire>
<p1 x="230" y="170"/>
<p2 x="280" y="170"/>
<p1 x="260" y="280"/>
<p2 x="440" y="280"/>
</wire>
<wire>
<p1 x="160" y="160"/>
<p2 x="210" y="160"/>
<p1 x="540" y="280"/>
<p2 x="560" y="280"/>
</wire>
<wire>
<p1 x="280" y="170"/>
<p2 x="350" y="170"/>
<p1 x="440" y="280"/>
<p2 x="480" y="280"/>
</wire>
<wire>
<p1 x="130" y="140"/>
<p2 x="220" y="140"/>
<p1 x="460" y="300"/>
<p2 x="480" y="300"/>
</wire>
<wire>
<p1 x="270" y="140"/>
<p2 x="280" y="140"/>
<p1 x="560" y="300"/>
<p2 x="700" y="300"/>
</wire>
<wire>
<p1 x="220" y="140"/>
<p2 x="240" y="140"/>
<p1 x="540" y="380"/>
<p2 x="560" y="380"/>
</wire>
<wire>
<p1 x="270" y="190"/>
<p2 x="280" y="190"/>
<p1 x="660" y="380"/>
<p2 x="700" y="380"/>
</wire>
<wire>
<p1 x="330" y="190"/>
<p2 x="350" y="190"/>
<p1 x="400" y="380"/>
<p2 x="480" y="380"/>
</wire>
<wire>
<p1 x="200" y="190"/>
<p2 x="240" y="190"/>
<p1 x="320" y="320"/>
<p2 x="320" y="360"/>
</wire>
<wire>
<p1 x="160" y="160"/>
<p2 x="160" y="180"/>
<p1 x="560" y="340"/>
<p2 x="560" y="380"/>
</wire>
<wire>
<p1 x="290" y="130"/>
<p2 x="290" y="180"/>
<p1 x="560" y="280"/>
<p2 x="560" y="300"/>
</wire>
<wire>
<p1 x="210" y="160"/>
<p2 x="210" y="180"/>
<p1 x="580" y="260"/>
<p2 x="580" y="360"/>
</wire>
<wire>
<p1 x="230" y="130"/>
<p2 x="230" y="150"/>
<p1 x="420" y="320"/>
<p2 x="420" y="360"/>
</wire>
<wire>
<p1 x="230" y="150"/>
<p2 x="230" y="170"/>
<p1 x="440" y="280"/>
<p2 x="440" y="400"/>
</wire>
<wire>
<p1 x="280" y="170"/>
<p2 x="280" y="190"/>
<p1 x="460" y="260"/>
<p2 x="460" y="300"/>
</wire>
<wire>
<p1 x="280" y="140"/>
<p2 x="280" y="150"/>
</wire>
<wire>
<p1 x="220" y="140"/>
<p2 x="220" y="200"/>
<p1 x="460" y="300"/>
<p2 x="460" y="340"/>
</wire>
</wires>
<measurementOrdering>
<string>Clock</string>
<string>Feuer</string>
<string>Rot</string>
<string>Gelb</string>
<string>Grün</string>
</measurementOrdering>
</circuit>

View File

@ -52,6 +52,10 @@
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Description</string>
<string>Takt</string>
</entry>
<entry>
<string>Label</string>
<string>C</string>
@ -99,6 +103,10 @@
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Description</string>
<string>Ausgang</string>
</entry>
<entry>
<string>Label</string>
<string>Q</string>
@ -110,6 +118,10 @@
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Description</string>
<string>invertierter Ausgang</string>
</entry>
<entry>
<string>Label</string>
<string>~Q</string>

View File

@ -26,7 +26,6 @@ import java.util.List;
*/
public class DataSetDialog extends JDialog implements ModelStateObserver {
private static final int MAX_SAMPLE_SIZE = 1000;
private final ArrayList<Model.Signal> signals;
private final DataSetComponent dsc;
private final JScrollPane scrollPane;
private DataSet dataSet;
@ -45,7 +44,7 @@ public class DataSetDialog extends JDialog implements ModelStateObserver {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setAlwaysOnTop(true);
signals = model.getSignalsCopy();
ArrayList<Model.Signal> signals = model.getSignalsCopy();
new OrderMerger<String, Model.Signal>(ordering) {
@Override
public boolean equals(Model.Signal a, String b) {