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

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


    }

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("Model Browser");

        Button btn = new DefaultButton("Refresh Tree");
        btn.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.reloadRootModel();
            }
        });

        layout.add(btn);

        HorizontalPanel horz = new HorizontalPanel();
        horz.setStyleName("fill-layout-width");

        // ---

        VerticalPanel outputPanel = new VerticalPanel();

        ComboBox comboBox = new ComboBox();
        comboBox.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                presenter.setOperation(event.getValue());
            }
        });

        List<String> options = new ArrayList<String>();
        options.add(ModelDescriptionConstants.READ_RESOURCE_OPERATION);
        options.add(ModelDescriptionConstants.READ_RESOURCE_DESCRIPTION_OPERATION);
        options.add(ModelDescriptionConstants.READ_OPERATION_NAMES_OPERATION);
        options.add(ModelDescriptionConstants.READ_RESOURCE_METRICS);
        options.add(ModelDescriptionConstants.READ_CHILDREN_TYPES_OPERATION);
        options.add(ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION);

        comboBox.setValues(options);
        comboBox.setItemSelected(0,true);
        outputPanel.add(comboBox.asWidget());

        requestArea = new TextArea();
        requestArea.setCharacterWidth(60);
        requestArea.setVisibleLines(10);

        responseArea = new TextArea();
        responseArea.setCharacterWidth(60);
        responseArea.setVisibleLines(20);

        outputPanel.add(requestArea);
        outputPanel.add(responseArea);

        tree = new Tree(DefaultTreeResources.INSTANCE);
        horz.add(tree);
        horz.add(outputPanel);
        tree.getElement().getParentElement().setAttribute("width", "30%");
        layout.add(horz);

        // ---

        tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
            @Override
View Full Code Here


        this.presenter = presenter;
    }

    Widget asWidget() {

        LayoutPanel layout = new LayoutPanel();

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

        ScrollPanel scroll = new ScrollPanel(panel);
        layout.add(scroll);

        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        // ---

        serverName = new HTML("Replace me");
        serverName.setStyleName("content-header-label");
View Full Code Here

    }

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new LayoutPanel();

        FakeTabPanel titleBar = new FakeTabPanel("Virtual Machine Status");
        layout.add(titleBar);

        ToolStrip topLevelTools = new ToolStrip();

        /*pauseBtn = new ToolButton("Stop Monitor");

        //TODO - change all hardcoded text into localized properties
        pauseBtn = new ToolButton("Stop Monitor");
        ClickHandler clickHandler = new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {

                boolean b = pauseBtn.getText().equals("Start Monitor");
                presenter.keepPolling(b);

                if(pauseBtn.getText().equals("Stop Monitor"))
                    pauseBtn.setText("Start Monitor");
                else
                    pauseBtn.setText("Stop Monitor");

            }
        };

        pauseBtn.addClickHandler(clickHandler);
        topLevelTools.addToolButton(pauseBtn);      */
        topLevelTools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_refresh(),
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        presenter.refresh();
                    }
                }));


        // -------

        layout.add(topLevelTools);

        // ----

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

        ScrollPanel scroll = new ScrollPanel(vpanel);
        layout.add(scroll);

        layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX);
        layout.setWidgetTopHeight(topLevelTools, 40, Style.Unit.PX, 30, Style.Unit.PX);
        layout.setWidgetTopHeight(scroll, 70, Style.Unit.PX, 100, Style.Unit.PCT);

        // ------------------------

        HorizontalPanel header = new HorizontalPanel();
        header.setStyleName("fill-layout-width");
View Full Code Here

    ConfigAdminEditor(ConfigAdminPresenter presenter) {
        this.presenter = presenter;
    }

    Widget asWidget() {
        LayoutPanel layout = new LayoutPanel();

        ToolStrip topLevelTools = new ToolStrip();
        ToolButton editBtn = new ToolButton(Console.CONSTANTS.common_label_edit(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                final ConfigAdminData model = pidTable.getSelection();

                dialog = new DefaultWindow(Console.CONSTANTS.subsys_configadmin_editPID());
                dialog.setWidth(320);
                dialog.setHeight(140);
                dialog.trapWidget(new InputWindow(model.getPid(), new InputWindow.Result() {
                    @Override
                    public void result(String value) {
                        if (value != null && !value.equals(model.getPid())) {
                            presenter.onDeleteConfigurationAdminData(model.getPid());
                            model.setPid(value);
                            presenter.onAddConfigurationAdminData(model);
                        }
                        closePropertyDialoge();
                    }
                }).asWidget());
                dialog.setGlassEnabled(true);
                dialog.center();
            }
        });
        editBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_edit_configAdminEditor());
        topLevelTools.addToolButton(editBtn);

        ToolButton deleteBtn = new ToolButton(Console.CONSTANTS.common_label_delete(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                final ConfigAdminData model = pidTable.getSelection();
                Feedback.confirm(Console.MESSAGES.subsys_configadmin_remove(), Console.MESSAGES.subsys_configadmin_removeConfirm(model.getPid()),
                    new Feedback.ConfirmationHandler() {
                        @Override
                        public void onConfirmation(boolean isConfirmed) {
                            if (isConfirmed)
                                presenter.onDeleteConfigurationAdminData(model.getPid());
                        }
                    });
            }
        });
        deleteBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_delete_configAdminEditor());
        topLevelTools.addToolButton(deleteBtn);

        ToolButton addBtn = new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewCASPropertyWizard();
            }
        });
        addBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_add_configAdminEditor());
        topLevelTools.addToolButtonRight(addBtn);
        layout.add(topLevelTools);

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

        ScrollPanel scroll = new ScrollPanel(vpanel);
        layout.add(scroll);

        layout.setWidgetTopHeight(topLevelTools, 0, Style.Unit.PX, 30, Style.Unit.PX);
        layout.setWidgetTopHeight(scroll, 30, Style.Unit.PX, 100, Style.Unit.PCT);

        HorizontalPanel horzPanel = new HorizontalPanel();
        horzPanel.add(new ContentHeaderLabel(Console.CONSTANTS.subsys_configadmin_header()));
        vpanel.add(horzPanel);
View Full Code Here

    public ProfileMgmtView() {
        super();

        layout = new SplitLayoutPanel(10);

        contentCanvas = new LayoutPanel();
        lhsNavigation = new LHSProfileNavigation();

        layout.addWest(lhsNavigation.asWidget(), 197);
        layout.add(contentCanvas);
    }
View Full Code Here

    public HostMgmtView() {

        layout = new SplitLayoutPanel(10);

        contentCanvas = new LayoutPanel();
        lhsNavigation = new LHSHostsNavigation();

        layout.addWest(lhsNavigation.asWidget(), 197);
        layout.add(contentCanvas);
View Full Code Here

    public DomainRuntimeView(CurrentServerSelection serverSelectionState) {
        super();

        layout = new SplitLayoutPanel(10);

        contentCanvas = new LayoutPanel();
        lhsNavigation = new DomainRuntimeNavigation(serverSelectionState);

        layout.addWest(lhsNavigation.asWidget(), 197);

        layout.add(contentCanvas);
View Full Code Here

        // default page
        pages.showPage(0);

        // ---

        LayoutPanel layout = new LayoutPanel();

        // Top Most Tab
        FakeTabPanel titleBar = new FakeTabPanel(getEntityDisplayName());
        layout.add(titleBar);

        Widget pagesWidget = pages.asWidget();
        layout.add(pagesWidget);

        layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX);
        layout.setWidgetTopHeight(pagesWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT);


        // update pages when selection changes
        table.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
View Full Code Here

    public DomainRuntimeView() {
        super();

        layout = new DefaultSplitLayoutPanel(2);

        contentCanvas = new LayoutPanel();
        lhsNavigation = new DomainRuntimeNavigation();

        Widget nav = lhsNavigation.asWidget();
        nav.getElement().setAttribute("role", "navigation");
View Full Code Here

        // -------

        ScrollPanel scroll = new ScrollPanel(vpanel);

        LayoutPanel layout = new LayoutPanel();
        layout.add(scroll);
        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        return layout;
    }
View Full Code Here

TOP

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

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.