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

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


          url.addParameter("userToken", command.getUserToken());
          if ("save".equals(downloadTypeGroup.getValue())) {
            url.addParameter("download", "1");
            String encodedUrl = url.toString();
            // create a hidden iframe to avoid popups ???
            HTMLPanel hiddenFrame = new HTMLPanel("<iframe src='" + encodedUrl
                + "'+style='position:absolute;width:0;height:0;border:0'>");
            hiddenFrame.setVisible(false);
            addChild(hiddenFrame);
          } else {
            url.addParameter("download", "0");
            String encodedUrl = url.toString();
            com.google.gwt.user.client.Window.open(encodedUrl, "_blank", null);
View Full Code Here


        password.getElement().setAttribute("required", "required");

        //
        signupParaElement.setInnerHTML(i18n.login_signup("#" + SignUpPlace.PREFIX + ":"));

        final HTMLPanel passwordHintHtml = new HTMLPanel(i18n.login_passwordHint());
        final NodeList<Element> anchors = passwordHintHtml.getElement().getElementsByTagName("a");
        final Element a = anchors.getItem(0);
        final Anchor link = new Anchor(a.getInnerHTML());
        link.getElement().setId("signUpLink");
        link.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(final ClickEvent event) {
                delegate.onPasswordHintClick();
            }
        });
        passwordHintHtml.addAndReplaceElement(link, a);
        try {// fails on dev mode..
            HTMLPanel.wrap(passwordHintParaElement).add(passwordHintHtml);
        } catch (final Throwable e) {
            e.printStackTrace();
        }

        final HTMLPanel passwordRecoveryParaHtml = new HTMLPanel(i18n.updatePassword_requestRecoveryTokenLink());
        final Element passwordRecoveryA = passwordRecoveryParaHtml.getElement().getElementsByTagName("a").getItem(0);
        final Anchor passwordRecoveryLink = new Anchor(passwordRecoveryA.getInnerHTML());
        passwordRecoveryLink.getElement().setId("requestRecoveryTokenLink");
        passwordRecoveryLink.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(final ClickEvent event) {
                delegate.onRequestPasswordRecoveryClick();
            }
        });
        passwordRecoveryParaHtml.addAndReplaceElement(passwordRecoveryLink, passwordRecoveryA);

        try {// fails on dev mode..
            HTMLPanel.wrap(requestRecoveryTokenElement).add(passwordRecoveryParaHtml);
        } catch (final Throwable e) {
            e.printStackTrace();
View Full Code Here

    private final static Templates TEMPLATES = GWT.create(Templates.class);

    public InfoBox(final String token, final String title, final String description) {
        String linkId = IdHelper.asId(getClass(), "_" + token);
        HTMLPanel panel = new HTMLPanel(TEMPLATES.infoBox(linkId, description));
        InlineHyperlink hyperlink = new InlineHyperlink(title, token);
        hyperlink.addStyleName("homepage-link");
        panel.add(hyperlink, linkId);

        initWidget(panel);
    }
View Full Code Here

   }

   @Override
   protected Widget createMainWidget()
   {
      HTMLPanel widget = GWT.<Binder>create(Binder.class).createAndBindUi(this);

      inputElements_ = new InputElement[] {
            radioWorking_,
            radioMineConflict_,
            radioTheirsConflict_,
View Full Code Here

            i+=col;
        }

        builder.appendHtmlConstant(tableSuffix);

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

        // inline widget
        for(String key : itemKeys)
        {
            FormItem item = groupItems.get(key);
            final String widgetId = id + key;
            final String labelId = id + key+"_l"; // aria property key
            final String insertId = id + key+"_i";

            Element input = item.getInputElement();
            if(input!=null)
            {
                input.setAttribute("id", widgetId);
                //widget.getElement().setAttribute("tabindex", "0");
                input.setAttribute("aria-labelledby", labelId);
                input.setAttribute("aria-required", String.valueOf(item.isRequired()));
            }
            panel.add(item.asWidget(), insertId);

        }

        return panel;
    }
View Full Code Here

    }

    @Override
    public Widget render(RenderMetaData metaData, String groupName, Map<String, FormItem> groupItems) {

        HTMLPanel html = createFieldsetPanel(groupName);

        DefaultGroupRenderer defaultGroupRenderer = new DefaultGroupRenderer();
        Widget defaultGroupWidget = defaultGroupRenderer.render(metaData, "", groupItems);
        html.add(defaultGroupWidget,id);

        return html;
    }
View Full Code Here

        return html;
    }

    @Override
    public Widget renderPlain(RenderMetaData metaData, String groupName, PlainFormView plainView) {
        HTMLPanel html = createFieldsetPanel(groupName);
        html.add(plainView.asWidget(metaData),id);
        return html;
    }
View Full Code Here

        builder.appendHtmlConstant("<fieldset id='"+id+"' class='default-fieldset'>");
        builder.appendHtmlConstant("<legend class='default-legend'>").appendEscaped(groupName).appendHtmlConstant("</legend>");
        builder.appendHtmlConstant("</fieldset>");

        return new HTMLPanel(builder.toSafeHtml());
    }
View Full Code Here

                return true;
            }
        });

        Widget widget = renderer.render(rmd, "groupName", groupItems);
        HTMLPanel panel = (HTMLPanel) widget;
        String html = panel.getElement().getInnerHTML();

        assertTrue(html.contains("Foo:"));
        assertTrue(html.contains("Zoo:"));
        assertFalse("Bar should not be rendered", html.contains("Bar:"));
    }
View Full Code Here

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

                            HTMLPanel explanation = new HTMLPanel("<center><div style='padding-top:150px;'><h2>The web console could not be loaded.</h2>"+cause+"</div></center>");
                            RootLayoutPanel.get().add(explanation);
                        }
                    }
                });
            }
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.