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

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


        /*
         This HTMLPanel holds most of our content.
         MainPanel_html was built in the HTMLProps task from MainPanel.html, which allows you to use large passages of html
         without having to string escape them.
         */
        HTMLPanel panel = new HTMLPanel(HTMLResources.INSTANCE.getMainPanelHTML().getText())
        {
            @Override
            public void onLoad()
            {
                super.onLoad();
                /*
                 Let's set focus into the text field when the page first loads
                 */
                m_text.setFocus(true);
            }
        };
       
        RootPanel.get("mainContent").add(panel);
       
        /*
         These dynamic controls add interactivity to our page.
         */
        panel.add(m_longMessage, "longMsg");
        panel.add(m_text, "nameField");
        final Button button = new Button("Submit");
        panel.add(button, "submitButton");
       
        button.addClickHandler(this);
        m_text.addKeyPressHandler(this);
       
    }
View Full Code Here


           widgetOnAttach(widget);
         } else {
           attachWidget(widget, firstParentWidget);
         }
       } else if (firstParentWidget instanceof HTMLPanel) {
         HTMLPanel h = (HTMLPanel) firstParentWidget;
         Element p = widget.getElement().getParentElement();
         if (p != null) {
           h.add(widget, p);
         } else {
           h.add(widget);
         }
       } else if (firstParentWidget instanceof HasOneWidget) {
         ((HasOneWidget)firstParentWidget).setWidget(widget);
       } else if (firstParentWidget instanceof HasWidgets) {
         try {
View Full Code Here

        return panel;
    }

    private Widget getLinksSection() {
        linksPane = new HTMLPanel(createLinks());
        linksPane.getElement().setId("header-links-section");
        linksPane.getElement().setAttribute("role", "menubar");
        linksPane.getElement().setAttribute("aria-controls", "main-content-area");

        String[][] sections = bootstrap.isStandalone() ? SECTIONS_STANDALONE : SECTIONS;
View Full Code Here

                        String cause = "";
                        if(context.getLastError()!=null)
                            cause = context.getLastError().getMessage();

                        HTMLPanel explanation = new HTMLPanel("<div style='padding-top:150px;padding-left:120px;'><h2>The management interface could not be loaded.</h2><pre>"+cause+"</pre></div>");
                        RootLayoutPanel.get().add(explanation);
                    }

                    @Override
                    public void onSuccess(BootstrapContext context) {
View Full Code Here

        return panel;
    }

    private Widget getLinksSection() {
        linksPane = new HTMLPanel(createLinks());
        linksPane.getElement().setId("header-links-section");
        linksPane.getElement().setAttribute("role", "menubar");
        linksPane.getElement().setAttribute("aria-controls", "main-content-area");

        String[][] sections = bootstrap.isStandalone() ? SECTIONS_STANADLONE : SECTIONS;
View Full Code Here

        SafeHtmlBuilder builder = new SafeHtmlBuilder();

        builder.appendHtmlConstant("<div id='"+ outerId +"'><div id='"+innerId+"'/></div>");

        panel = new HTMLPanel(builder.toSafeHtml());

        Element outerElement = panel.getElementById(outerId);
        outerElement.addClassName("stacked-bar-total");
        outerElement.setAttribute("style", "width:100%");
View Full Code Here

   */
  public void setProperties(Map<String, Schema> properties) {
    List<String> keys = Lists.newArrayList(properties.keySet());
    Collections.sort(keys);

    HTMLPanel inner = new HTMLPanel("");
    inner.getElement().getStyle().setPaddingLeft(20, Unit.PX);

    for (String childKey : keys) {
      final Schema property = properties.get(childKey);
      final Map<String, Schema> childProperties = property.getProperties();
      final Schema items = property.getItems();

      if (childProperties == null && items == null) {
        // This is a simple field
        CheckBox checkBox = new CheckBox(childKey);
        checkBox.setValue(root.getValue());
        checkBox.setTitle(property.getDescription());
        children.put(childKey, checkBox);
        checkBox.getElement().appendChild(Document.get().createBRElement());
        inner.add(checkBox);
      } else {

        final FieldsEditor editor = new FieldsEditor(service, childKey);
        children.put(childKey, editor);
        inner.add(editor);

        if (childProperties != null) {
          editor.setProperties(childProperties);
        } else if (property.getRef() != null) {
          editor.setRef(property.getRef());
View Full Code Here

  static class StringSchemaEditor implements SchemaEditor {
    private HasText hasText;

    @Override
    public Widget render(Schema property) {
      HTMLPanel panel = new HTMLPanel("");
      panel.getElement().getStyle().setDisplay(Display.INLINE);

      panel.add(new InlineLabel("\""));
      if (property.locked()) {
        InlineLabel label = new InlineLabel();
        panel.add(label);
        hasText = label;
      } else {
        TextArea editor = new TextArea();
        panel.add(editor);
        hasText = editor;
      }
      panel.add(new InlineLabel("\""));

      if (property.getDefault() != null) {
        hasText.setText(property.getDefault());
      }
View Full Code Here

    container.addStyleName(style.parameterInput());
    table.setWidget(row, 1, container);

    // Start adding the next cell which will have the description of this param,
    // and potentially a link to open the fields editor.
    HTMLPanel panel = new HTMLPanel("");

    service.getParameters().get("fields").getDescription();
    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();
        }
      });
      panel.add(openFieldsEditor);

      fieldsEditor = new FieldsEditor(service, /* This is the root, no field name req'd */"");
      fieldsEditor.setProperties(responseSchema.getProperties());
      fieldsPlaceholder.add(fieldsEditor);
    }
View Full Code Here

   
      // or we can set an id on a specific element for styling

    RootPanel rootPanel = RootPanel.get();
     
      HTMLPanel panel = new HTMLPanel("");
      panel.addStyleName("centered");
      rootPanel.add(panel);
      TabPanel tabPanel = new TabPanel();
      panel.add(tabPanel);
     
    //TAB PELICULAS
    VerticalPanel verticalPanel = new VerticalPanel();
    tabPanel.add(verticalPanel, "Peliculas", true);
    verticalPanel.setSize("5cm", "3cm");
View Full Code Here

TOP

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

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.