2 * Copyright (C) 2012 Openismus GmbH
4 * This file is part of GWT-Glom.
6 * GWT-Glom is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
11 * GWT-Glom is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with GWT-Glom. If not, see <http://www.gnu.org/licenses/>.
20 package org.glom.web.client.ui;
22 import com.google.gwt.user.client.ui.Composite;
23 import com.google.gwt.user.client.ui.FlowPanel;
24 import com.google.gwt.user.client.ui.HTML;
25 import com.google.gwt.user.client.ui.Label;
27 public class ReportViewImpl extends Composite implements ReportView {
29 final private FlowPanel mainPanel = new FlowPanel();
30 final private Label waitingLabel = new Label();
31 final private HTML htmlWidget = new HTML();
33 @SuppressWarnings("unused")
34 private Presenter presenter;
36 public ReportViewImpl() {
37 initWidget(mainPanel);
38 mainPanel.add(waitingLabel);
39 mainPanel.add(htmlWidget);
43 public void setPresenter(final Presenter presenter) {
51 * @see org.glom.web.client.ui.ListView#clear()
55 waitingLabel.setText("");
56 htmlWidget.setHTML("");
60 public void setReportHTML(final String html) {
61 waitingLabel.setText(""); //Because we are not waiting anymore.
62 htmlWidget.setHTML(html); // TODO: Use SafeHTML?
66 public void setWaitingText(final String text) {
67 waitingLabel.setText(text);