this.analysisController = analysisController;
jTableParams = new javax.swing.JTable() {
@Override
protected JTableHeader createDefaultTableHeader() {
return new GroupableTableHeader(columnModel);
}
};
jTableParams.setName("jTableParams"); // NOI18N
jTableParams.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
this.paramsModel = new SignalParamsModel(this.analysisController.getResultsModel(), this.jTableParams);
this.jTableParams.setModel(paramsModel);
this.analysisController.getResultsModel().addObserver(this.paramsModel);
TableColumnModel cm = this.jTableParams.getColumnModel();
cm.getColumn(0).setMinWidth(200);
cm.getColumn(0).setMaxWidth(200);
cm.getColumn(0).setPreferredWidth(200);
ColumnGroup g_startPoint = new ColumnGroup("Punto Inicial - (P1)");
g_startPoint.add(cm.getColumn(1));
g_startPoint.add(cm.getColumn(2));
ColumnGroup g_endPoint = new ColumnGroup("Punto Final - (P2)");
g_endPoint.add(cm.getColumn(3));
g_endPoint.add(cm.getColumn(4));
GroupableTableHeader header = (GroupableTableHeader) this.jTableParams.getTableHeader();
header.addColumnGroup(g_startPoint);
header.addColumnGroup(g_endPoint);
this.jTableParams.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
this.jTableParams.getSelectionModel().addListSelectionListener(this);
jScrollParams.setViewportView(this.jTableParams);
}