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

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


        Form.Field fieldWidget = (Form.Field) section
            .getWidget(fieldIndex);
        Widget field = fieldWidget.getWidget(0);

        if (fieldWidget.isVisible()) {
          InlineLabel label = fieldWidget.labelWidget;
          maximumLabelWidth = Math.max(maximumLabelWidth,
              WidgetHelper.getPreferredWidth(label));

          int fieldWidth = WidgetHelper.getPreferredWidth(field, -1);
View Full Code Here


            .getWidget(fieldIndex);
        Widget field = fieldWidget.getWidget(0);

        if (fieldWidget.isVisible()) {
          // Determine the label size and baseline
          InlineLabel label = fieldWidget.labelWidget;
          Dimensions labelSize = WidgetHelper.getPreferredSize(label);
          int labelAscent = WidgetHelper.getBaseline(label,
              labelSize.width, labelSize.height);
          int labelDescent = labelSize.height - labelAscent;
View Full Code Here

            .getWidget(fieldIndex);
        Widget field = fieldWidget.getWidget(0);

        if (fieldWidget.isVisible()) {
          // Determine the label size and baseline
          InlineLabel label = fieldWidget.labelWidget;
          Dimensions labelSize = WidgetHelper.getPreferredSize(label);
          int labelAscent = WidgetHelper.getBaseline(label,
              labelSize.width, labelSize.height);

          // Determine the field size and baseline
View Full Code Here

        Form.Field fieldWidget = (Form.Field) section
            .getWidget(fieldIndex);
        // Widget field = fieldWidget.getWidget(0);

        if (fieldWidget.isVisible()) {
          InlineLabel label = fieldWidget.labelWidget;
          maximumLabelWidth = Math.max(maximumLabelWidth,
              WidgetHelper.getPreferredWidth(label));

          // TODO if (showFlagMessagesInline) {}
        }
View Full Code Here

        Form.Field fieldWidget = (Form.Field) section
            .getWidget(fieldIndex);
        // Widget field = fieldWidget.getWidget(0);

        if (fieldWidget.isVisible()) {
          InlineLabel label = fieldWidget.labelWidget;
          maximumLabelWidth = Math.max(maximumLabelWidth,
              WidgetHelper.getPreferredWidth(label));

          // TODO if (showFlagMessagesInline) {}
        }
      }
    }

    // Determine the field width
    int width = getElement().getClientWidth();
    int fieldWidth = Math.max(0, width
        - (maximumLabelWidth + horizontalSpacing));

    // TODO if (showFlagIcons) {}

    // TODO if (showFlagMessagesInline) {}

    fieldWidth = Math.max(0,
        fieldWidth - boxModel.getPaddingWidthContribution());

    // Lay out the components
    int rowY = boxModel.getPadding().top;

    for (int sectionIndex = 0, sectionCount = getWidgetCount(); sectionIndex < sectionCount; sectionIndex++) {
      Form.Section section = (Form.Section) getWidget(sectionIndex);

      WidgetHelper.setSize(section, width, 1);
      WidgetHelper.setLocation(section, 0, 0);

      Separator separator = section.separator;
      if (sectionIndex > 0 || section.getHeading() != null) {
        int separatorWidth = Math.max(
            width - boxModel.getPaddingWidthContribution(), 0);
        separator.setVisible(true);
        int separatorHeight = WidgetHelper.getPreferredHeight(
            separator, separatorWidth);
        WidgetHelper
            .setSize(separator, separatorWidth, separatorHeight);
        WidgetHelper.setLocation(separator, boxModel.getPadding().left,
            rowY);
        rowY += separatorHeight;
      } else {
        separator.setVisible(false);
      }

      for (int fieldIndex = 0, fieldCount = section.getWidgetCount(); fieldIndex < fieldCount; fieldIndex++) {
        Form.Field fieldWidget = (Form.Field) section
            .getWidget(fieldIndex);
        Widget field = fieldWidget.getWidget(0);

        InlineLabel label = fieldWidget.labelWidget;

        WidgetHelper.setSize(fieldWidget, width, 1);
        WidgetHelper.setLocation(fieldWidget, 0, 0);

        if (fieldWidget.isVisible()) {
          // Show the label
          label.setVisible(true);

          // Determine the label size and baseline
          Dimensions labelSize = WidgetHelper.getPreferredSize(label);

          WidgetHelper.setSize(label, labelSize.width,
View Full Code Here

    private int acked;
    private int nacked;
    private boolean locked;

    public DiagnosticsView() {
        this.info = new InlineLabel();
    }
View Full Code Here

   protected Widget getOptionLabelWidget()
   {
      if (nonNullCheck_ != null)
         return nonNullCheck_;
      else
         return new InlineLabel(getOption().getUiName() + ": ");
   }
View Full Code Here

    private final class Signin implements ClickHandler {
        @Override
        public void onClick(ClickEvent event) {
            clear();
           
            RootPanel.get("UserName").add(new InlineLabel(userName.getText()));
            RootPanel.get("link2loginout").add(signout);
            RootPanel.get("UserNameOnBoard").add(new InlineLabel("Logged in as " + userName.getText()));
            RootPanel.get("link2loginoutOnBoard").add(formSignout);
        }
View Full Code Here

    int row = 1;
    for (final NanoTest nano : nanos) {
      grid.setText(row, 0, "0");
      grid.setText(row, 1, "0");
      InlineLabel a = new InlineLabel();
      a.setText(nano.getName());
      a.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          Widget toDisplay = nano.getPopup();
          if (toDisplay != null) {
            PopupPanel popup = new PopupPanel(true, true);
            ScrollPanel container = new ScrollPanel(toDisplay);
View Full Code Here

    FlowPanel div2 = new FlowPanel();
    Util.addText(div2.getElement(), "Div2");
    div1.add(div2);

    InlineLabel span1 = new InlineLabel();
    span1.setText("Span1");
    div1.add(span1);

    FlowPanel anon = new FlowPanel();
    Util.addText(anon.getElement(), "Div anon");
    root.add(anon);

    FlowPanel div3 = new FlowPanel();
    Util.addText(div3.getElement(), "Div3");
    anon.add(div3);

    FlowPanel div4 = new FlowPanel();
    Util.addText(div4.getElement(), "Div4");
    div3.add(div4);

    InlineLabel span2 = new InlineLabel();
    span2.setText("Span2");
    div3.add(span2);
   
    Util.addText(div1.getElement(), " Div1 end");
    Util.addText(div3.getElement(), " Div3 end");
    Util.addText(anon.getElement(), " Div anon end");
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.