copy paste doesn't work for some components

This commit is contained in:
bancika
2011-01-31 19:32:18 +00:00
parent 85d7d8a450
commit 16600328cc
10 changed files with 16 additions and 8 deletions
@@ -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>
@@ -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();
} }
@@ -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;
@@ -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;
@@ -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) };
@@ -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);
@@ -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();
@@ -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;
@@ -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;