Example usage for com.google.gwt.visualization.client DataTable getValueString

List of usage examples for com.google.gwt.visualization.client DataTable getValueString

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client DataTable getValueString.

Prototype

public final native String getValueString(int rowIndex, int columnIndex) ;

Source Link

Usage

From source file:com.square.client.gwt.client.presenter.personne.PersonneRelationsVisualizationPresenter.java

License:Open Source License

/**
 * Evenement sur le clic./*from  w w  w .j  av a2s  . c  o m*/
 * @param chart
 * @param datas
 * @return SelectHandler
 */
private SelectHandler createSelectHandler(final OrgChart chart, final DataTable data) {
    return new SelectHandler() {

        @Override
        public void onSelect(SelectEvent event) {
            // May be multiple selections.
            final JsArray<Selection> selections = chart.getSelections();
            final Selection celluleSelectionnee = selections.get(0);
            final int rowCell = celluleSelectionnee.getRow();
            if (rowCell != 0) {
                final Long idPersCible = Long.parseLong(data.getValueString(rowCell, 0));
                personneRpcService.rechercherPersonneParId(idPersCible, new AsyncCallback<PersonneBaseModel>() {
                    @Override
                    public void onSuccess(PersonneBaseModel result) {
                        final PersonneModel personneCible = (PersonneModel) result;
                        fireEventGlobalBus(new OpenPersonEvent(idPersCible, personneCible.getNumClient(),
                                personneCible.getNom() != null ? personneCible.getNom() : "",
                                personneCible.getPrenom() != null ? personneCible.getPrenom() : "",
                                (personneCible.getNaturePersonne() != null)
                                        ? personneCible.getNaturePersonne().getIdentifiant()
                                        : null));
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        view.onRpcServiceFailure(new ErrorPopupConfiguration(caught));
                    }
                });
            }
        }
    };
}

From source file:edu.cudenver.bios.glimmpse.client.panels.guided.RelativeGroupSizePanel.java

License:Open Source License

@Override
public void onPredictors(HashMap<String, ArrayList<String>> predictorMap, DataTable groups) {
    reset();//from  www  . j a va2  s . c o  m
    if (predictorMap.size() > 0) {
        groupSizesTable.getRowFormatter().setStyleName(0, GlimmpseConstants.STYLE_WIZARD_STEP_TABLE_HEADER);
        groupSizesTable.setWidget(0, 0, new HTML(Glimmpse.constants.relativeGroupSizeTableColumn()));
        for (int col = 0; col < groups.getNumberOfColumns(); col++) {
            groupSizesTable.setWidget(0, col + 1, new HTML(groups.getColumnLabel(col)));
        }
        for (int row = 0; row < groups.getNumberOfRows(); row++) {
            groupSizesTable.setWidget(row + 1, 0, createGroupSizeListBox());
            groupSizesTable.getRowFormatter().setStyleName(row + 1,
                    GlimmpseConstants.STYLE_WIZARD_STEP_TABLE_ROW);
            for (int col = 0; col < groups.getNumberOfColumns(); col++) {
                groupSizesTable.setWidget(row + 1, col + 1, new HTML(groups.getValueString(row, col)));
            }
        }
    }
}