Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Grid.addStyleName()


        int completed = elements * percentage / 100;
        for (int loop = 0; loop < elements; loop++) {
            Grid elm = (Grid) elementGrid.getWidget(0, loop);
            if (loop < completed) {
                elm.setStyleName("progressbar-fullbar");
                elm.addStyleName("progressbar-bar");
            }
            else {
                elm.setStyleName("progressbar-blankbar");
                elm.addStyleName("progressbar-bar");
            }
View Full Code Here


                elm.setStyleName("progressbar-fullbar");
                elm.addStyleName("progressbar-bar");
            }
            else {
                elm.setStyleName("progressbar-blankbar");
                elm.addStyleName("progressbar-bar");
            }
        }
   
    if (percentage > 0) {
            // Calculate the new time remaining
View Full Code Here

  public void setGradient(List<String> colors, String fromLabel, String toLabel) {
    _widget.clear();

    Grid labelGrid = new Grid(1, 2);
    labelGrid.addStyleName(_css.ColorGradientControlLabelGrid());
    labelGrid.setText(0, 0, fromLabel);
    labelGrid.setText(0, 1, toLabel);
    labelGrid.getCellFormatter().addStyleName(0, 0, _css.ColorGradientControlLabelGridLeft());
    labelGrid.getCellFormatter().addStyleName(0, 1, _css.ColorGradientControlLabelGridRight());
    _widget.add(labelGrid);
View Full Code Here

    labelGrid.getCellFormatter().addStyleName(0, 0, _css.ColorGradientControlLabelGridLeft());
    labelGrid.getCellFormatter().addStyleName(0, 1, _css.ColorGradientControlLabelGridRight());
    _widget.add(labelGrid);

    Grid colorGrid = new Grid(1, colors.size());
    colorGrid.addStyleName(_css.ColorGradientControlColorGrid());
    for (int i = 0; i < colors.size(); i++) {
      Element element = colorGrid.getCellFormatter().getElement(0, i);
      Style style = element.getStyle();
      style.setProperty("backgroundColor", colors.get(i));
    }
View Full Code Here

      _tablePanel.add(_filterWidget);

      List<TimedLocalSearchResult> entries = _model.getActiveEntries();

      Grid grid = new Grid(entries.size() + 1, 4);
      grid.addStyleName(_css.ResultsTableWidgetResultsTable());
      grid.setText(0, 0, "");
      grid.setWidget(0, 1, getTableHeaderWidget("Name", EResultsSort.NAME));
      grid.setWidget(0, 2, getTableHeaderWidget("Rating", EResultsSort.RATING));
      grid.setWidget(0, 3, getTableHeaderWidget("Distance", EResultsSort.DISTANCE));
View Full Code Here

    _optionsPanel.addStyleName(_css.SearchWidgetOptionsPanel());
    _optionsPanel.setVisible(false);
    panel.add(_optionsPanel);

    Grid optionsGrid = new Grid(2, 4);
    optionsGrid.addStyleName(_css.SearchWidgetOptionsGrid());
    for (int i = 0; i < 4; i++) {
      optionsGrid.getCellFormatter().addStyleName(0, i,
          "SearchWidget-OptionsGrid-Column" + i);
      optionsGrid.getCellFormatter().addStyleName(1, i,
          "SearchWidget-OptionsGrid-Column" + i);
View Full Code Here

    if (totalPages <= 1)
      return;

    Grid elements = new Grid(1, 3);
    elements.addStyleName(_css.ResultsTableWidgetNavigationWidget());
    String itemCountStyle = "ItemCount";
    DivWidget itemCount = new DivWidget("<span class=\"" + itemCountStyle + "\">" + fromIndex
        + "</span> to <span class=\"" + itemCountStyle + "\">" + toIndex + "</span> of <span class=\"" + itemCountStyle
        + "\">" + totalSize + "</span>");
    itemCount.addStyleName(_css.ItemCountPanel());
View Full Code Here

    }
  }

  private Grid createBackButton(String text) {
    Grid backPanel = new Grid(1, 3);
    backPanel.addStyleName(_css.NavigationBarButton());
    backPanel.getCellFormatter().addStyleName(0, 0,
        _css.NavigationBarButtonLeftArrow());
    backPanel.getCellFormatter().addStyleName(0, 1,
        _css.NavigationBarButtonCenter());
    backPanel.getCellFormatter().addStyleName(0, 2,
View Full Code Here

    return button;
  }

  private Grid createButton() {
    Grid backPanel = new Grid(1, 3);
    backPanel.addStyleName(_css.NavigationBarButton());
    backPanel.getCellFormatter().addStyleName(0, 0,
        _css.NavigationBarButtonLeftRounded());
    backPanel.getCellFormatter().addStyleName(0, 1,
        _css.NavigationBarButtonCenter());
    backPanel.getCellFormatter().addStyleName(0, 2,
View Full Code Here

    String arrivalLabel = _methods.getStatusLabel(bean);
    String minuteLabel = _methods.getMinutesLabel(bean);
    String arrivalLabelStyle = _methods.getStatusLabelStyle(bean);

    Grid row = new Grid(1, 3);
    row.addStyleName(_css.ArrivalEntry());

    TripBean trip = bean.getTrip();
    RouteBean route = trip.getRoute();

    String routeName = RoutePresenter.getNameForRoute(route);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.