Exemple #1
0
  public void setData(TraceDataSet dataSet) {
    this.dataSet = dataSet;
    this.errorsOnly = false;
    this.traceLabel = null;
    this.minTraceTime = 0;

    btnFilterErrors.setSelected(false);
    txtMinTime.setText("");

    tbmTraces.setDataSet(dataSet, null);

    List<String> traceNames = new ArrayList<String>();

    for (ViewerTraceRecord rec : dataSet.getRecords()) {
      String traceName = rec.getTraceName();
      if (traceName != null && !traceNames.contains(traceName)) {
        traceNames.add(traceName);
      }
    }

    Collections.sort(traceNames);
    cmbTraceType.removeAllItems();
    cmbTraceType.addItem("*");

    for (String traceName : traceNames) {
      cmbTraceType.addItem(traceName);
    }
  }
Exemple #2
0
  private void initTable() {
    JScrollPane scrTraces = new JScrollPane();

    tblTraces = new JTable(tbmTraces);
    tbmTraces.adjustColumns(tblTraces);
    tblTraces.setAutoscrolls(false);

    tblTraces.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            TracePanel.this.pnlTraceDetail.setTrace(
                dataSet, tbmTraces.get(tblTraces.getSelectedRow()));
          }
        });

    tblTraces.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

    scrTraces.setMinimumSize(new Dimension(200, 384));
    scrTraces.setViewportView(tblTraces);

    add(scrTraces, BorderLayout.CENTER);
  }