add mustang DP3T switch

This commit is contained in:
Andrew Thomas
2017-09-01 20:11:46 -04:00
parent 6c2bb797ad
commit f6d6b9a370
6 changed files with 42 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib1" level="project" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="library" name="lib2" level="project" />
<orderEntry type="module" module-name="diylc-core" />
<orderEntry type="module" module-name="diylc-swing" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://D:/apache-ant/apache-ant-1.10.1/lib/jarbundler-2.3.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
Binary file not shown.
@@ -78,6 +78,17 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
new Point(firstPoint.x + spacing, firstPoint.y + spacing),
new Point(firstPoint.x + spacing, firstPoint.y + 2 * spacing)};
break;
case _DP3T_mustang:
controlPoints =
new Point[] {firstPoint,
new Point(firstPoint.x, firstPoint.y + spacing),
new Point(firstPoint.x, firstPoint.y + 2 * spacing),
new Point(firstPoint.x, firstPoint.y + 3 * spacing),
new Point(firstPoint.x + spacing, firstPoint.y),
new Point(firstPoint.x + spacing, firstPoint.y + spacing),
new Point(firstPoint.x + spacing, firstPoint.y + 2 * spacing),
new Point(firstPoint.x + spacing, firstPoint.y + 3 * spacing)};
break;
case _3PDT:
controlPoints =
new Point[] {firstPoint, new Point(firstPoint.x, firstPoint.y + spacing),
@@ -278,6 +289,11 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + spacing, 2
* margin + 2 * spacing, margin, margin);
break;
case _DP3T_mustang:
body =
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + spacing, 2
* margin + 3 * spacing, margin, margin);
break;
case _3PDT:
body =
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + 2 * spacing, 2
@@ -2,7 +2,7 @@ package org.diylc.components.electromechanical;
public enum ToggleSwitchType {
SPST, SPDT, DPDT, _3PDT, _4PDT, _5PDT;
SPST, SPDT, DPDT, _DP3T_mustang, _3PDT, _4PDT, _5PDT;
@Override
public String toString() {