Added mirrored pin display options for "DIL IC"

This commit is contained in:
bancika
2020-04-19 20:08:01 +02:00
parent 3c72fc5168
commit f8b88755e4
2 changed files with 23 additions and 5 deletions
@@ -3000,7 +3000,7 @@
<changes> <changes>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType> <changeType>NEW_FEATURE</changeType>
<description>"Add Flexible Leads" action added in the context menu that replaces straight leads of leaded components with flexible leads and adds leds to some components that do not have them (e.g. Transistors, Tube Sockets, Potentiometers, etc)</description> <description>"Add Flexible Leads" action added in the context menu that replaces straight leads of leaded components with flexible leads and adds leads to some components that do not have them (e.g. Transistors, Tube Sockets, Potentiometers, etc)</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType> <changeType>NEW_FEATURE</changeType>
@@ -3014,6 +3014,10 @@
<changeType>NEW_FEATURE</changeType> <changeType>NEW_FEATURE</changeType>
<description>Added support for automated regression testing of core functionalities which should reduce regression bugs in the long run</description> <description>Added support for automated regression testing of core functionalities which should reduce regression bugs in the long run</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Added mirrored pin display options for "DIL IC"</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType> <changeType>IMPROVEMENT</changeType>
<description>Standardize how folded transistors are displayed - updated TO-92 and TO-1 packages</description> <description>Standardize how folded transistors are displayed - updated TO-92 and TO-1 packages</description>
@@ -454,8 +454,7 @@ public class DIL_IC extends AbstractTransparentComponent<String> {
} else { } else {
g2d.drawString(Integer.toString(pinNo), textX2, textY2); g2d.drawString(Integer.toString(pinNo), textX2, textY2);
} }
} } else if (displayNumbers == DisplayNumbers.CONNECTOR) {
if (displayNumbers == DisplayNumbers.CONNECTOR) {
if (pinNo > pinCount.getValue() / 2) { if (pinNo > pinCount.getValue() / 2) {
k++; k++;
g2d.drawString(Integer.toString(pinNo - (pinCount.getValue() / 2) + k), textX1, textY1); g2d.drawString(Integer.toString(pinNo - (pinCount.getValue() / 2) + k), textX1, textY1);
@@ -463,6 +462,21 @@ public class DIL_IC extends AbstractTransparentComponent<String> {
g2d.drawString(Integer.toString(pinNo + j), textX2, textY2); g2d.drawString(Integer.toString(pinNo + j), textX2, textY2);
j++; j++;
} }
} else if (displayNumbers == DisplayNumbers.DIP_MIRROR) {
if (pinNo > pinCount.getValue() / 2) {
g2d.drawString(Integer.toString(pinCount.getValue() - pinCount.getValue() + j + 1), textX1, textY1);
j++;
} else {
g2d.drawString(Integer.toString(pinCount.getValue() - pinNo + 1), textX2, textY2);
}
} else if (displayNumbers == DisplayNumbers.CONNECTOR_MIRROR) {
if (pinNo > pinCount.getValue() / 2) {
k++;
g2d.drawString(Integer.toString(pinNo - (pinCount.getValue() / 2) + k - 1), textX1, textY1);
} else {
g2d.drawString(Integer.toString(pinNo + j + 1), textX2, textY2);
j++;
}
} }
} }
} }
@@ -582,7 +596,7 @@ public class DIL_IC extends AbstractTransparentComponent<String> {
public enum DisplayNumbers { public enum DisplayNumbers {
NO("No"), DIP("DIP"), CONNECTOR("Connector"); NO("No"), DIP("DIP"), CONNECTOR("Connector"), DIP_MIRROR("DIP (Mirrored)"), CONNECTOR_MIRROR("Connector (Mirrored)");
private String label; private String label;