mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 09:24:42 -04:00
Added simple Text which can be placed on the circuit.
This commit is contained in:
parent
d09e9ca9cd
commit
6b31d36e90
@ -1,351 +1,362 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_1n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_2n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_3n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="880" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="540" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="760" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Const</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="320"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="200"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="960" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Data</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>microStep</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="120" y="-60"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="420" y="320"/>
|
||||
<p2 x="440" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="320"/>
|
||||
<p2 x="660" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="320"/>
|
||||
<p2 x="880" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="320"/>
|
||||
<p2 x="220" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="320"/>
|
||||
<p2 x="240" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="240"/>
|
||||
<p2 x="760" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="540" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="260"/>
|
||||
<p2 x="640" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="820" y="260"/>
|
||||
<p2 x="860" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="200"/>
|
||||
<p2 x="200" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="400" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="200"/>
|
||||
<p2 x="620" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="200"/>
|
||||
<p2 x="840" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="280"/>
|
||||
<p2 x="320" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="500" y="280"/>
|
||||
<p2 x="520" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="280"/>
|
||||
<p2 x="660" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="280"/>
|
||||
<p2 x="740" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="940" y="280"/>
|
||||
<p2 x="960" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="280"/>
|
||||
<p2 x="880" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="280"/>
|
||||
<p2 x="240" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="280"/>
|
||||
<p2 x="540" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="740" y="280"/>
|
||||
<p2 x="760" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="280"/>
|
||||
<p2 x="420" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="440" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="840" y="300"/>
|
||||
<p2 x="880" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="300"/>
|
||||
<p2 x="660" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="300"/>
|
||||
<p2 x="440" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="300"/>
|
||||
<p2 x="240" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="280"/>
|
||||
<p2 x="320" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="240"/>
|
||||
<p2 x="640" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="260"/>
|
||||
<p2 x="640" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="280"/>
|
||||
<p2 x="640" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="200"/>
|
||||
<p2 x="400" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="960" y="280"/>
|
||||
<p2 x="960" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="420" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="420" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="740" y="280"/>
|
||||
<p2 x="740" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="840" y="200"/>
|
||||
<p2 x="840" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="200" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="280"/>
|
||||
<p2 x="520" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="200"/>
|
||||
<p2 x="620" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="260"/>
|
||||
<p2 x="860" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="280"/>
|
||||
<p2 x="860" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="280"/>
|
||||
<p2 x="220" y="320"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering>
|
||||
<string>C</string>
|
||||
<string>Q_0</string>
|
||||
<string>Q_1</string>
|
||||
<string>Q_2</string>
|
||||
<string>Q_3</string>
|
||||
</measurementOrdering>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_0n</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="240" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_1n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="440" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_2n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="660" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>JK_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>q_3n</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Default</string>
|
||||
<int>1</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="880" y="280"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="540" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>And</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="760" y="240"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Const</elementName>
|
||||
<elementAttributes/>
|
||||
<pos x="180" y="320"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="200"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="520" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="960" y="340"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Data</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>microStep</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="120" y="-40"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Text</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Synchroner Zähler aus JK-Flipflops</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="140" y="-80"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="420" y="320"/>
|
||||
<p2 x="440" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="320"/>
|
||||
<p2 x="660" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="320"/>
|
||||
<p2 x="880" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="180" y="320"/>
|
||||
<p2 x="220" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="320"/>
|
||||
<p2 x="240" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="240"/>
|
||||
<p2 x="760" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="540" y="240"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="260"/>
|
||||
<p2 x="640" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="820" y="260"/>
|
||||
<p2 x="860" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="200"/>
|
||||
<p2 x="200" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="400" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="200"/>
|
||||
<p2 x="620" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="200"/>
|
||||
<p2 x="840" y="200"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="300" y="280"/>
|
||||
<p2 x="320" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="500" y="280"/>
|
||||
<p2 x="520" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="280"/>
|
||||
<p2 x="660" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="280"/>
|
||||
<p2 x="740" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="940" y="280"/>
|
||||
<p2 x="960" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="280"/>
|
||||
<p2 x="880" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="280"/>
|
||||
<p2 x="240" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="280"/>
|
||||
<p2 x="540" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="740" y="280"/>
|
||||
<p2 x="760" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="280"/>
|
||||
<p2 x="420" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="440" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="840" y="300"/>
|
||||
<p2 x="880" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="300"/>
|
||||
<p2 x="660" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="300"/>
|
||||
<p2 x="440" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="300"/>
|
||||
<p2 x="240" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="320" y="280"/>
|
||||
<p2 x="320" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="240"/>
|
||||
<p2 x="640" y="260"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="260"/>
|
||||
<p2 x="640" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="640" y="280"/>
|
||||
<p2 x="640" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="200"/>
|
||||
<p2 x="400" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="960" y="280"/>
|
||||
<p2 x="960" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="240"/>
|
||||
<p2 x="420" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="420" y="280"/>
|
||||
<p2 x="420" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="740" y="280"/>
|
||||
<p2 x="740" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="840" y="200"/>
|
||||
<p2 x="840" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="200" y="200"/>
|
||||
<p2 x="200" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="520" y="280"/>
|
||||
<p2 x="520" y="340"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="620" y="200"/>
|
||||
<p2 x="620" y="300"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="260"/>
|
||||
<p2 x="860" y="280"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="280"/>
|
||||
<p2 x="860" y="320"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="220" y="280"/>
|
||||
<p2 x="220" y="320"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering>
|
||||
<string>C</string>
|
||||
<string>Q_0</string>
|
||||
<string>Q_1</string>
|
||||
<string>Q_2</string>
|
||||
<string>Q_3</string>
|
||||
</measurementOrdering>
|
||||
</circuit>
|
@ -1,214 +1,225 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Frequency</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="280" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="560" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="720" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="880" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="480" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="640" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="800" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Data</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>microStep</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="220" y="100"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="540" y="360"/>
|
||||
<p2 x="560" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="360"/>
|
||||
<p2 x="640" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="360"/>
|
||||
<p2 x="400" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="360"/>
|
||||
<p2 x="480" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="360"/>
|
||||
<p2 x="720" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="760" y="360"/>
|
||||
<p2 x="800" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="360"/>
|
||||
<p2 x="880" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="380"/>
|
||||
<p2 x="600" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="380"/>
|
||||
<p2 x="440" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="380"/>
|
||||
<p2 x="760" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="560" y="360"/>
|
||||
<p2 x="560" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="880" y="360"/>
|
||||
<p2 x="880" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="360"/>
|
||||
<p2 x="400" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="360"/>
|
||||
<p2 x="720" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="360"/>
|
||||
<p2 x="440" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="760" y="360"/>
|
||||
<p2 x="760" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="360"/>
|
||||
<p2 x="600" y="380"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<version>1</version>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation rotation="3"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="400" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Clock</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>C</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Frequency</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="280" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="560" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="720" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>rotation</string>
|
||||
<rotation reference="../../../../visualElement/elementAttributes/entry/rotation"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="880" y="460"/>
|
||||
<rotate>3</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_0</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="320" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="480" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_2</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="640" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>T_FF</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>valueIsProbe</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Q_3</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="800" y="360"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Data</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>microStep</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Data</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="220" y="120"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Text</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>Asynchroner Zähler aus T-Flipflops</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="260" y="80"/>
|
||||
<rotate>0</rotate>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="540" y="360"/>
|
||||
<p2 x="560" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="360"/>
|
||||
<p2 x="640" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="360"/>
|
||||
<p2 x="400" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="280" y="360"/>
|
||||
<p2 x="320" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="360"/>
|
||||
<p2 x="480" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="360"/>
|
||||
<p2 x="720" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="760" y="360"/>
|
||||
<p2 x="800" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="860" y="360"/>
|
||||
<p2 x="880" y="360"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="540" y="380"/>
|
||||
<p2 x="600" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="380"/>
|
||||
<p2 x="440" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="700" y="380"/>
|
||||
<p2 x="760" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="560" y="360"/>
|
||||
<p2 x="560" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="880" y="360"/>
|
||||
<p2 x="880" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="400" y="360"/>
|
||||
<p2 x="400" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="720" y="360"/>
|
||||
<p2 x="720" y="460"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="440" y="360"/>
|
||||
<p2 x="440" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="760" y="360"/>
|
||||
<p2 x="760" y="380"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="600" y="360"/>
|
||||
<p2 x="600" y="380"/>
|
||||
</wire>
|
||||
</wires>
|
||||
</circuit>
|
@ -79,36 +79,38 @@ public class GraphicSVG implements Graphic, Closeable {
|
||||
|
||||
@Override
|
||||
public void drawLine(Vector p1, Vector p2, Style style) {
|
||||
try {
|
||||
w.write("<line x1=\"" + p1.x + "\" y1=\"" + p1.y + "\" x2=\"" + p2.x + "\" y2=\"" + p2.y + "\" stroke=\"" + getColor(style) + "\" stroke-linecap=\"square\" stroke-width=\"" + getStrokeWidth(style) + "\"");
|
||||
if (style != Style.INVISIBLE)
|
||||
try {
|
||||
w.write("<line x1=\"" + p1.x + "\" y1=\"" + p1.y + "\" x2=\"" + p2.x + "\" y2=\"" + p2.y + "\" stroke=\"" + getColor(style) + "\" stroke-linecap=\"square\" stroke-width=\"" + getStrokeWidth(style) + "\"");
|
||||
// if (style.isDashed())
|
||||
// addStrokeDash(w, style.getDashArray());
|
||||
w.write(" />\n");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
w.write(" />\n");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPolygon(Polygon p, Style style) {
|
||||
try {
|
||||
w.write("<path d=\"M " + str(p.get(0)));
|
||||
for (int i = 1; i < p.size(); i++)
|
||||
w.write(" L " + str(p.get(i)));
|
||||
if (style != Style.INVISIBLE)
|
||||
try {
|
||||
w.write("<path d=\"M " + str(p.get(0)));
|
||||
for (int i = 1; i < p.size(); i++)
|
||||
w.write(" L " + str(p.get(i)));
|
||||
|
||||
if (p.isClosed())
|
||||
w.write(" Z");
|
||||
if (p.isClosed())
|
||||
w.write(" Z");
|
||||
|
||||
w.write("\"");
|
||||
w.write("\"");
|
||||
// if (style.isDashed())
|
||||
// addStrokeDash(w, style.getDashArray());
|
||||
if (style.isFilled() && p.isClosed())
|
||||
w.write(" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"" + getColor(style) + "\"/>\n");
|
||||
else
|
||||
w.write(" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"none\"/>\n");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (style.isFilled() && p.isClosed())
|
||||
w.write(" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"" + getColor(style) + "\"/>\n");
|
||||
else
|
||||
w.write(" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"none\"/>\n");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static double getStrokeWidth(Style style) {
|
||||
@ -117,20 +119,21 @@ public class GraphicSVG implements Graphic, Closeable {
|
||||
|
||||
@Override
|
||||
public void drawCircle(Vector p1, Vector p2, Style style) {
|
||||
try {
|
||||
Vector c = p1.add(p2).div(2);
|
||||
double r = Math.abs(p2.sub(p1).x) / 2.0;
|
||||
if (style.isFilled())
|
||||
w.write("<circle cx=\"" + c.x + "\" cy=\"" + c.y + "\" r=\"" + r + "\" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"" + getColor(style) + "\" />\n");
|
||||
else {
|
||||
w.write("<circle cx=\"" + c.x + "\" cy=\"" + c.y + "\" r=\"" + r + "\" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"none\"");
|
||||
if (style != Style.INVISIBLE)
|
||||
try {
|
||||
Vector c = p1.add(p2).div(2);
|
||||
double r = Math.abs(p2.sub(p1).x) / 2.0;
|
||||
if (style.isFilled())
|
||||
w.write("<circle cx=\"" + c.x + "\" cy=\"" + c.y + "\" r=\"" + r + "\" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"" + getColor(style) + "\" />\n");
|
||||
else {
|
||||
w.write("<circle cx=\"" + c.x + "\" cy=\"" + c.y + "\" r=\"" + r + "\" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"none\"");
|
||||
// if (style.isDashed())
|
||||
// addStrokeDash(w, style.getDashArray());
|
||||
w.write(" />\n");
|
||||
w.write(" />\n");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,28 +27,32 @@ public class GraphicSwing implements Graphic {
|
||||
|
||||
@Override
|
||||
public void drawLine(Vector p1, Vector p2, Style style) {
|
||||
applyStyle(style);
|
||||
gr.drawLine(p1.x, p1.y, p2.x, p2.y);
|
||||
if (style != Style.INVISIBLE) {
|
||||
applyStyle(style);
|
||||
gr.drawLine(p1.x, p1.y, p2.x, p2.y);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPolygon(Polygon p, Style style) {
|
||||
applyStyle(style);
|
||||
Path2D path = new GeneralPath();
|
||||
boolean first = true;
|
||||
for (Vector v : p)
|
||||
if (first) {
|
||||
first = false;
|
||||
path.moveTo(v.x, v.y);
|
||||
} else
|
||||
path.lineTo(v.x, v.y);
|
||||
if (style != Style.INVISIBLE) {
|
||||
applyStyle(style);
|
||||
Path2D path = new GeneralPath();
|
||||
boolean first = true;
|
||||
for (Vector v : p)
|
||||
if (first) {
|
||||
first = false;
|
||||
path.moveTo(v.x, v.y);
|
||||
} else
|
||||
path.lineTo(v.x, v.y);
|
||||
|
||||
if (p.isClosed())
|
||||
path.closePath();
|
||||
if (p.isClosed())
|
||||
path.closePath();
|
||||
|
||||
if (style.isFilled())
|
||||
gr.fill(path);
|
||||
gr.draw(path);
|
||||
if (style.isFilled())
|
||||
gr.fill(path);
|
||||
gr.draw(path);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,6 +19,7 @@ public class Style {
|
||||
public static final Style DASH = new Style(1, false, Color.BLACK, new float[]{4, 4});
|
||||
public static final Style SHAPE_PIN = new Style(4, false, Color.GRAY, 18, null);
|
||||
public static final Style HIGHLIGHT = new Style(4, false, Color.CYAN);
|
||||
public static final Style INVISIBLE = new Style(0, false, Color.WHITE);
|
||||
|
||||
private final int thickness;
|
||||
private final boolean filled;
|
||||
|
@ -51,6 +51,7 @@ public class ElementLibrary implements Iterable<ElementLibrary.ElementContainer>
|
||||
add(Out.SEVENHEXDESCRIPTION, menu);
|
||||
add(Terminal.DESCRIPTION, menu);
|
||||
add(DummyElement.DATADESCRIPTION, menu);
|
||||
add(DummyElement.TEXTDESCRIPTION, menu);
|
||||
|
||||
menu = Lang.get("lib_mux");
|
||||
add(Multiplexer.DESCRIPTION, menu);
|
||||
|
@ -1,24 +0,0 @@
|
||||
package de.neemann.digital.draw.shapes;
|
||||
|
||||
import de.neemann.digital.draw.elements.Pin;
|
||||
|
||||
/**
|
||||
* @author hneemann
|
||||
*/
|
||||
public class OutputPinInfo {
|
||||
private final String name;
|
||||
private final Pin.Direction direction;
|
||||
|
||||
public OutputPinInfo(String name, boolean bidirectional) {
|
||||
this.name = name;
|
||||
this.direction = bidirectional ? Pin.Direction.both : Pin.Direction.output;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Pin.Direction getDirection() {
|
||||
return direction;
|
||||
}
|
||||
}
|
@ -60,6 +60,8 @@ public final class ShapeFactory {
|
||||
|
||||
map.put(Splitter.DESCRIPTION.getName(), SplitterShape::new);
|
||||
map.put(Driver.DESCRIPTION.getName(), DriverShape::new);
|
||||
|
||||
map.put(DummyElement.TEXTDESCRIPTION.getName(), TextShape::new);
|
||||
}
|
||||
|
||||
private PinDescription[] outputInfos(ElementTypeDescription description, ElementAttributes attributes) {
|
||||
|
52
src/main/java/de/neemann/digital/draw/shapes/TextShape.java
Normal file
52
src/main/java/de/neemann/digital/draw/shapes/TextShape.java
Normal file
@ -0,0 +1,52 @@
|
||||
package de.neemann.digital.draw.shapes;
|
||||
|
||||
import de.neemann.digital.core.Observer;
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.draw.elements.IOState;
|
||||
import de.neemann.digital.draw.elements.Pins;
|
||||
import de.neemann.digital.draw.graphics.*;
|
||||
import de.neemann.digital.lang.Lang;
|
||||
|
||||
/**
|
||||
* Simple text
|
||||
*
|
||||
* @author hneemann
|
||||
*/
|
||||
public class TextShape implements Shape {
|
||||
private final String label;
|
||||
|
||||
/**
|
||||
* Create a new instance
|
||||
*
|
||||
* @param attr attributes
|
||||
*/
|
||||
public TextShape(ElementAttributes attr) {
|
||||
String text = attr.getLabel();
|
||||
if (text.length() == 0)
|
||||
text = Lang.get("elem_Text");
|
||||
this.label = text;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pins getPins() {
|
||||
return new Pins();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Interactor applyStateMonitor(IOState ioState, Observer guiObserver) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawTo(Graphic graphic, boolean highLight) {
|
||||
int size = Style.NORMAL.getFontSize();
|
||||
graphic.drawPolygon(
|
||||
new Polygon(true)
|
||||
.add(0, 0)
|
||||
.add(size * 2, 0)
|
||||
.add(size * 2, size)
|
||||
.add(0, size), Style.INVISIBLE);
|
||||
graphic.drawText(new Vector(0, 0), new Vector(1, 0), label, Orientation.LEFTTOP, Style.NORMAL);
|
||||
}
|
||||
}
|
@ -22,6 +22,12 @@ public class DummyElement implements Element {
|
||||
public static final ElementTypeDescription DATADESCRIPTION = new ElementTypeDescription("Data", DummyElement.class)
|
||||
.addAttribute(AttributeKey.MicroStep);
|
||||
|
||||
/**
|
||||
* The TextElement description
|
||||
*/
|
||||
public static final ElementTypeDescription TEXTDESCRIPTION = new ElementTypeDescription("Text", DummyElement.class)
|
||||
.addAttribute(AttributeKey.Label);
|
||||
|
||||
/**
|
||||
* Creates a new dummy element
|
||||
*
|
||||
|
@ -96,6 +96,7 @@ elem_Reset_tt=Der Ausgang dieses Elements ist Null, solange sich das Model nach
|
||||
elem_Break_tt=Wenn der Eingang dieses Elementes zu Eins wird, wird der schnelle Simulationslauf beendet.\nDieses Element kann verwendet werden, um einen Assemblerbefehl BRK zu implementieren.\nEs kann dann ein Programm bis zum n\u00E4chsten BRK-Befehl ausgef\u00FChrt werden.
|
||||
elem_RAMDualPort_tt=Ein RAM Modul mit getrennten Anschl\u00FCssen f\u00FCr Lesen und Schreiben.\nEin gibt einen Eingang f\u00FCr das Beschreiben und einen Ausgang f\u00FCr das Auslesen der gespeicherten Daten.
|
||||
elem_RAMSinglePort_tt=Ein RAM Module mit einem bidirektionellem Anschluss f\u00FCr das Lesen und Schreiben von Daten.
|
||||
elem_Text=Text
|
||||
|
||||
rot_0=0\u00B0
|
||||
rot_90=90\u00B0
|
||||
|
@ -96,6 +96,7 @@ elem_Add=Add
|
||||
elem_Sub=Sub
|
||||
elem_Mul=Mul
|
||||
elem_Comparator=Comparator
|
||||
elem_Text=Text
|
||||
|
||||
rot_0=0\u00B0
|
||||
rot_90=90\u00B0
|
||||
|
Loading…
x
Reference in New Issue
Block a user