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

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


        }

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

        DockLayoutPanel mainLayout = new DockLayoutPanel(Unit.EM);

        final ScrollPanel mainPanel = new ScrollPanel();

        mainLayout.add(mainPanel);

        //The package must exist (because we need at least a model to work with)
        //To make things easier (to me), the category must exist too.
        standaloneEditorService.getInvocationParameters(parametersUUID, new GenericCallback<StandaloneEditorInvocationParameters>() {
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

        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

        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

        this(presenter, reference, true);
    }

    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

    navBar.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    navBar.add(innerNavBar);
    navBar.setWidth("100%");

    DockLayoutPanel dock = new DockLayoutPanel(Unit.EM);
    dock.addNorth(header, 2);
    dock.add(new ScrollPanel(table));
    header.setWidth("100%");
    table.setWidth("100%");

    initWidget(dock);
    setStyleName("mail-List");
View Full Code Here

  /**
   * This method constructs the application user interface by instantiating
   * controls and hooking up event handler.
   */
  public void onModuleLoad() {
    DockLayoutPanel outer = binder.createAndBindUi(this);

    // Get rid of scrollbars, and clear out the window's built-in margin,
    // because we want to take advantage of the entire client area.
    Window.enableScrolling(false);
    Window.setMargin("0px");

    // Special-case stuff to make topPanel overhang a bit.
    Element topElem = outer.getWidgetContainerElement(topPanel);
    topElem.getStyle().setZIndex(2);
    topElem.getStyle().setOverflow(Overflow.VISIBLE);

    // Listen for item selection, displaying the currently-selected item in
    // the detail area.
View Full Code Here

    private boolean fixedLocation = false;
    private DockLayoutPanel layout;

    public DefaultWindow(String title) {

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

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

        // dnd
View Full Code Here

        }

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

        DockLayoutPanel mainLayout = new DockLayoutPanel(Unit.EM);

        final ScrollPanel mainPanel = new ScrollPanel();

        mainLayout.add(mainPanel);

        //The package must exist (because we need at least a model to work with)
        //To make things easier (to me), the category must exist too.
        standaloneEditorService.getInvocationParameters(parametersUUID, new GenericCallback<StandaloneEditorInvocationParameters>() {
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.