mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
fixed a bug which causes a NullPointerException if in a test case a signal is named which does not exist in the circuit.
This commit is contained in:
parent
0d59b974c0
commit
d36d90061f
@ -120,18 +120,18 @@ public class TestResultDialog extends JDialog {
|
|||||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||||
JLabel comp = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
JLabel comp = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||||
Value v = (Value) value;
|
Value v = (Value) value;
|
||||||
|
if (v != null) {
|
||||||
|
comp.setText(v.toString());
|
||||||
|
comp.setHorizontalAlignment(JLabel.CENTER);
|
||||||
|
|
||||||
comp.setText(v.toString());
|
if (v instanceof MatchedValue) {
|
||||||
comp.setHorizontalAlignment(JLabel.CENTER);
|
if (((MatchedValue) v).isPassed())
|
||||||
|
comp.setBackground(PASSED_COLOR);
|
||||||
if (v instanceof MatchedValue) {
|
else
|
||||||
if (((MatchedValue) v).isPassed())
|
comp.setBackground(FAILED_COLOR);
|
||||||
comp.setBackground(PASSED_COLOR);
|
} else
|
||||||
else
|
comp.setBackground(Color.WHITE);
|
||||||
comp.setBackground(FAILED_COLOR);
|
}
|
||||||
} else
|
|
||||||
comp.setBackground(Color.WHITE);
|
|
||||||
|
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user