use of javax.swing.table.TableColumnModel in project otapij by FellowTraveler.
the class ServerContractTableModel method setValue.
public void setValue(Map values, JTable serverTable) {
clearValue();
Set set = values.keySet();
Iterator iterator = set.iterator();
int i = 0;
data = new Object[values.size()][];
while (iterator.hasNext()) {
Integer key = (Integer) iterator.next();
String[] rowData = new String[2];
rowData = (String[]) values.get(key);
/*rowData[0] = (String)values.get(key);
rowData[1] = String.valueOf(key);*/
data[i] = rowData;
i++;
}
/*RowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(this);
serverTable.setRowSorter(sorter);*/
TableColumnModel tcm = serverTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
serverTable.removeColumn(tcm.getColumn(1));
}
fireTableDataChanged();
}
use of javax.swing.table.TableColumnModel in project otapij by FellowTraveler.
the class ServerInfoTableModel method removeCols.
public static void removeCols(JTable serverInfoTable) {
TableColumnModel tcm = serverInfoTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 3) {
serverInfoTable.removeColumn(tcm.getColumn(2));
}
}
use of javax.swing.table.TableColumnModel in project otapij by FellowTraveler.
the class MarketRecentTradesTableModel method removeCols.
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
/* RowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(this);
marketTable.setRowSorter(sorter);*/
}
use of javax.swing.table.TableColumnModel in project otapij by FellowTraveler.
the class MarketTradesTableModel method removeCols.
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
}
use of javax.swing.table.TableColumnModel in project otapij by FellowTraveler.
the class NYMBoxTableModel method setValue.
public void setValue(List values, JTable nymBox) {
data = new Object[values.size()][];
for (int i = 0; i < values.size(); i++) {
String[] row = (String[]) values.get(i);
data[i] = row;
}
TableColumnModel tcm = nymBox.getColumnModel();
System.out.println("nymbox.getColumncount" + tcm.getColumnCount());
if (tcm.getColumnCount() == 6) {
nymBox.removeColumn(tcm.getColumn(5));
}
if (tcm.getColumnCount() == 5) {
nymBox.removeColumn(tcm.getColumn(4));
}
if (tcm.getColumnCount() == 4) {
nymBox.removeColumn(tcm.getColumn(3));
}
fireTableDataChanged();
}
Aggregations