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

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


    int width, height;

    public DefaultWindow(String title) {

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

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

        HTML titleText = new HTML(title);
        titleText.getElement().setAttribute("style", "padding:5px");

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

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

        // it's just a table ...
        titleText.getElement().getParentElement().setAttribute("width", "100%");
        closeIcon.getElement().getParentElement().setAttribute("width", "16px");
        closeIcon.getElement().getParentElement().setAttribute("style", "width:16px;padding-right:5px");

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

        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


        window.setWidth(width);
        window.setHeight(height);

        window.setGlassEnabled(true);

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

        HTML text = new HTML(message);
        text.getElement().setAttribute("style", "margin:10px;");

        ClickHandler confirmHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                handler.onConfirmation(true);
                window.hide();
            }
        };

        ClickHandler cancelHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                handler.onConfirmation(false);
                window.hide();
            }
        };

        DialogueOptions options = new DialogueOptions("OK", confirmHandler, "Cancel", cancelHandler);
        options.getElement().setAttribute("style", "margin-bottom:10px;");
        panel.addSouth(options, 35);
        panel.add(text);


        window.setWidget(panel);

        window.center();
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());
        TextBoxItem heapItem = new TextBoxItem("heapSize", "Heap Size");
        TextBoxItem maxHeapItem = new TextBoxItem("maxHeapSize", "Max Heap Size");
        //CheckBoxItem debugItem = new CheckBoxItem("debugEnabled", "Debug Enabled?");
        //TextBoxItem debugOptionsItem = new TextBoxItem("debugOptions", "Debug Options");

        form.setFields(nameItem, heapItem, maxHeapItem);


         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) {
                        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

        this.reference = reference;
    }

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

        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

        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") {
            @Override
            public void setFiltered(boolean filtered) {
                // cannot be filtered (workaround)
            }
        };
        TextAreaItem valueItem = new TextAreaItem("value", "Value") {
            @Override
            public void setFiltered(boolean filtered) {
                // cannot be filtered (workaround)
            }
        };
        valueItem.setVisibleLines(2);

        CheckBoxItem bootItem = new CheckBoxItem("bootTime", "Boot-Time");

        if(Console.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

    MapOptions opts = MapOptions.newInstance();
    opts.setMapTypeId();
//    opts.setCenter(LatLng.newInstance(37.760773,-122.434448));
//    opts.setZoom(14);
   
    DockLayoutPanel mainDock = new DockLayoutPanel(Unit.EM);
    RootLayoutPanel.get().add(mainDock);
   
    FlowPanel controls = new FlowPanel();
    controls.setStyleName("controls");
    mainDock.addNorth(controls, 2);
   
    final MapWidget map = new MapWidget(opts);
    mainDock.add(map);

    LatLngBounds bounds = LatLngBounds.newInstance();
    bounds.extend(LatLng.newInstance(37.660773,-122.534448));
    bounds.extend(LatLng.newInstance(37.860773,-122.334448));
    map.fitBounds(bounds);
View Full Code Here

                            Widget mainWidget,
                            IsWidgetWithHeight statusBar)
   {
      mainWidget_ = mainWidget;

      panel_ = new DockLayoutPanel(Unit.PX);
      panel_.addNorth(toolbar, toolbar.getHeight());
     
      if (secondaryToolbar != null)
         panel_.addNorth(secondaryToolbar, secondaryToolbar.getHeight());
     
View Full Code Here

        sidebar.add(new HTML(TEMPLATES.sidebarHeader(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

        center.add(new HTML("<p>"));
        center.add(decorate(tradePanel));
        center.add(new HTML("<p>"));
        center.add(decorate(serverPanel));
       
        DockLayoutPanel main = new DockLayoutPanel(unit);
       
        main.addNorth(createHeader(), headerHeight);
        main.addSouth(createFooter(), footerHeight);
        main.addWest(west, westWidth);
        main.add(center);

        RootLayoutPanel.get().add(main);
        main.animate(500);
        setUpHelp();
        stockPanel.startStockWatcher();
        tradePanel.startTradableRefresher();
    }
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.