Title Block added as one of factory building blocks

This commit is contained in:
Bane Stojkovic
2022-12-14 18:31:28 +01:00
parent 063cfde769
commit 796c825f02
4 changed files with 632 additions and 11 deletions
@@ -178,22 +178,13 @@ public class BuildingBlockManager {
if (System.getProperty("org.diylc.WriteStaticBlocks", "false").equalsIgnoreCase("true")) {
Map<String, List<IDIYComponent<?>>> defaultBlockMap =
new HashMap<String, List<IDIYComponent<?>>>();
// unify default and user-variants
for (Map.Entry<String, List<IDIYComponent<?>>> entry : blocks.entrySet()) {
if (defaultBlockMap.containsKey(entry.getKey())) {
defaultBlockMap.get(entry.getKey()).addAll(entry.getValue());
} else {
defaultBlockMap.put(entry.getKey(), entry.getValue());
}
}
defaultBlockMap.put(blockName, blockComponents);
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(BLOCKS_FILE_NAME));
XStream xStream = new XStream(new DomDriver());
xStream.addPermission(AnyTypePermission.ANY);
xStream.toXML(defaultBlockMap, out);
out.close();
// no more user variants
configManager.writeValue(IBlockProcessor.BLOCKS_KEY, null);
LOG.info("Saved default blocks");
} catch (IOException e) {
LOG.error("Could not save default blocks", e);
@@ -4246,6 +4246,10 @@
<changeType>NEW_FEATURE</changeType>
<description>Show component values in the project explorer</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Title Block added as one of factory building blocks</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Ability to use up/down arrow keys in the project explorer to select components</description>
@@ -4268,7 +4272,7 @@
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>DIL IC pin labels don't match between the rendered values and values in the netlist</description>
<description>DIL IC pin labels incorrect in the netlist</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
+606
View File
@@ -0,0 +1,606 @@
<map>
<entry>
<string>Title Block</string>
<list>
<org.diylc.components.shapes.Rectangle>
<name>RECT1</name>
<alpha>127</alpha>
<value></value>
<controlPoints>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.7007874015748</x>
<y>149.60629921259843</y>
</java.awt.geom.Point2D_-Double>
</controlPoints>
<firstPoint>
<x>0.0</x>
<y>0.0</y>
</firstPoint>
<secondPoint>
<x>393.7007874015748</x>
<y>149.60629921259843</y>
</secondPoint>
<color>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</color>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<borderThickness>
<value>0.5</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</borderThickness>
<edgeRadius>
<value>0.0</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</edgeRadius>
</org.diylc.components.shapes.Rectangle>
<org.diylc.components.connectivity.Line>
<name>LN1</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>188.9763779527559</x>
<y>149.60629921259843</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>188.9763779527559</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN2</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.70078740157487</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN3</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>55.118110236220474</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.7007874015748</x>
<y>55.118110236220474</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN4</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>86.61417322834646</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.70078740157476</x>
<y>86.61417322834646</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.misc.Label>
<name>LAB1</name>
<point>
<x>204.7244094488189</x>
<y>133.85826771653544</y>
</point>
<text>revision</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB2</name>
<point>
<x>291.3385826771654</x>
<y>133.85826771653544</y>
</point>
<text>1.0.0</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB3</name>
<point>
<x>15.748031496062993</x>
<y>133.85826771653544</y>
</point>
<text>updated</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB4</name>
<point>
<x>86.61417322834646</x>
<y>133.85826771653544</y>
</point>
<text>1/1/2020</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB5</name>
<point>
<x>47.24409448818898</x>
<y>70.86614173228347</y>
</point>
<text>drawn by</text>
<font reference="../../org.diylc.components.misc.Label/font"/>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB6</name>
<point>
<x>31.496062992125985</x>
<y>15.748031496062993</y>
</point>
<text>title</text>
<font reference="../../org.diylc.components.misc.Label/font"/>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB7</name>
<point>
<x>188.9763779527559</x>
<y>70.86614173228347</y>
</point>
<text>Author Name</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB8</name>
<point>
<x>188.9763779527559</x>
<y>31.496062992125985</y>
</point>
<text>My Cool Project</text>
<font>
<size class="float">20.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>255</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB9</name>
<point>
<x>15.748031496062993</x>
<y>102.36220472440945</y>
</point>
<text>website</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB10</name>
<point>
<x>188.9763779527559</x>
<y>102.36220472440945</y>
</point>
<text>www.mysite.com/myproject</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
</list>
</entry>
</map>
+20
View File
@@ -42,15 +42,22 @@
6 throws / 6 positions
7 throws / 7 positions
8 throws / 8 positions
9 Pin Socket 1 <font color='gray'>[DLH]</font>
9 throws / 9 positions
A-O-I REGULATOR
AC
AWG
Alternate
Altoid Minty Copper Perfboard <font color='gray'>[pixelwaster]</font>
Altoid Minty Plain Perfboard <font color='gray'>[pixelwaster]</font>
Altoid Minty Vero Board <font color='gray'>[pixelwaster]</font>
And
Angle Offset
B-C-E BJT
Background
Bi-Color LED 2-pin
Bi-Color LED 3-pin
Bias Pot 1 <font color='gray'>[DLH]</font>
Box
C-B-E BJT
Circle
@@ -90,6 +97,8 @@ English
Español
Filament Voltage
Français
Fuse Holder
Fuse Holder 2 <font color='gray'>[DLH]</font>
G-D-S JFET
G-D-S MOSFET
G-O-I REGULATOR
@@ -98,9 +107,12 @@ G-S-D MOSFET
Generate DIYLC Netlist (excl. Switches)
Generate DIYLC Netlist (incl. Switches)
Gray
Ground Verical <font color='gray'>[DLH]</font>
Humbucking - 4 leads
I-G-O REGULATOR
Italiano
Jack 11 <font color='gray'>[DLH]</font>
Jack 12A <font color='gray'>[DLH]</font>
Lin
Log
Markers
@@ -126,7 +138,10 @@ PCB
PNP
Poles
Português
Q Pad H
R Pad
Rectangle
Relay 1 - H <font color='gray'>[DLH]</font>
Rev log
S-G-D JFET
S-G-D MOSFET
@@ -147,9 +162,14 @@ Source Style
Source Type
Srpski
Stroke
Switch DPDT <font color='gray'>[DLH]</font>
Switch SPDT <font color='gray'>[DLH]</font>
TO-92 w/ 2 Leads
TO-92 w/ 3 Leads
Ten
Terminal
Timing
Title Block
Tubular Beveled
Xnor
Xor