public Object getValueAt(int row, int col) { Run r = null; Run last = null; if (data == null) return ""; r = data.getRun(row + 1); if (r == null) return ""; if (row > 0) last = data.getRun(row); switch (col) { case 0: return df.format(r.getRaw()); case 2: return new String("(" + r.getCones() + "," + r.getGates() + ")"); case 3: return df.format(r.getNet()); case 1: if (r.getRawOrder() == 1) return "*"; else return ""; case 4: if (r.getNetOrder() <= 2) return r.getNetOrder(); else return ""; } return null; }
@Override public void event(MT type, Object o) { switch (type) { case RUN_CHANGED: Entrant e = (Entrant) o; String classcode = e.getClassCode(); nameLabel.setText("Driver: " + e.getName()); nameModel.setData(e); details.setData(e.getRuns()); classLabel.setText("Class: " + classcode); classModel.setData(Database.d.getResultsForClass(classcode)); renderer.setHighlightValue(e.getFirstName() + " " + e.getLastName()); break; } }
public int getRowCount() { if (data == null) return 0; return data.runCount(); }
public Run getRun(int row) { if (data == null) return null; return data.getRun(row + 1); }