mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
null check
This commit is contained in:
@@ -78,7 +78,7 @@ public class AirCoreInductor extends AbstractLeadedComponent<Inductance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString();
|
return getValue() == null ? "" : getValue().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@ public class AxialElectrolyticCapacitor extends AbstractLeadedComponent<Capacita
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class AxialFilmCapacitor extends AbstractLeadedComponent<Capacitance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Voltage")
|
@EditableProperty(name = "Voltage")
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class CapacitorSymbol extends AbstractSchematicLeadedSymbol<Capacitance>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class InductorSymbol extends AbstractSchematicLeadedSymbol<Inductance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getCurrent() == null ? "" : " " + getCurrent().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getCurrent() == null ? "" : " " + getCurrent().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ public class RadialCeramicDiskCapacitor extends AbstractRadialComponent<Capacita
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Voltage")
|
@EditableProperty(name = "Voltage")
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class RadialElectrolytic extends AbstractRadialComponent<Capacitance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class RadialFilmCapacitor extends AbstractRadialComponent<Capacitance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class ResistorSymbol extends AbstractSchematicLeadedSymbol<Resistance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class TantalumCapacitor extends AbstractRadialComponent<Capacitance> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueForDisplay() {
|
public String getValueForDisplay() {
|
||||||
return getValue().toString() + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
return (getValue() == null ? "" : getValue().toString()) + (getVoltageNew() == null ? "" : " " + getVoltageNew().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Voltage")
|
@EditableProperty(name = "Voltage")
|
||||||
|
|||||||
Reference in New Issue
Block a user