Esempio n. 1
0
    public Component getTableCellRendererComponent(
        JTable t, Object o, boolean is, boolean hf, int r, int c) {
      Component cell = super.getTableCellRendererComponent(t, o, is, hf, r, c);

      EventResultModel m = (EventResultModel) t.getModel();
      String s = (String) m.getValueAt(r, 1);
      if (s.equals(match)) {
        cell.setFont(bold);
        cell.setBackground(mygray);
      } else {
        cell.setFont(regular);
        cell.setBackground(Color.WHITE);
      }

      return cell;
    }
Esempio n. 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;
    }
  }