use of com.moneychanger.ui.model.OTInboxTableModel in project otapij by FellowTraveler.
the class CustomTable method prepareRenderer.
public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex) {
Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
if (c instanceof JComponent) {
JComponent jc = (JComponent) c;
if (getValueAt(rowIndex, vColIndex) instanceof String) {
//Utility.getKeyFromName((String)getValueAt(rowIndex, vColIndex));
String value = (String) getValueAt(rowIndex, vColIndex);
if (this.getModel() instanceof AccountTableModel && vColIndex == 0) {
value = (String) this.getModel().getValueAt(rowIndex, 3);
}
if (this.getModel() instanceof NYMTableModel && vColIndex == 0) {
value = (String) this.getModel().getValueAt(rowIndex, 1);
}
if (this.getModel() instanceof BasketTableModel && vColIndex == 0) {
value = (String) this.getModel().getValueAt(rowIndex, 1);
}
if (this.getModel() instanceof AssetContractTableModel && vColIndex == 0) {
value = (String) this.getModel().getValueAt(rowIndex, 1);
}
if (this.getModel() instanceof ServerContractTableModel && vColIndex == 0) {
value = (String) this.getModel().getValueAt(rowIndex, 1);
}
if (this.getModel() instanceof OTOutboxTableModel) {
if (vColIndex == 4)
value = (String) this.getModel().getValueAt(rowIndex, 8);
if (vColIndex == 5)
value = (String) this.getModel().getValueAt(rowIndex, 9);
}
if (this.getModel() instanceof OTInboxTableModel) {
if (vColIndex == 4)
value = (String) this.getModel().getValueAt(rowIndex, 10);
if (vColIndex == 5)
value = (String) this.getModel().getValueAt(rowIndex, 11);
}
if (this.getModel() instanceof NYMOutboxTableModel) {
if (vColIndex == 1)
value = (String) this.getModel().getValueAt(rowIndex, 4);
if (vColIndex == 2)
value = (String) this.getModel().getValueAt(rowIndex, 5);
}
if (this.getModel() instanceof NYMBoxTableModel) {
if (vColIndex == 1)
value = (String) this.getModel().getValueAt(rowIndex, 4);
if (vColIndex == 2)
value = (String) this.getModel().getValueAt(rowIndex, 5);
}
jc.setToolTipText(value);
}
}
return c;
}
Aggregations