@Override public String getColumnName(int col) { if (col == 0) { return "Account"; } return AccountSummaryTag.values()[col - 1].toString(); }
@Override public Object getValueAt(int rowIn, int col) { SummaryRow row = m_rows.get(rowIn); if (col == 0) { return row.m_account; } AccountSummaryTag tag = AccountSummaryTag.values()[col - 1]; String val = row.m_map.get(tag); switch (tag) { case Cushion: return fmtPct(val); case LookAheadNextChange: return fmtTime(val); default: return AccountInfoPanel.format(val, null); } }
private void subscribe() { IBTradingMain.INSTANCE .controller() .reqAccountSummary("All", AccountSummaryTag.values(), m_model); }
@Override public int getColumnCount() { return AccountSummaryTag.values().length + 1; // add one for Account column }