Ejemplo n.º 1
0
  protected Component buildAssertionsList() {
    assertionsForm = new SimpleForm();

    assertionsListTableModel = new AssertionsListTableModel();
    assertionsTable = new AssertionsListTable(assertionsListTableModel);
    int selectedRow = categoriesListTable.getSelectedRow();
    String category = (String) categoriesListTable.getModel().getValueAt(selectedRow, 0);
    if (category != null && categoriesAssertionsMap.containsKey(category)) {
      assertions = categoriesAssertionsMap.get(category);
      assertionsListTableModel.setListEntriesSet(assertions);
    }
    assertionsTable.setTableHeader(null);
    assertionsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    assertionsTable.getSelectionModel().addListSelectionListener(selectionListener);
    assertionsTable.setEditable(false);
    assertionsTable.setGridColor(Color.BLACK);
    assertionsTable.addMouseListener(mouseAdapter);

    assertionsTable.getColumnModel().getColumn(0).setCellRenderer(assertionEntryRenderer);
    assertionsForm.addComponent(assertionsTable);
    return new JScrollPane(assertionsForm.getPanel());
  }