Clearer standing component (mainly diode) reversion

This commit is contained in:
bancika
2012-10-08 16:19:58 +00:00
parent 4c04b72d44
commit 6d10c45a18
4 changed files with 13 additions and 8 deletions
@@ -99,4 +99,9 @@ public class AxialFilmCapacitor extends AbstractLeadedComponent<Capacitance> {
return new Rectangle2D.Double(0f, 0f, getLength().convertToPixels(), return new Rectangle2D.Double(0f, 0f, getLength().convertToPixels(),
getClosestOdd(getWidth().convertToPixels())); getClosestOdd(getWidth().convertToPixels()));
} }
@EditableProperty(name = "Reverse (standing)")
public boolean getFlipStanding() {
return super.getFlipStanding();
}
} }
@@ -148,4 +148,9 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
return bandArea / 2; return bandArea / 2;
return 0; return 0;
} }
@EditableProperty(name = "Reverse (standing)")
public boolean getFlipStanding() {
return super.getFlipStanding();
}
} }
@@ -32,7 +32,6 @@ public class DiodePlastic extends AbstractLeadedComponent<String> {
private String value = ""; private String value = "";
private Color markerColor = MARKER_COLOR; private Color markerColor = MARKER_COLOR;
private boolean flipStanding = false;
public DiodePlastic() { public DiodePlastic() {
super(); super();
@@ -48,16 +47,12 @@ public class DiodePlastic extends AbstractLeadedComponent<String> {
@Override @Override
public Color getStandingBodyColor() { public Color getStandingBodyColor() {
return getFlipStanding() ? getMarkerColor() : getBodyColor(); return getFlipStanding() ? getBodyColor() : getMarkerColor();
} }
@EditableProperty(name = "Reverse (standing)") @EditableProperty(name = "Reverse (standing)")
public boolean getFlipStanding() { public boolean getFlipStanding() {
return flipStanding; return super.getFlipStanding();
}
public void setFlipStanding(boolean flipStanding) {
this.flipStanding = flipStanding;
} }
@EditableProperty @EditableProperty