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

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


    private StackLayoutPanel stack;
    private DockLayoutPanel layout;

    public LHSHostsNavigation() {

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

        selector = new HostSelector();
        final Widget selectorWidget = selector.asWidget();
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);


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

        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());

        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

            addAdminPanel();
        }
    }

    private void addAdminPanel() {
        DockLayoutPanel adminDockLayoutPanel = new DockLayoutPanel(Unit.EM);
        AdministrationTree deploymentTreeItem = new AdministrationTree();
        ScrollPanel adminTreeItemPanel = new ScrollPanel(deploymentTreeItem);

        adminDockLayoutPanel.add(adminTreeItemPanel);

        layout.add(adminDockLayoutPanel,
                deploymentTreeItem.getHeaderHTML(),
                2);
    }
View Full Code Here

                deploymentTreeItem.getHeaderHTML(),
                2);
    }

    private void addDeploymentPanel() {
        DockLayoutPanel deploymentDockLayoutPanel = new DockLayoutPanel(Unit.EM);
        DeploymentTree deploymentTreeItem = new DeploymentTree();
        ScrollPanel deploymentTreeItemPanel = new ScrollPanel(deploymentTreeItem);

        if (CapabilitiesManager.getInstance().shouldShow(Capabilities.SHOW_CREATE_NEW_ASSET)) {
            deploymentDockLayoutPanel.addNorth(DeploymentNewMenu.getMenu(deploymentTreeItem),
                    2);
        }

        deploymentDockLayoutPanel.add(deploymentTreeItemPanel);

        layout.add(deploymentDockLayoutPanel,
                deploymentTreeItem.getHeaderHTML(),
                2);
    }
View Full Code Here

                deploymentTreeItem.getHeaderHTML(),
                2);
    }

    private void addQAPanel() {
        DockLayoutPanel qaDockLayoutPanel = new DockLayoutPanel(Unit.EM);
        QATree qaTreeItem = new QATree();
        ScrollPanel qaTreeItemPanel = new ScrollPanel(qaTreeItem);

        qaDockLayoutPanel.add(qaTreeItemPanel);

        layout.add(qaDockLayoutPanel,
                qaTreeItem.getHeaderHTML(),
                2);
    }
View Full Code Here

                qaTreeItem.getHeaderHTML(),
                2);
    }

    private void addPackagesPanel() {
        DockLayoutPanel packageDockLayoutPanel = new DockLayoutPanel(Unit.EM);
        final PackagesTree packagesTreeItem = new PackagesTree();
        ScrollPanel packagesTreeItemPanel = new ScrollPanel(packagesTreeItem);

        if (CapabilitiesManager.getInstance().shouldShow(Capabilities.SHOW_CREATE_NEW_ASSET)) {
            packageDockLayoutPanel.addNorth(PackagesNewMenu.getMenu(packagesTreeItem),
                    2);
        }
        packageDockLayoutPanel.add(packagesTreeItemPanel);

        layout.add(packageDockLayoutPanel,
                packagesTreeItem.getHeaderHTML(),
                2);
View Full Code Here

            }
        });
    }

    private void addCategoriesPanel() {
        DockLayoutPanel browseDockLayoutPanel = new DockLayoutPanel(Unit.EM);
        BrowseTree categoriesTreeItem = new BrowseTree();
        ScrollPanel categoriesTreeItemPanel = new ScrollPanel(categoriesTreeItem);

        if (CapabilitiesManager.getInstance().shouldShow(Capabilities.SHOW_CREATE_NEW_ASSET)) {
            browseDockLayoutPanel.addNorth(RulesNewMenu.getMenu(categoriesTreeItem),
                    2);
        }
        browseDockLayoutPanel.add(categoriesTreeItemPanel);

        layout.add(browseDockLayoutPanel,
                categoriesTreeItem.getHeaderHTML(),
                2);
    }
View Full Code Here

        tabLayoutPanel = new ScrollTabLayoutPanel(2,
                Unit.EM);

        Constants constants = GWT.create(Constants.class);

        DockLayoutPanel layoutPanel = new DockLayoutPanel(Unit.EM);
        Button button = new Button(constants.CloseAllItems());
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                closeAll();
            }
        });

        HorizontalPanel bottomPanel = new HorizontalPanel();
        bottomPanel.setWidth("100%");
        bottomPanel.setStyleName("bottom-panel");
        bottomPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
        bottomPanel.add(button);

        layoutPanel.addSouth(bottomPanel, 2);
        layoutPanel.add(tabLayoutPanel);

        initWidget(layoutPanel);

        TabOpener.initIstance(this);
        TabOpener.getInstance().openFind();
View Full Code Here

    private Command afterShowEvent;
    private boolean fixedLocation = false;

    public DefaultWindow(String title) {

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

        final PopupTitleBar header = new PopupTitleBar(title, this);

        // dnd

        header.addMouseDownHandler( new MouseDownHandler() {

            public void onMouseDown(MouseDownEvent event) {
                dragged = true;
                dragStartX = event.getRelativeX( getElement() );
                dragStartY = event.getRelativeY( getElement() );
                DOM.setCapture(header.getElement());
            }
        } );
        header.addMouseMoveHandler( new MouseMoveHandler() {

            public void onMouseMove(MouseMoveEvent event) {
                if ( dragged ) {
                    setPopupPosition( event.getClientX() - dragStartX,
                            event.getClientY() - dragStartY );
                }
            }
        } );
        header.addMouseUpHandler( new MouseUpHandler() {

            public void onMouseUp(MouseUpEvent event) {
                dragged = false;
                DOM.releaseCapture( header.getElement() );
            }
        } );


        layout.addNorth(header, 40);

        HorizontalPanel footer = new HorizontalPanel();
        footer.setStyleName("default-window-footer");

        HTML footerLabel = new HTML("&nbsp;");
        footer.add(footerLabel);

        footerLabel.getElement().getParentElement().setAttribute("width", "100%");

        layout.addSouth(footer, 16);

        content = new LayoutPanel();
        content.setStyleName("default-window-content");
        layout.add(content);

        super.setWidget(layout);

        // default width(height
        int winWidth = (int)(Window.getClientWidth()*0.9);
 
View Full Code Here

        this(presenter, reference, false);
    }

    public Widget asWidget() {

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

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

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

        TextBoxItem nameItem = new TextBoxItem("key", "Name");
        TextBoxItem valueItem = new TextBoxItem("value", "Value");
        CheckBoxItem bootItem = new CheckBoxItem("bootTime", "Boot-Time");

        if(Console.MODULES.getBootstrapContext().isStandalone() || !includeBootTime)
            form.setFields(nameItem, valueItem);
        else
            form.setFields(nameItem, valueItem, bootItem);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                         // save
                        PropertyRecord property = form.getUpdatedEntity();
                        if(!form.validate().hasErrors())
                            presenter.onCreateProperty(reference, property);
                    }
                },
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        // cancel
                        presenter.closePropertyDialoge();
                    }
                }
        );

        panel.add(form.asWidget());

        wrapper.addSouth(options, 35);
        wrapper.add(panel);
        return wrapper;
    }
View Full Code Here

TOP

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

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.