Example #1
0
    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;
    }
Example #2
0
  @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;
    }
  }
Example #3
0
 public int getRowCount() {
   if (data == null) return 0;
   return data.runCount();
 }
Example #4
0
 public Run getRun(int row) {
   if (data == null) return null;
   return data.getRun(row + 1);
 }