mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
copy paste doesn't work for some components
This commit is contained in:
Binary file not shown.
@@ -149,7 +149,7 @@
|
|||||||
<changes>
|
<changes>
|
||||||
<com.diyfever.gui.update.Change>
|
<com.diyfever.gui.update.Change>
|
||||||
<changeType>BUG_FIX</changeType>
|
<changeType>BUG_FIX</changeType>
|
||||||
<description></description>
|
<description>Copy/paste doesn't work for some components (potentiometer, transistor, etc)</description>
|
||||||
</com.diyfever.gui.update.Change>
|
</com.diyfever.gui.update.Change>
|
||||||
<com.diyfever.gui.update.Change>
|
<com.diyfever.gui.update.Change>
|
||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
|
|||||||
-1
@@ -78,7 +78,6 @@ public class CopperTrace extends AbstractLeadedComponent<Void> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Color getBorderColor() {
|
public Color getBorderColor() {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getBorderColor();
|
return super.getBorderColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
|||||||
private static Color LUG_COLOR = Color.decode("#00B2EE");
|
private static Color LUG_COLOR = Color.decode("#00B2EE");
|
||||||
|
|
||||||
protected Point[] controlPoints = new Point[] { new Point(0, 0) };
|
protected Point[] controlPoints = new Point[] { new Point(0, 0) };
|
||||||
protected RoundRectangle2D body;
|
transient protected RoundRectangle2D body;
|
||||||
protected String name;
|
protected String name;
|
||||||
protected ToggleSwitchType switchType = ToggleSwitchType.DPDT;
|
protected ToggleSwitchType switchType = ToggleSwitchType.DPDT;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ import org.diylc.core.measures.CapacitanceUnit;
|
|||||||
import org.diylc.core.measures.Size;
|
import org.diylc.core.measures.Size;
|
||||||
import org.diylc.core.measures.SizeUnit;
|
import org.diylc.core.measures.SizeUnit;
|
||||||
|
|
||||||
@ComponentDescriptor(name = "Capacitor (schematic symbol)", author = "Branislav Stojkovic", category = "Passive", creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "C", description = "", zOrder = IDIYComponent.COMPONENT)
|
@ComponentDescriptor(name = "Capacitor (schematic symbol)", author = "Branislav Stojkovic", category = "Passive", creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "C", description = "Capacitor schematic symbol with an optional polarity sign", zOrder = IDIYComponent.COMPONENT)
|
||||||
public class CapacitorSymbol extends AbstractSchematicLeadedSymbol<Capacitance> {
|
public class CapacitorSymbol extends AbstractSchematicLeadedSymbol<Capacitance> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public class PotentiometerPanel extends AbstractPotentiometer {
|
|||||||
protected Color bodyColor = BODY_COLOR;
|
protected Color bodyColor = BODY_COLOR;
|
||||||
protected Color borderColor = BORDER_COLOR;
|
protected Color borderColor = BORDER_COLOR;
|
||||||
// Array of 7 elements: 3 lug connectors, 1 pot body and 3 lugs
|
// Array of 7 elements: 3 lug connectors, 1 pot body and 3 lugs
|
||||||
protected Area[] body = null;
|
transient protected Area[] body = null;
|
||||||
|
|
||||||
public PotentiometerPanel() {
|
public PotentiometerPanel() {
|
||||||
controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
||||||
|
|||||||
+9
@@ -42,6 +42,15 @@ public class RadialCeramicDiskCapacitor extends AbstractLeadedComponent<Capacita
|
|||||||
public void setValue(Capacitance value) {
|
public void setValue(Capacitance value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EditableProperty
|
||||||
|
public Voltage getVoltage() {
|
||||||
|
return voltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoltage(Voltage voltage) {
|
||||||
|
this.voltage = voltage;
|
||||||
|
}
|
||||||
|
|
||||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||||
g2d.rotate(-Math.PI / 4, width / 2, height / 2);
|
g2d.rotate(-Math.PI / 4, width / 2, height / 2);
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ public class DIL_IC extends AbstractTransparentComponent<String> {
|
|||||||
// pinSpacing.convertToPixels()),
|
// pinSpacing.convertToPixels()),
|
||||||
// new Point(3 * pinSpacing.convertToPixels(), 3 *
|
// new Point(3 * pinSpacing.convertToPixels(), 3 *
|
||||||
// pinSpacing.convertToPixels()) };
|
// pinSpacing.convertToPixels()) };
|
||||||
private Area body[];
|
transient private Area body[];
|
||||||
|
|
||||||
public DIL_IC() {
|
public DIL_IC() {
|
||||||
super();
|
super();
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ public class TransistorTO220 extends AbstractTransparentComponent<String> {
|
|||||||
private String value = "";
|
private String value = "";
|
||||||
private Orientation orientation = Orientation.DEFAULT;
|
private Orientation orientation = Orientation.DEFAULT;
|
||||||
private Point[] controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
private Point[] controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
||||||
private Shape[] body;
|
transient private Shape[] body;
|
||||||
private Color bodyColor = BODY_COLOR;
|
private Color bodyColor = BODY_COLOR;
|
||||||
private Color borderColor = BORDER_COLOR;
|
private Color borderColor = BORDER_COLOR;
|
||||||
private Color tabColor = TAB_COLOR;
|
private Color tabColor = TAB_COLOR;
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ public class TransistorTO92 extends AbstractTransparentComponent<String> {
|
|||||||
private String value = "";
|
private String value = "";
|
||||||
private Orientation orientation = Orientation.DEFAULT;
|
private Orientation orientation = Orientation.DEFAULT;
|
||||||
private Point[] controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
private Point[] controlPoints = new Point[] { new Point(0, 0), new Point(0, 0), new Point(0, 0) };
|
||||||
private Area body;
|
transient private Area body;
|
||||||
private Color bodyColor = BODY_COLOR;
|
private Color bodyColor = BODY_COLOR;
|
||||||
private Color borderColor = BORDER_COLOR;
|
private Color borderColor = BORDER_COLOR;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user