Example usage for com.google.gwt.gdata.client.finance TransactionData getNotes

List of usage examples for com.google.gwt.gdata.client.finance TransactionData getNotes

Introduction

In this page you can find the example usage for com.google.gwt.gdata.client.finance TransactionData getNotes.

Prototype

public final native String getNotes() ;

Source Link

Document

Returns the notes.

Usage

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.// w  w  w . ja v a 2  s .  c  om
* 
* @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()));
    }
}