use of javax.swing.table.TableColumnModel in project pcgen by PCGen.
the class Initiative method removeColumn.
private void removeColumn(String name) {
TableColumnModel colModel = combatantTable.getColumnModel();
for (int i = 0; i < colModel.getColumnCount(); i++) {
TableColumn col = colModel.getColumn(i);
if (col.getHeaderValue().toString().equals(name)) {
colModel.removeColumn(col);
}
}
trackTable();
initTable();
columnList = getColumnOrder();
}
use of javax.swing.table.TableColumnModel in project pcgen by PCGen.
the class Initiative method addTableListener.
private void addTableListener() {
TableColumnModel colModel = combatantTable.getColumnModel();
colModel.addColumnModelListener(new javax.swing.event.TableColumnModelListener() {
@Override
public void columnAdded(javax.swing.event.TableColumnModelEvent e) {
colModAdded(e);
}
@Override
public void columnMarginChanged(javax.swing.event.ChangeEvent e) {
colModMarginChanged(e);
}
@Override
public void columnMoved(javax.swing.event.TableColumnModelEvent e) {
colModMoved(e);
}
@Override
public void columnRemoved(javax.swing.event.TableColumnModelEvent e) {
colModRemoved(e);
}
@Override
public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e) {
colModSelectionChanged(e);
}
});
}
use of javax.swing.table.TableColumnModel in project SE2017_4_tuna by SE-admin.
the class Frame3 method setTableCellRenderer.
private void setTableCellRenderer(JTable todoTable, TableCellRenderer renderer) {
TableColumnModel columnModel = todoTable.getColumnModel();
int columnCount = columnModel.getColumnCount();
for (int i = 0; i < columnCount; i++) {
TableColumn column = columnModel.getColumn(i);
column.setCellRenderer(renderer);
}
}
use of javax.swing.table.TableColumnModel in project SE2017_4_tuna by SE-admin.
the class Frame4 method setTableCellRenderer.
private void setTableCellRenderer(JTable table, TableCellRenderer renderer) {
TableColumnModel columnModel = table.getColumnModel();
int columnCount = columnModel.getColumnCount();
for (int i = 0; i < columnCount; i++) {
TableColumn column = columnModel.getColumn(i);
column.setCellRenderer(renderer);
}
}
use of javax.swing.table.TableColumnModel in project SE2017_4_tuna by SE-admin.
the class MainFrame method setTableCellRenderer.
private void setTableCellRenderer(JTable table, TableCellRenderer renderer) {
TableColumnModel columnModel = table.getColumnModel();
int columnCount = columnModel.getColumnCount();
for (int i = 0; i < columnCount; i++) {
TableColumn column = columnModel.getColumn(i);
column.setCellRenderer(renderer);
}
}
Aggregations