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

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


    panel.add(new Label(getFieldsDescription(service)));

    // If a response schema is provided, add a link to the fields editor and
    // tell the fields editor about this method's response schema.
    if (responseSchema != null && responseSchema.getProperties() != null) {
      Label openFieldsEditor = new InlineLabel("Use fields editor");
      openFieldsEditor.addStyleName(Resources.INSTANCE.style().clickable());
      openFieldsEditor.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          fieldsPopupPanel.show();
          fieldsPopupPanel.center();
        }
View Full Code Here


    return new FlowPanel();
  }

  private static Widget simpleInline(
      String title, String inlineText, String style, int depth, boolean hasSeparator) {
    Widget valueLabel = new InlineLabel(inlineText);
    valueLabel.addStyleName(style);
    return inlineWidget(title, Lists.newArrayList(valueLabel), depth, hasSeparator);
  }
View Full Code Here

      String title, List<Widget> inlineWidgets, int depth, boolean hasSeparator) {

    FlowPanel inlinePanel = new FlowPanel();

    StringBuilder keyText = new StringBuilder(indentation(depth)).append(title);
    InlineLabel keyLabel = new InlineLabel(keyText.toString());
    keyLabel.addStyleName(style.jsonKey());
    inlinePanel.add(keyLabel);

    for (Widget child : inlineWidgets) {
      inlinePanel.add(child);
    }

    if (hasSeparator) {
      inlinePanel.add(new InlineLabel(SEPARATOR_TEXT));
    }

    return inlinePanel;
  }
View Full Code Here

  private static List<Widget> formatString(
      ApiService service, String rawText, PrettifierLinkFactory linkFactory) {

    if (isLink(rawText)) {
      List<Widget> response = Lists.newArrayList();
      response.add(new InlineLabel("\""));

      boolean createdExplorerLink = false;
      try {
        ApiMethod method = getMethodForUrl(service, rawText);
        if (method != null) {
          String explorerLink = createExplorerLink(service, rawText, method);
          Widget linkObject = linkFactory.generateAnchor(rawText, explorerLink);
          linkObject.addStyleName(style.jsonStringExplorerLink());
          response.add(linkObject);
          createdExplorerLink = true;
        }
      } catch (IndexOutOfBoundsException e) {
        // Intentionally blank - this will only happen when iterating the method
        // url template in parallel with the url components and you run out of
        // components
      }

      if (!createdExplorerLink) {
        Anchor linkObject = new Anchor(rawText, rawText, OPEN_IN_NEW_WINDOW);
        linkObject.addStyleName(style.jsonStringLink());
        response.add(linkObject);
      }

      response.add(new InlineLabel("\""));
      return response;
    } else {
      JSONString encoded = new JSONString(rawText);
      Widget stringText = new InlineLabel(encoded.toString());
      stringText.addStyleName(style.jsonString());
      return Lists.newArrayList(stringText);
    }
  }
View Full Code Here

    try {
      JsonPrettifier.prettify(
          request.getService(), requestBodyDiv, request.getRequestBody(), linkFactory);
    } catch (JsonFormatException e) {
      // We should only be generating valid requests
      requestBodyDiv.add(new InlineLabel(request.getRequestBody()));
    }

    setResponseContent(request, response, realPathFragment, linkFactory);
  }
View Full Code Here

    if (!GWT.isScript()) {
      // Syntax highlighting is *very* slow in Development Mode (~30s for large
      // responses), but very fast when compiled and run as JS (~30ms). For the
      // sake of my sanity, syntax highlighting is disabled in Development
      destination.add(new InlineLabel(jsonString));
    } else {

      try {
        DynamicJso root = JsonUtils.<DynamicJso>safeEval(jsonString);
        Collection<ApiMethod> compatibleMethods = computeCompatibleMethods(root, service);
View Full Code Here

      @Nullable Widget menuButtonForReuse) {

    FlowPanel object = new FlowPanel();

    FlowPanel titlePanel = new FlowPanel();
    Label paddingSpaces = new InlineLabel(indentation(depth));
    titlePanel.add(paddingSpaces);

    Label titleLabel = new InlineLabel(title + openGroup);
    titleLabel.addStyleName(style.jsonKey());
    Collapser.decorateCollapserControl(titleLabel, true);
    titlePanel.add(titleLabel);

    object.add(titlePanel);

    FlowPanel objectContents = new FlowPanel();

    if (menuButtonForReuse != null) {
      objectContents.addStyleName(style.reusableResource());
      objectContents.add(menuButtonForReuse);
    }

    for (Widget child : objIterable) {
      objectContents.add(child);
    }
    object.add(objectContents);

    InlineLabel placeholder = new InlineLabel(indentation(depth + 1) + PLACEHOLDER_TEXT);
    ClickHandler collapsingHandler = new Collapser(objectContents, placeholder, titleLabel);
    placeholder.setVisible(false);
    placeholder.addClickHandler(collapsingHandler);
    object.add(placeholder);

    titleLabel.addClickHandler(collapsingHandler);

    StringBuilder closingLabelText = new StringBuilder(indentation(depth)).append(closeGroup);
View Full Code Here

    table.setWidget(2, 1, endDatePicker);
    table.setWidget(3, 1, new Label("End time:"));
    table.setWidget(4, 1, endTime);

    Button okButton = new Button("OK");
    final InlineLabel problemLabel = new InlineLabel("");
    problemLabel.setStylePrimaryName("serverResponseLabelError");

    FlowPanel panel = new FlowPanel();
    panel.add(table);
    panel.add(new Label("Event time may be blank, or should be entered as, e.g., 3:00 PM."));
    panel.add(okButton);
    panel.add(problemLabel);
   
    hasSeparateEndDate.addValueChangeHandler(new ValueChangeHandler<Boolean> () {
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event) {
        boolean isChecked = event.getValue().booleanValue();
        // endDatePicker.setEnabled(isChecked);  -- if only the API supported it. :-(
        endTime.setEnabled(isChecked);
      }
    });

    okButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        Date endDateTime = getEndDateTime();
        if (endDateTime != null && endDateTime.before(getStartDateTime())) {
          problemLabel.setText("End date/time cannot be before start date/time");
        } else {
          problemLabel.setText("");
          datePopup.hide();
          setDateTriggerText();
        }
      }
    });
View Full Code Here

    private final WebProtegeDialogInlineValidator<ValueBoxBase<String>> validator;

    public WebProtegeDialogTextFieldValidationManager(ValueBoxBase<String> textBox, final WebProtegeDialogInlineValidator<ValueBoxBase<String>> validator) {
        this.textBox = textBox;
        this.errorLabel = new InlineLabel();
        this.validator = validator;
        textBox.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
                if (validator.shouldCheckOnKeyUp()) {
                    runValidation();
View Full Code Here

        rememberDecision = new CheckBox(messages.dontShowThisAgain());

        Label message = new Label(messages.saveAsTranslatedDialogWarning1());
        message.setStyleName("txt--invert delta txt--important");

        InlineLabel info = new InlineLabel();
        info.setStyleName("icon-info-circle-2 infoIcon");
        InlineLabel message3 =
                new InlineLabel(messages.saveAsApprovedDialogInfo1());
        Label message4 = new Label(messages.saveAsApprovedDialogInfo2());
        Label message5 = new Label(messages.saveAsApprovedDialogInfo3());
        message4.addStyleName("subInfo");
        message5.addStyleName("subInfo");
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.