Example usage for com.google.gwt.widgetideas.client ProgressBar setTextFormatter

List of usage examples for com.google.gwt.widgetideas.client ProgressBar setTextFormatter

Introduction

In this page you can find the example usage for com.google.gwt.widgetideas.client ProgressBar setTextFormatter.

Prototype

public void setTextFormatter(TextFormatter textFormatter) 

Source Link

Document

Set the text formatter.

Usage

From source file:edu.umn.msi.tropix.webgui.client.progress.ProgressCollectionView.java

License:Open Source License

private static void updateBar(final ProgressModel progressModel, final ProgressBar bar) {
    final String stepStatus = (String) progressModel.get("stepStatus");
    if (stepStatus == null) {
        bar.setTextFormatter(null);
        bar.setProgress(((Float) progressModel.get("stepPercent")).doubleValue());
    } else {//w w  w.j a v a2 s. co m
        bar.setTextFormatter(new TextFormatter() {
            public String getText(final ProgressBar bar, final double curProgress) {
                return stepStatus;
            }
        });
        bar.setProgress(((Float) progressModel.get("stepPercent")).doubleValue());
    }
}