/** Receive account value. */ public synchronized void accountValue(String account, String tag, String value, String currency) { if (account.equals(m_selAcct)) { try { MarketValueTag mvTag = MarketValueTag.valueOf(tag); m_mktValModel.handle(account, currency, mvTag, value); } catch (Exception e) { m_marginModel.handle(tag, value, currency, account); } } }
@Override public String getColumnName(int col) { switch (col) { case 0: return "Account"; case 1: return "Currency"; default: return MarketValueTag.get(col - 2).toString(); } }
@Override public Object getValueAt(int rowIn, int col) { MktValRow row = m_list.get(rowIn); switch (col) { case 0: return row.m_account; case 1: return row.m_currency; default: return format(row.get(MarketValueTag.get(col - 2)), null); } }
@Override public int getColumnCount() { return MarketValueTag.values().length + 2; }