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

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


    p.add(foo, new Label("foo"));

    // Add the 'bar' label in a nested LayoutPanel. This is meant to test that
    // layout propagates correctly into nested layout panels (something that
    // should happen naturally, but we have a specific hack for on IE8).
    final DockLayoutPanel inner = new DockLayoutPanel(Unit.EM);
    final Label bar = new Label("bar");
    inner.addSouth(bar, 2);
    inner.add(new Label("center"));
    p.add(inner, new Label("bar"));

    delayTestFinish(2000);
    DeferredCommand.addCommand(new Command() {
      @Override
View Full Code Here


      filePathToolbar_ = new FilePathToolbar(new DisplayObserverProxy());

      // create file list and file progress
      filesList_ = new FilesList(new DisplayObserverProxy(), fileTypeRegistry_);

      DockLayoutPanel dockPanel = new DockLayoutPanel(Unit.PX);
      dockPanel.addNorth(filePathToolbar_, filePathToolbar_.getHeight());
      dockPanel.add(filesList_);
      // return container
      return dockPanel;
   }
View Full Code Here

{
   public HistoryTableWithToolbar(HistoryTable table,
                                  Widget[] leftWidgets,
                                  Widget[] rightWidgets)
   {
      DockLayoutPanel panel = new DockLayoutPanel(Unit.PX);

      Shelf toolbar = new Shelf();
      toolbar.setWidth("100%");
     
      if (leftWidgets != null)
      {
         for (int i = 0; i < leftWidgets.length; i++)
         {
            toolbar.addLeftWidget(leftWidgets[i]);
         }
      }
      if (rightWidgets != null)
      {
         for (int i = 0; i < rightWidgets.length; i++)
         {
            toolbar.addRightWidget(rightWidgets[i]);
         }
      }
      panel.addNorth(toolbar, toolbar.getHeight());

      historyTable_ = table;
      scrollPanel_ = new ScrollPanel(historyTable_);
      scrollPanel_.getElement().getStyle().setProperty("overflowX", "hidden");
      scrollPanel_.setSize("100%", "100%");
      panel.add(scrollPanel_);

      historyTable_.setOwningScrollPanel(scrollPanel_);

      initWidget(panel);
   }
View Full Code Here

        this.options = options;
        this.content = contentPanel;
    }

    public Widget build() {
        DockLayoutPanel wrapper = new DockLayoutPanel(Style.Unit.PX);
        wrapper.addSouth(options, 35);

        ScrollPanel scroll = new ScrollPanel(content);
        wrapper.add(scroll);

        return wrapper;
    }
View Full Code Here

    private Element lastFocus = null;

    public DefaultWindow(String title) {

        layout = new DockLayoutPanel(Style.Unit.PX) ;
        setStyleName("default-window");

        final WindowHeader header = new WindowHeader(title, this);
        layout.getElement().setAttribute(Aria.ROLE, Aria.DIALOG);
        layout.getElement().setAttribute(Aria.LABELLED_BY, header.getHeaderId());
View Full Code Here

        this.currentHost = currentHost;
    }

    Widget asWidget() {

        DockLayoutPanel wrapper = new DockLayoutPanel(Style.Unit.PX);

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

        final Form<Jvm> form = new Form<Jvm>(Jvm.class);

        TextBoxItem nameItem = new TextBoxItem("name", Console.CONSTANTS.common_label_name());
        HeapBoxItem heapItem = new HeapBoxItem("heapSize", "Heap Size");
        HeapBoxItem maxHeapItem = new HeapBoxItem("maxHeapSize", "Max Heap Size");
        HeapBoxItem permgen = new HeapBoxItem("permgen", "Permgen Size", false);
        HeapBoxItem maxPermgen = new HeapBoxItem("maxPermgen", "Max Permgen Size", false);

        form.setFields(nameItem, heapItem, maxHeapItem, permgen, maxPermgen);


         final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
                        ModelNode address = new ModelNode();
                        address.add("host", Console.MODULES.getCurrentSelectedHost().getName());
                        address.add("jvm", "*");
                        return address;
                    }
                }, form
        );
        layout.add(helpPanel.asWidget());

        layout.add(form.asWidget());

        heapItem.setValue("64m");
        maxHeapItem.setValue("256m");
        permgen.setValue("128m");
        maxPermgen.setValue("128m");

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {

                    @Override
                    public void onClick(ClickEvent event) {

                        FormValidation validation = form.validate();
                        if(!validation.hasErrors())
                        {
                            presenter.onCreateJvm(currentHost.getName(), form.getUpdatedEntity());
                        }
                    }
                },
                new ClickHandler() {

                    @Override
                    public void onClick(ClickEvent event) {
                        presenter.closeDialogue();
                    }
                }
        );


        wrapper.addSouth(options, 35);
        wrapper.add(layout);

        return wrapper;
    }
View Full Code Here

    LOG.info("SimpleWebClient.onModuleLoad() done");
  }

  private void setupUi() {
    // Set up UI
    DockLayoutPanel self = BINDER.createAndBindUi(this);
    RootPanel.get("app").add(self);
    // DockLayoutPanel forcibly conflicts with sensible layout control, and
    // sticks inline styles on elements without permission. They must be
    // cleared.
    self.getElement().getStyle().clearPosition();
    splitPanel.setWidgetMinSize(searchPanel, 300);
    AttachmentManagerProvider.init(AttachmentManagerImpl.getInstance());

    if (LogLevel.showDebug()) {
      logPanel.enable();
View Full Code Here

        }

        //init JS hooks
        this.setHooks( this );

        mainLayout = new DockLayoutPanel( Unit.EM );

        final ScrollPanel mainPanel = new ScrollPanel();

        mainLayout.add( mainPanel );
View Full Code Here

        headerPanel.setStyleName("header-panel");

        footerPanel = new LayoutPanel();
        footerPanel.setStyleName("footer-panel");

        panel = new DockLayoutPanel(Style.Unit.PX);
        panel.addNorth(headerPanel, 64);
        panel.addSouth(footerPanel, 30);
        panel.add(mainContentPanel);

        header = Console.MODULES.getHeader();
View Full Code Here

        popup.setWidth("640px");
        popup.setHeight("480px");
        popup.setGlassEnabled(true);
        popup.setAutoHideEnabled(true);

        DockLayoutPanel layout = new DockLayoutPanel(Style.Unit.PX);

        HorizontalPanel header = new HorizontalPanel();
        header.setStyleName("default-window-header");
        header.getElement().setAttribute("cellpadding", "4");

        HTML titleText = new HTML(Console.CONSTANTS.common_label_settings());

        Image closeIcon = new Image(Icons.INSTANCE.close());
        closeIcon.setAltText("Close");
        closeIcon.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {
                presenter.hideView();
            }
        });

        header.add(titleText);
        header.add(closeIcon);

        // it's just a table ...
        titleText.getElement().getParentElement().setAttribute("width", "100%");
        closeIcon.getElement().getParentElement().setAttribute("width", "16px");

        //header.setWidgetRightWidth(closeIcon, 5, Style.Unit.PX, 16, Style.Unit.PX);
        //header.setWidgetRightWidth(titleText, 21, Style.Unit.PX, 95, Style.Unit.PCT);

        layout.addNorth(header, 25);


        createContents(layout);

        popup.setWidget(layout);
View Full Code Here

TOP

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

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.