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

Examples of com.google.gwt.user.client.ui.InlineLabel


    pnlMinutes.addStyleName("timepickr-row");
    pnlSuffix.addStyleName("timepickr-row");

    for (int i = 0; i < timeSlices; i++) {
      int min = i * (60 / timeSlices);
      InlineLabel minuteLabel = createInlineLabel(
          NumberFormat.getFormat("00").format(min),
          "timepickr-button");
      minuteLabel.addMouseOverHandler(minuteSelectedHandler);
      minuteLabel.addClickHandler(closePopupHandler);
      minuteLabel.addMouseOutHandler(isOkToCloseHandler);
      minuteLabel.getElement().setPropertyInt("minute", i);
      pnlMinutes.add(minuteLabel);
      minuteLabels.add(minuteLabel);
    }

    // AM hours
    for (int i = (startHour < 12 ? startHour : 12); i < (endHour < 12 ? endHour
        : 12); i++) {
      InlineLabel hourLabelAM = createInlineLabel(
          NumberFormat.getFormat("00").format(i), "timepickr-button");
      hourLabelAM.addMouseOverHandler(hourSelectedHandler);
      hourLabelAM.addClickHandler(closePopupHandler);
      hourLabelAM.addMouseOutHandler(isOkToCloseHandler);
      hourLabelAM.getElement().setPropertyInt("hour", i);
      pnlHoursAM.add(hourLabelAM);
      hourLabels.add(hourLabelAM);
    }

    // PM hours
    for (int i = (startHour < 12 ? 12 : startHour); i < (endHour < 12 ? 12
        : endHour); i++) {
      InlineLabel hourLabelPM = createInlineLabel(
          NumberFormat.getFormat("00").format(
              PickerFormat._24_HOUR.equals(format) ? i
                  : (i > 12 ? i % 12 : i)),
          "timepickr-button");
      hourLabelPM.addMouseOverHandler(hourSelectedHandler);
      hourLabelPM.addClickHandler(closePopupHandler);
      hourLabelPM.addMouseOutHandler(isOkToCloseHandler);
      hourLabelPM.getElement().setPropertyInt("hour", i);
      pnlHoursPM.add(hourLabelPM);
      hourLabels.add(hourLabelPM);
    }

    if (startHour < 12 && endHour > 12) {
View Full Code Here


      }

    }

    if (workingHour != -1) {
      InlineLabel hourLabel = hourLabels
          .get(this.workingHour - startHour);
      DOM.setStyleAttribute(
          pnlMinutes.getElement(),
          "left",
          hourLabel.getAbsoluteLeft() - lblInput.getAbsoluteLeft()
              - (pnlMinutes.getOffsetWidth() / 2)
              + (hourLabel.getOffsetWidth() / 2) + "px");
    } else {
      DOM.setStyleAttribute(
          pnlMinutes.getElement(),
          "left",
          2 - (pnlMinutes.getOffsetWidth() / 2)
View Full Code Here

  /**
   * Create an inline label with the list of styles
   */
  private InlineLabel createInlineLabel(String txt, String... styles) {
    InlineLabel lbl = new InlineLabel(txt);
    for (String style : styles) {
      lbl.addStyleName(style);
    }
    return lbl;
  }
View Full Code Here

  }
 
  @Override
  public void initialize() {
    Panel panel = new FlowPanel();
    panel.add(new InlineLabel("Reference: "));
    panel.add(new Anchor(referenceSource, referenceSource));
    add(panel);
    add(getPrimarySurface());
    getPrimarySurface().clear();
  }
View Full Code Here

        }

        {
          hours_minutes = new Grid(4, 8);
          setupAmUI();
          hours_minutes.setWidget(0, 0, new InlineLabel("HH"));
          final PushButton set_am = new PushButton("AM");
          set_am.addClickHandler(new ClickHandler() {
            public void onClick(final ClickEvent event) {
              setupAmUI();
            }
          });
          hours_minutes.setWidget(0, 7, set_am);

          final PushButton set_pm = new PushButton("PM");
          set_pm.addClickHandler(new ClickHandler() {
            public void onClick(final ClickEvent event) {
              setupPmUI();
            }
          });
          hours_minutes.setWidget(1, 7, set_pm);

          hours_minutes.setWidget(2, 0, new InlineLabel("MM"));
          hours_minutes.setWidget(2, 1, newSetMinutesButton(0, "00"));
          hours_minutes.setWidget(2, 2, newSetMinutesButton(10, "10"));
          hours_minutes.setWidget(2, 3, newSetMinutesButton(20, "20"));
          hours_minutes.setWidget(2, 4, newSetMinutesButton(30, "30"));
          hours_minutes.setWidget(2, 5, newSetMinutesButton(40, "40"));
          hours_minutes.setWidget(2, 6, newSetMinutesButton(50, "50"));
          vbox.add(hours_minutes);
        }

        {
          final HorizontalPanel hbox = new HorizontalPanel();
          hbox.add(new InlineLabel("UNIX timestamp:"));
          final ValidatedTextBox ts = new ValidatedTextBox();
          ts.setValidationRegexp("^(|[1-9][0-9]{0,9})$");
          ts.setVisibleLength(10);
          ts.setMaxLength(10);
          final EventsHandler handler = new EventsHandler() {
View Full Code Here

  private void assembleUi() {
    setWidth("100%");
    // Left hand-side panel.
      final HorizontalPanel hbox = new HorizontalPanel();
      final InlineLabel l = new InlineLabel();
      l.setText("Metric:");
      hbox.add(l);
      final SuggestBox suggest = RemoteOracle.newSuggestBox("metrics",
                                                            metric);
      suggest.setLimit(40);
      hbox.add(suggest);
      hbox.setWidth("100%");
      metric.setWidth("100%");

      tagtable.setWidget(0, 0, hbox);
      tagtable.getFlexCellFormatter().setColSpan(0, 0, 3);
      addTag();
      tagtable.setText(1, 0, "Tags");
      add(tagtable);
    }
    {  // Right hand-side panel.
      final VerticalPanel vbox = new VerticalPanel();
      {
        final HorizontalPanel hbox = new HorizontalPanel();
        hbox.add(rate);
        hbox.add(rate_counter);
        hbox.add(x1y2);
        vbox.add(hbox);
      }
      {
        final HorizontalPanel hbox = new HorizontalPanel();
        final InlineLabel l = new InlineLabel("Rate Ctr Max:");
        hbox.add(l);
        hbox.add(counter_max);
        vbox.add(hbox);
      }
      {
        final HorizontalPanel hbox = new HorizontalPanel();
        final InlineLabel l = new InlineLabel("Rate Ctr Reset:");
        hbox.add(l);
        hbox.add(counter_reset_value);
        vbox.add(hbox);
      }
      {
        final HorizontalPanel hbox = new HorizontalPanel();
        final InlineLabel l = new InlineLabel();
        l.setText("Aggregator:");
        hbox.add(l);
        hbox.add(aggregators);
        vbox.add(hbox);
      }
      vbox.add(downsample);
View Full Code Here

    }
    public AutoSizingTextBox(T box) {
  this(box, 30);
    }
    public AutoSizingTextBox(T box, int extraSize) {
  super(box, new InlineLabel());
  setExtraSize(extraSize);
    }
View Full Code Here

        if (type.isMaxNegative(ca)) {

          if (showUsernameInReviewCategory) {
            FlowPanel fp = new FlowPanel();
            fp.add(new Image(Gerrit.RESOURCES.redNot()));
            fp.add(new InlineLabel(FormatUtil.name(ai)));
            table.setWidget(row, col, fp);
          } else {
            table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
          }

        } else if (type.isMaxPositive(ca)) {

          if (showUsernameInReviewCategory) {
            FlowPanel fp = new FlowPanel();
            fp.add(new Image(Gerrit.RESOURCES.greenCheck()));
            fp.add(new InlineLabel(FormatUtil.name(ai)));
            table.setWidget(row, col, fp);
          } else {
            table.setWidget(row, col, new Image(Gerrit.RESOURCES.greenCheck()));
          }
View Full Code Here

    dependenciesPanel.setOpen(depsOpen);

    dependenciesPanel.getHeader().clear();
    if (outdated > 0) {
      dependenciesPanel.getHeader().add(new InlineLabel(
        Util.M.outdatedHeader(outdated)));
    }

    if (!isCurrentView()) {
      display();
View Full Code Here

    final FlowPanel me = (FlowPanel) getWidget();
    me.add(header = new Grid(1, Cols.values().length));
    me.add(body = new FlowPanel());

    FlowPanel title = new FlowPanel();
    title.add(headerText = new InlineLabel());
    title.setStyleName(Gerrit.RESOURCES.css().screenHeader());
    header.setWidget(0, Cols.Title.ordinal(), title);

    header.setStyleName(Gerrit.RESOURCES.css().screenHeader());
    header.getCellFormatter().setHorizontalAlignment(0, Cols.FarEast.ordinal(),
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.InlineLabel

Copyright © 2018 www.massapicom. 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.