mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 02:02:16 +10:00
icon
This commit is contained in:
+11
-5
@@ -91,15 +91,15 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
// Reset body shape;
|
// Reset body shape;
|
||||||
body = null;
|
body = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name="Pin spacing")
|
@EditableProperty(name = "Pin spacing")
|
||||||
public Size getPinSpacing() {
|
public Size getPinSpacing() {
|
||||||
if (pinSpacing == null) {
|
if (pinSpacing == null) {
|
||||||
pinSpacing = new Size(0.1, SizeUnit.in);
|
pinSpacing = new Size(0.1, SizeUnit.in);
|
||||||
}
|
}
|
||||||
return pinSpacing;
|
return pinSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPinSpacing(Size pinSpacing) {
|
public void setPinSpacing(Size pinSpacing) {
|
||||||
this.pinSpacing = pinSpacing;
|
this.pinSpacing = pinSpacing;
|
||||||
updateControlPoints();
|
updateControlPoints();
|
||||||
@@ -314,6 +314,12 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
g2d.fill(area);
|
g2d.fill(area);
|
||||||
g2d.setColor(BORDER_COLOR);
|
g2d.setColor(BORDER_COLOR);
|
||||||
g2d.draw(area);
|
g2d.draw(area);
|
||||||
|
g2d.setColor(PIN_COLOR);
|
||||||
|
int pinSize = 2 * width / 32;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
g2d.fillOval(width / 2 - pinSize / 2, (height / 4) * (i + 1),
|
||||||
|
pinSize, pinSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Body")
|
@EditableProperty(name = "Body")
|
||||||
@@ -333,7 +339,7 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
public void setBorderColor(Color borderColor) {
|
public void setBorderColor(Color borderColor) {
|
||||||
this.borderColor = borderColor;
|
this.borderColor = borderColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Label")
|
@EditableProperty(name = "Label")
|
||||||
public Color getLabelColor() {
|
public Color getLabelColor() {
|
||||||
if (labelColor == null) {
|
if (labelColor == null) {
|
||||||
@@ -341,7 +347,7 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
}
|
}
|
||||||
return labelColor;
|
return labelColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabelColor(Color labelColor) {
|
public void setLabelColor(Color labelColor) {
|
||||||
this.labelColor = labelColor;
|
this.labelColor = labelColor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user