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
@@ -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() {