mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
add mustang DP3T switch
This commit is contained in:
@@ -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 + spacing),
|
||||||
new Point(firstPoint.x + spacing, firstPoint.y + 2 * spacing)};
|
new Point(firstPoint.x + spacing, firstPoint.y + 2 * spacing)};
|
||||||
break;
|
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:
|
case _3PDT:
|
||||||
controlPoints =
|
controlPoints =
|
||||||
new Point[] {firstPoint, new Point(firstPoint.x, firstPoint.y + spacing),
|
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
|
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + spacing, 2
|
||||||
* margin + 2 * spacing, margin, margin);
|
* margin + 2 * spacing, margin, margin);
|
||||||
break;
|
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:
|
case _3PDT:
|
||||||
body =
|
body =
|
||||||
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + 2 * spacing, 2
|
new RoundRectangle2D.Double(firstPoint.x - margin, firstPoint.y - margin, 2 * margin + 2 * spacing, 2
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ package org.diylc.components.electromechanical;
|
|||||||
|
|
||||||
public enum ToggleSwitchType {
|
public enum ToggleSwitchType {
|
||||||
|
|
||||||
SPST, SPDT, DPDT, _3PDT, _4PDT, _5PDT;
|
SPST, SPDT, DPDT, _DP3T_mustang, _3PDT, _4PDT, _5PDT;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user