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

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


  @Override
  public void onModuleLoad() {
    InitVotes.waitFor(Container.class);

    final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    final RootPanel rootPanel = RootPanel.get();
    final InterfaceInjectionContext ctx = bootstrapper.bootstrapContainer();

    for (Widget w : ctx.getToRootPanel()) {
      rootPanel.add(w);
    }

    for (Map.Entry<Widget, String> entry : ctx.getWidgetToPanel().entrySet()) {
      ctx.getPanels().get(entry.getValue()).add(entry.getKey());
    }
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);

        // 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

    Window.setTitle( Messages.getString( "productName" ) ); //$NON-NLS-1$

    MantleApplication mantle = MantleApplication.getInstance();
    mantle.loadApplication();

    RootPanel loadingPanel = RootPanel.get( "loading" ); //$NON-NLS-1$
    if ( loadingPanel != null ) {
      loadingPanel.removeFromParent();
      loadingPanel.setVisible( false );
      loadingPanel.setHeight( "0px" ); //$NON-NLS-1$
    }
  }
View Full Code Here

    // Avoids showing an "empty" cell
    jsonTree.setVisible(false);

    // Find out where the host page wants the button.
    //
    RootPanel searchButtonSlot = RootPanel.get("search");
    if (searchButtonSlot == null) {
      Window.alert("Please define a container element whose id is 'search'");
      return;
    }

    // Find out where the host page wants the tree view.
    //
    RootPanel treeViewSlot = RootPanel.get("tree");
    if (treeViewSlot == null) {
      Window.alert("Please define a container element whose id is 'tree'");
      return;
    }

    // Add both widgets.
    //
    searchButtonSlot.add(searchButton);
    treeViewSlot.add(jsonTree);
  }
View Full Code Here

      public void onClick(ClickEvent event) {
        lazy.setVisible(true);
      }
    });
   
    RootPanel root = RootPanel.get();
    root.add(b);
    root.add(lazy);
  }
View Full Code Here

      msg.indexOf("a.e is null") == -1) {
        MessageBox.alert(constants.error(), msg, null);
    } else {
      // Another hack to remove the drag insertion marks
      // if any are present...
      RootPanel rp = RootPanel.get();
      int widgetCount = rp.getWidgetCount();
      List <PaloInsert> dragMarks = new ArrayList<PaloInsert>();
      Widget w;
      for (int i = 0; i < widgetCount; i++) {
        if ((w = rp.getWidget(i)) instanceof PaloInsert) {
          dragMarks.add((PaloInsert) w);
        }
      }
      for (PaloInsert pi: dragMarks) {
        pi.remove();
      }
      List <PaloReplace> replaceMarks = new ArrayList<PaloReplace>();
      widgetCount = rp.getWidgetCount();
      for (int i = 0; i < widgetCount; i++) {
        if ((w = rp.getWidget(i)) instanceof PaloReplace) {
          replaceMarks.add((PaloReplace) w);
        }
      }
      for (PaloReplace pr: replaceMarks) {
        pr.remove();
View Full Code Here

public class Container implements EntryPoint {
    public void onModuleLoad() {
        final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);

        final RootPanel rootPanel = RootPanel.get();
        final InterfaceInjectionContext ctx = bootstrapper.bootstrapContainer();

        for (Widget w : ctx.getToRootPanel()) {
            rootPanel.add(w);
        }

        for (Map.Entry<Widget, String> entry : ctx.getWidgetToPanel().entrySet()) {
            ctx.getPanels().get(entry.getValue()).add(entry.getKey());
        }
View Full Code Here

    EMPLOYEES.add(new Employee("a","b"));
    EMPLOYEES.add(new Employee("a","b"));
    EMPLOYEES.add(new Employee("a","b"));
    // Add the nameField and sendButton to the RootPanel
    // Use RootPanel.get() to get the entire body element
    RootPanel rootPanel = RootPanel.get("nameFieldContainer");
    //rootPanel.setSize("", "");

    HorizontalPanel horizontalPanel = new HorizontalPanel();
    horizontalPanel.setBorderWidth(1);
    horizontalPanel.setSpacing(10);
    rootPanel.add(horizontalPanel);
    //horizontalPanel.setSize("448px", "105px");

    //Image image = new Image((String) null);
    //  image.setAltText("Profile picture");
    //horizontalPanel.add(image);
    //image.setSize("150px", "150px");

    Grid grid = new Grid(5, 2);
    grid.setBorderWidth(1);
    horizontalPanel.add(grid);
    horizontalPanel.setCellVerticalAlignment(grid, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.setSize("236px", "123px");

    Label lblName = new Label("Name ");
    lblName.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    grid.setWidget(0, 0, lblName);

    Label lblNewLabel = new Label("Some Name ");
    lblNewLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(0, 1, lblNewLabel);

    Label lblNewLabel_1 = new Label("ID");
    lblNewLabel_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    grid.setWidget(1, 0, lblNewLabel_1);

    Label lblNewLabel_2 = new Label("###### ");
    lblNewLabel_2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(1, 1, lblNewLabel_2);

    Label lblNewLabel_3 = new Label("Grade2 ");
    lblNewLabel_3.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    grid.setWidget(2, 0, lblNewLabel_3);

    Label lblNewLabel_5 = new Label("##");
    lblNewLabel_5.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(2, 1, lblNewLabel_5);

    Label lblNewLabel_6 = new Label("Club ");
    lblNewLabel_6.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    grid.setWidget(3, 0, lblNewLabel_6);

    Label lblNewLabel_4 = new Label("Some Club");
    lblNewLabel_4.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(3, 1, lblNewLabel_4);

    Label lblNewLabel_7 = new Label("Total Carbon ");
    lblNewLabel_7.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    grid.setWidget(4, 0, lblNewLabel_7);

    Label lblNewLabel_8 = new Label("##");
    lblNewLabel_8.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(4, 1, lblNewLabel_8);

    HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
    horizontalPanel_1.setBorderWidth(1);
    //  rootPanel.add(horizontalPanel_1);
    horizontalPanel_1.setSize("445px", "111px");

    TabPanel tabPanel = new TabPanel();
    //horizontalPanel_1.add(tabPanel);
    tabPanel.setWidth("442px");

    HTMLPanel panel = new HTMLPanel("New HTML");
    tabPanel.add(panel, "New tab", false);
    panel.setSize("5cm", "3cm");

    HTMLPanel panel_1 = new HTMLPanel("New HTML");
    tabPanel.add(panel_1, "New tab", false);
    panel_1.setSize("5cm", "3cm");

    SimplePanel simplePanel_1 = new SimplePanel();
    rootPanel.add(simplePanel_1);

    DockPanel dockPanel = new DockPanel();
    rootPanel.add(dockPanel);
    dockPanel.setSize("533px", "307px");

    final DataGrid<Employee> dataGrid = new DataGrid<Employee>();
    dockPanel.add(dataGrid, DockPanel.CENTER);
    dataGrid.setWidth("250px");
View Full Code Here

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class LoginManager implements EntryPoint {
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();
   
    HorizontalPanel horizontalPanel = new HorizontalPanel();
    rootPanel.add(horizontalPanel, 10, 10);
    horizontalPanel.setSize("470px", "212px");
   
    VerticalPanel verticalPanel = new VerticalPanel();
    horizontalPanel.add(verticalPanel);
   
View Full Code Here

  private static final int REFRESH_INTERVAL = 5000;
  private Image image;
  private Label lblStockWatcher;
 
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();
    {
      mainPanel = new VerticalPanel();
      rootPanel.add(mainPanel, 5, 5);
      mainPanel.setSize("440px", "290px");
      {
        image = new Image("images/googlecode.png");
        mainPanel.add(image);
      }
View Full Code Here

TOP

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

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.