List of usage examples for com.google.gwt.gdata.client.finance TransactionData getShares
public final native double getShares() ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.FinanceRetrieveTransactionsDemo.java
License:Apache License
/** * Displays a set of Finance transaction entries in a tabular * fashion with the help of a GWT FlexTable widget. The data fields * Notes, Type and Shares are displayed.//from ww w. j a v a 2s . c o m * * @param entries The Finance transaction entries to display. */ private void showData(TransactionEntry[] entries) { mainPanel.clear(); String[] labels = new String[] { "Notes", "Type", "Shares" }; mainPanel.insertRow(0); for (int i = 0; i < labels.length; i++) { mainPanel.addCell(0); mainPanel.setWidget(0, i, new Label(labels[i])); mainPanel.getFlexCellFormatter().setStyleName(0, i, "hm-tableheader"); } for (int i = 0; i < entries.length; i++) { TransactionEntry entry = entries[i]; TransactionData data = entry.getTransactionData(); int row = mainPanel.insertRow(i + 1); mainPanel.addCell(row); mainPanel.setWidget(row, 0, new Label(data.getNotes())); mainPanel.addCell(row); mainPanel.setWidget(row, 1, new Label(data.getType())); mainPanel.addCell(row); mainPanel.setWidget(row, 2, new Label("" + data.getShares())); } }