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

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


        }

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

        mainLayout = new DockLayoutPanel(Unit.EM);

        final ScrollPanel mainPanel = new ScrollPanel();

        mainLayout.add(mainPanel);
View Full Code Here


         if (clazz == DockLayoutPanel.class) {
            String unit = (String) attributes.get("unit");
            Unit styleUnit = unit != null ? Unit.valueOf(unit) : Unit.PX;

            return new DockLayoutPanel(styleUnit);
         } else if (clazz == SplitLayoutPanel.class) {

            String splitterSize = (String) attributes.get("splitterSize");

            return splitterSize != null ? new SplitLayoutPanel(Integer.valueOf(splitterSize))
View Full Code Here

        sidebar.add(new HTML(TEMPLATES.secondaryHeader(Console.CONSTANTS.homepage_sidebar_header())));
        sidebarSections = new FlowPanel();
        sidebarSections.addStyleName("homepage-sidebar-sections");
        sidebar.add(sidebarSections);

        DockLayoutPanel root = new DockLayoutPanel(PCT);
        ScrollPanel sp = new ScrollPanel(sidebar);
        root.addEast(sp, 25);
        sp.getElement().getParentElement().addClassName("homepage-sidebar-root");
        sp = new ScrollPanel(main);
        root.add(sp);
        sp.getElement().getParentElement().addClassName("homepage-main-root");
        return root;
    }
View Full Code Here

        headerPanel.setStyleName("header-panel");

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

        panel = new DockLayoutPanel(Style.Unit.PX);
        panel.getElement().setAttribute("id", "container");

        panel.addNorth(headerPanel, 80);
        panel.addSouth(footerPanel, 42);
        panel.add(mainContentPanel);
View Full Code Here

        this.presenter = presenter;
        this.reference = reference;
    }

    public Widget asWidget() {
        DockLayoutPanel wrapper = new DockLayoutPanel(Style.Unit.PX);

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("fill-layout-width");

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

        final TextBoxItem nameItem = new TextBoxItem("key", Console.CONSTANTS.common_label_name());
        final TextAreaItem valueItem = new TextAreaItem("value", Console.CONSTANTS.common_label_value());

        form.setFields(nameItem, valueItem);

        DialogueOptions options = new DialogueOptions(
            new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    // save

                    // Not using form.getUpdatedEntity() here as this goes through a JSON
                    // serialization phase which causes issues with multi-line values
                    PropertyRecord property = factory.property().as();
                    property.setKey(nameItem.getValue());
                    property.setValue(valueItem.getValue());

                    presenter.onCreateProperty(reference, property);
                    presenter.closePropertyDialoge();
                }
            },
            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

        return this.limitChoices;
    }
   
    public Widget asWidget() {

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

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

        // borrow the PropertyRecord for simple binding of a String to the form
        final Form<PropertyRecord> form = new Form<PropertyRecord>(PropertyRecord.class);

        if (limitChoices) {
            this.nameItem = new ComboBoxItem("value", label);
        } else {
            this.nameItem = new TextBoxItem("value", label);
        }

        form.setFields(nameItem);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                         // save
                        PropertyRecord property = form.getUpdatedEntity();
                        if(!form.validate().hasErrors())
                            listManager.onCreateItem(property.getValue());
                    }
                },
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        // cancel
                        listManager.closeNewItemDialoge();
                    }
                }
        );

        panel.add(form.asWidget());

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

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

        panel = new DockLayoutPanel(Style.Unit.PX);
        panel.getElement().setAttribute("id", "container");

        panel.addNorth(headerPanel, 80);
        panel.addSouth(footerPanel, 42);
        panel.add(mainContentPanel);
View Full Code Here

        this.presenter = presenter;
        this.reference = reference;
    }

    public Widget asWidget() {
        DockLayoutPanel wrapper = new DockLayoutPanel(Style.Unit.PX);

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("fill-layout-width");

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

        final TextBoxItem nameItem = new TextBoxItem("key", Console.CONSTANTS.common_label_name());
        final TextAreaItem valueItem = new TextAreaItem("value", Console.CONSTANTS.common_label_value());

        form.setFields(nameItem, valueItem);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        // save

                        // Not using form.getUpdatedEntity() here as this goes through a JSON
                        // serialization phase which causes issues with multi-line values
                        PropertyRecord property = factory.property().as();
                        property.setKey(nameItem.getValue());
                        property.setValue(valueItem.getValue());

                        presenter.onCreateProperty(reference, property);
                        presenter.closePropertyDialoge();
                    }
                },
                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

        sidebar.add(new HTML(TEMPLATES.secondaryHeader(Console.CONSTANTS.homepage_sidebar_header())));
        sidebarSections = new FlowPanel();
        sidebarSections.addStyleName("homepage-sidebar-sections");
        sidebar.add(sidebarSections);

        DockLayoutPanel root = new DockLayoutPanel(PCT);
        ScrollPanel sp = new ScrollPanel(sidebar);
        root.addEast(sp, 25);
        sp.getElement().getParentElement().addClassName("homepage-sidebar-root");
        sp = new ScrollPanel(main);
        root.add(sp);
        sp.getElement().getParentElement().addClassName("homepage-main-root");
        return root;
    }
View Full Code Here

        initWidget(createLayout());
    }

    private DockLayoutPanel createLayout() {
        DockLayoutPanel layoutPanel = new DockLayoutPanel(Style.Unit.EM);

        layoutPanel.addSouth(createBottomPanel(), 2);
        layoutPanel.add(tabLayoutPanel);
        return layoutPanel;
    }
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.