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

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


        // iview is focused when created so element needs tabIndex
        // 1 due 0 is at the end of natural tabbing order
        DOM.setElementProperty(getElement(), "tabIndex", "1");

        RootPanel root = RootPanel.get(rootPanelId);

        // Remove the v-app-loading or any splash screen added inside the div by
        // the user
        root.getElement().setInnerHTML("");
        // For backwards compatibility with static index pages only.
        // No longer added by AbstractApplicationServlet/Portlet
        root.removeStyleName("v-app-loading");

        root.add(this);

        if (applicationConnection.getConfiguration().isStandalone()) {
            // set focus to iview element by default to listen possible keyboard
            // shortcuts. For embedded applications this is unacceptable as we
            // don't want to steal focus from the main page nor we don't want
View Full Code Here


   * This is the entry point method.
   */
  public void onModuleLoad() {
   
    // initialize the layout with panels
    RootPanel mainContainer = RootPanel.get("main-container");
    HorizontalPanel mainPanel = new HorizontalPanel();
    mainPanel.setTitle("main-panel");
    mainPanel.setWidth("100%");
    mainPanel.setHeight("100%");
    mainPanel.setSpacing(2);
    mainContainer.add(mainPanel);
   
    VerticalPanel leftPanel = new VerticalPanel();
    leftPanel.setTitle("left-panel");
    leftPanel.setWidth("95%%");
    leftPanel.setHeight("100%");
View Full Code Here

        // iview is focused when created so element needs tabIndex
        // 1 due 0 is at the end of natural tabbing order
        DOM.setElementProperty(getElement(), "tabIndex", "1");

        RootPanel root = RootPanel.get(rootPanelId);
        root.add(this);
        root.removeStyleName("v-app-loading");

        BrowserInfo browser = BrowserInfo.get();

        // set focus to iview element by default to listen possible keyboard
        // shortcuts
View Full Code Here

            w = (Widget) client.getPaintable(pid);
        }
        if (w == null) {
            // Check if the element is part of a widget that is attached
            // directly to the root panel
            RootPanel rootPanel = RootPanel.get();
            int rootWidgetCount = rootPanel.getWidgetCount();
            for (int i = 0; i < rootWidgetCount; i++) {
                Widget rootWidget = rootPanel.getWidget(i);
                if (rootWidget.getElement().isOrHasChild(targetElement)) {
                    // The target element is contained by this root widget
                    w = findParentWidget(targetElement, rootWidget);
                    break;
                }
View Full Code Here

    protected void onDraw() {
        //a GWT widget must be attached to a GWT Panel for its events to fire.
        boolean attached = widget.isAttached();
        if (!attached) {
            RootPanel rp = RootPanel.get(this.getID() + "_widget");
            rp.add(widget);
            String width = DOM.getStyleAttribute(widget.getElement(), "width");
            if (width != null && !width.equals("")) {
                setWidth(width);
            }
            String height = DOM.getStyleAttribute(widget.getElement(), "height");
View Full Code Here

    CellPanel spacerPanel = new HorizontalPanel();
    spacerPanel.setSpacing(10);
    spacerPanel.add(new Label());
    topPanel.add(spacerPanel);
    topPanel.add(reportPanel);
    final RootPanel root = RootPanel.get();

    root.add(topPanel);

    statusLabel = new HTML("Select a report.");
    root.add(statusLabel);
  }
View Full Code Here

        slideC.addToContent(blockC);
        slideC.addCloseButton("close");

        //- - -

        RootPanel root = RootPanel.get();
       
        if(parameters.get("auto", true)) {
            ShowAndHidePanelGroup group = new ShowAndHidePanelGroup();
            slideA.setGroup(group);
            slideB.setGroup(group);
            slideC.setGroup(group);
        }
       
        Widget buttonA;
        Widget buttonB;
        Widget buttonC;
       
        if(parameters.get("button", true)) {
            buttonA = slideA.createButton("Show Slide A", "Lorem ipsum dolor sit amet");
            buttonB = slideB.createButton("Show Slide B", "Lorem ipsum dolor sit amet");
            buttonC = slideC.createButton("Show Slide C", "Lorem ipsum dolor sit amet");
        }
        else {
            buttonA = slideA.createAnchor("Show Slide A", "Lorem ipsum dolor sit amet");
            buttonB = slideB.createAnchor("Show Slide B", "Lorem ipsum dolor sit amet");
            buttonC = slideC.createAnchor("Show Slide C", "Lorem ipsum dolor sit amet");
        }
       
        //listener
        slideA.addShowAndHidePanelEventHandler(new ShowAndHidePanelEventHandler() {
            @Override
            public void show(ShowAndHidePanelEvent showAndHidePanelEvent) {
                System.out.println("EventBus: Show SlideA");
            }
           
            @Override
            public void hide(ShowAndHidePanelEvent showAndHidePanelEvent) {
                System.out.println("EventBus: Hide SlideA");
            }
        });
       
        int demo = parameters.get("demo", 1);
       
        if(demo==1) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("accordion");
           
            slides.add(buttonA);
            slides.add(slideA);
            slides.add(buttonB);
            slides.add(slideB);
            slides.add(buttonC);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==2) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("flow");
           
            slides.add(buttonA);
            slides.add(slideA);
            slides.add(buttonB);
            slides.add(slideB);
            slides.add(buttonC);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==3) {
            FlowPanel tabs = new FlowPanel();
            tabs.getElement().setClassName("tabs");
           
            tabs.add(buttonA);
            tabs.add(buttonB);
            tabs.add(buttonC);
           
            tabs.add(new HTML("<div class=\"clear\"></div>"));
           
            root.add(tabs);
           
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides");
            slides.getElement().addClassName("slide-panels");
           
            slides.add(slideA);
            slides.add(slideB);
            slides.add(slideC);
           
            root.add(slides);
        }
        else
        if(demo==4) {
            FlowPanel slides = new FlowPanel();
            slides.getElement().setClassName("slides-top");
            slides.getElement().addClassName("slide-panels");
           
            slides.add(slideA);
            slides.add(slideB);
            slides.add(slideC);
           
            root.add(slides);
           
            FlowPanel tabs = new FlowPanel();
            tabs.getElement().setClassName("tabs-bottom");
           
            tabs.add(buttonA);
            tabs.add(buttonB);
            tabs.add(buttonC);
           
            tabs.add(new HTML("<div class=\"clear\"></div>"));
           
            root.add(tabs);
        }
    }
View Full Code Here

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class GxtDemo implements EntryPoint {
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();
    rootPanel.add(new Test());   
  }
View Full Code Here

    private final LoginPanel messagePanel = new LoginPanel(loginListener);

    private LoginDialogBox defaultLoginDialogBox;

    public void onModuleLoad() {
        final RootPanel defaultLoginPanelRoot = RootPanel.get("defaultLoginPanel");
        defaultLoginPanelRoot.add(defaultPanel);

        final RootPanel defaultLoginDialogBoxRoot = RootPanel.get("defaultLoginDialogBox");
        defaultLoginDialogBox = new LoginDialogBox(loginListener);
        final Button defaultLoginDialogBoxButton = new Button("Show");
        defaultLoginDialogBoxButton.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                defaultLoginDialogBox.setPopupPosition(100,100);
                defaultLoginDialogBox.show();
                Window.alert("clicked");
            }
        });
        defaultLoginDialogBoxRoot.add(defaultLoginDialogBoxButton);



        final RootPanel bannerLoginPanel = RootPanel.get("bannerLoginPanel");
        final Image banner = new Image("http://code.google.com/images/code_sm.png");
        bannerPanel.setBanner(banner);
        bannerLoginPanel.add(bannerPanel);

        final RootPanel messageLoginPanel = RootPanel.get("messageLoginPanel");
        messagePanel.setMessage("Please login.");
        messageLoginPanel.add(messagePanel);

    }
View Full Code Here

            }
        }
        if (w == null) {
            // Check if the element is part of a widget that is attached
            // directly to the root panel
            RootPanel rootPanel = RootPanel.get();
            int rootWidgetCount = rootPanel.getWidgetCount();
            for (int i = 0; i < rootWidgetCount; i++) {
                Widget rootWidget = rootPanel.getWidget(i);
                if (rootWidget.getElement().isOrHasChild(targetElement)) {
                    // The target element is contained by this root widget
                    w = findParentWidget(targetElement, rootWidget);
                    break;
                }
View Full Code Here

TOP

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

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.