Examples of LayoutPanel


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

        return messagePopup;
    }

    public Widget asWidget()
    {
        LayoutPanel layout = new LayoutPanel()
        {
            @Override
            public void onResize() {
                super.onResize();
                MessageListPopup popup = getMessagePopup();
                if(popup!=null) popup.hide();
            }
        };

        messageDisplay = new LayoutPanel();

        final Button button = new Button(Console.CONSTANTS.common_label_messages());
        button.getElement().addClassName("default-button");

        ClickHandler clickHandler = new ClickHandler() {
            public void onClick(ClickEvent event) {

                int numMessages = fetchMessages(messagePopup);
                if(numMessages==0)numMessages=1;

                int width = 200;
                int height = numMessages*35;

                messagePopup.setPopupPosition(
                        button.getAbsoluteLeft() - (width+24-button.getOffsetWidth()) ,
                        button.getAbsoluteTop() - (height+24)
                );



                messagePopup.show();

                messagePopup.setWidth(width+"px");
                messagePopup.setHeight(height+"px");
            }
        };

        button.addClickHandler(clickHandler);

        // register listener
        messageCenter.addMessageListener(this);


        layout.add(messageDisplay);
        layout.add(button);

        layout.setWidgetLeftWidth(messageDisplay, 0, Style.Unit.PX, 200, Style.Unit.PX);
        layout.setWidgetLeftWidth(button, 200, Style.Unit.PX, 100, Style.Unit.PX);
        layout.setWidgetTopHeight(button, 2, Style.Unit.PX, 22, Style.Unit.PX);

        return layout;
    }
View Full Code Here

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

    private Header header;

    @Inject
    public MainLayoutViewImpl() {

        mainContentPanel = new LayoutPanel();
        mainContentPanel.setStyleName("main-content-panel");

        headerPanel = new LayoutPanel();
        headerPanel.setStyleName("header-panel");

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

        panel = new DockLayoutPanel(Style.Unit.PX);
        panel.addNorth(headerPanel, 64);
        panel.addSouth(footerPanel, 30);
View Full Code Here

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

        History.addValueChangeHandler(this);
    }

    public Widget asWidget() {

        LayoutPanel outerLayout = new LayoutPanel();

        HorizontalPanel contentLayout = new HorizontalPanel();
        contentLayout.setStyleName("fill-layout-width");
        contentLayout.getElement().setAttribute("style", "height:34px");

        headlineContainer = new LayoutPanel();
        headlineContainer.setStyleName("fill-layout");

        contentLayout.add(headlineContainer);

        /*HTML debugLink = new HTML("Debug");
        debugLink.setStyleName("cross-reference");
        debugLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                Console.MODULES.getPlaceManager().revealPlace(
                        new PlaceRequest(NameTokens.DebugToolsPresenter)
                );
            }
        });
        contentLayout.add(debugLink);*/

        /*HTML settingsLink = new HTML(Console.CONSTANTS.common_label_settings());
        settingsLink.setStyleName("cross-reference");
        settingsLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                Console.MODULES.getPlaceManager().revealPlace(
                        new PlaceRequest(NameTokens.SettingsPresenter)
                );
            }
        });
        contentLayout.add(settingsLink);


        //debugLink.getElement().getParentElement().setAttribute("width", "50%");
        //debugLink.getElement().getParentElement().setAttribute("style", "text-align:right; padding-right:20px;color:#4A5D75");

        settingsLink.getElement().getParentElement().setAttribute("width", "50%");
        settingsLink.getElement().getParentElement().setAttribute("align", "right");
        settingsLink.getElement().getParentElement().setAttribute("style", "text-align:right; padding-right:20px;color:#4A5D75");

        */
        headlineContainer.getElement().getParentElement().setAttribute("width", "50%");

        Widget logo = getLogoSection();
        Widget links = getLinksSection();

        LayoutPanel innerLayout = new LayoutPanel();
        innerLayout.setStyleName("header");
        //innerLayout.add(logo);
        innerLayout.add(links);

        //innerLayout.setWidgetLeftWidth(logo, 0, Style.Unit.PX, 50, Style.Unit.PX);
        innerLayout.setWidgetRightWidth(links, 10, Style.Unit.PX, 100, Style.Unit.PCT);
        innerLayout.setWidgetTopHeight(links, 0, Style.Unit.PX, 40, Style.Unit.PX);

        outerLayout.add(innerLayout);
        outerLayout.add(contentLayout);

        outerLayout.setWidgetTopHeight(innerLayout, 0, Style.Unit.PX, 40, Style.Unit.PX);
View Full Code Here

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

        this.userName.setText(user.getUserName());
    }

    public Widget asWidget() {

        LayoutPanel layout = new LayoutPanel();
        layout.setStyleName("footer-panel");
        //Image userImg = new Image(Icons.INSTANCE.user());
        //layout.add(userImg);

        //userName.setStyleName("footer-item");
        //layout.add(userName);

        MessageCenterView messageCenterView = Console.MODULES.getMessageCenterView();
        Widget messageCenter = messageCenterView.asWidget();
        //messageCenter.getElement().addClassName("footer-item-right");
        layout.add(messageCenter);

        //layout.setWidgetLeftWidth(userImg, 5, Style.Unit.PX, 16, Style.Unit.PX);
        //layout.setWidgetTopHeight(userImg, 6, Style.Unit.PX, 16, Style.Unit.PX);

        //layout.setWidgetLeftWidth(userName, 25, Style.Unit.PX, 100, Style.Unit.PX);
        //layout.setWidgetTopHeight(userName, 6, Style.Unit.PX, 16, Style.Unit.PX);


        HTML version = new HTML(org.jboss.as.console.client.Build.VERSION);
        version.getElement().setAttribute("style", "color:#000000;font-size:10px; align:center");
        layout.add(version);

        layout.setWidgetLeftWidth(version, 15, Style.Unit.PX, 100, Style.Unit.PX);
        layout.setWidgetTopHeight(version, 6, Style.Unit.PX, 16, Style.Unit.PX);


        layout.setWidgetRightWidth(messageCenter, 15, Style.Unit.PX, 300, Style.Unit.PX);
        layout.setWidgetTopHeight(messageCenter, 2, Style.Unit.PX, 28, Style.Unit.PX);
        return layout;
    }
View Full Code Here

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

    private StandaloneServerPresenter presenter;
    private Form<StandaloneServer> form ;

    @Override
    public Widget createWidget() {
        LayoutPanel layout = new LayoutPanel();

        TitleBar titleBar = new TitleBar("Standalone Server");
        layout.add(titleBar);

        // ----

        final ToolStrip toolStrip = new ToolStrip();

        toolStrip.addToolButtonRight(new ToolButton("Reload", new ClickHandler(){
            @Override
            public void onClick(ClickEvent event) {
                Feedback.confirm("Reload server configuration",
                        "Do you want ot reload the server configuration for server " + form.getEditedEntity().getName() + "?",
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed) {
                                    presenter.onReloadServerConfig();
                                }
                            }
                        });
            }
        }));


        layout.add(toolStrip);

        // ---

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

        ScrollPanel scrollPanel = WidgetUtil.asScrollPanel(panel);
        layout.add(scrollPanel);

        layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 28, Style.Unit.PX);
        layout.setWidgetTopHeight(toolStrip, 28, Style.Unit.PX, 30, Style.Unit.PX);
        layout.setWidgetTopHeight(scrollPanel, 58, Style.Unit.PX, 100, Style.Unit.PCT);


        form = new Form<StandaloneServer>(StandaloneServer.class);
        form.setNumColumns(2);
View Full Code Here

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

    }

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new LayoutPanel();

        TitleBar titleBar = new TitleBar(Console.CONSTANTS.common_label_deployments());
        layout.add(titleBar);

        layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 28, Style.Unit.PX);

        final ToolStrip toolStrip = new ToolStrip();
        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_addContent(), new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewDeploymentDialoge();
            }
        }));
       
        layout.add(toolStrip);
        layout.setWidgetTopHeight(toolStrip, 28, Style.Unit.PX, 30, Style.Unit.PX);
       
        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("rhs-content-panel");

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

        ContentHeaderLabel nameLabel = new ContentHeaderLabel(Console.CONSTANTS.common_label_deployments());

        HorizontalPanel horzPanel = new HorizontalPanel();
        horzPanel.getElement().setAttribute("style", "width:100%;");

        horzPanel.add(nameLabel);

        panel.add(horzPanel);

        deploymentTable = new DefaultCellTable<DeploymentRecord>(10);
        deploymentProvider = new ListDataProvider<DeploymentRecord>();
        deploymentProvider.addDataDisplay(deploymentTable);

        TextColumn<DeploymentRecord> dplNameColumn = new TextColumn<DeploymentRecord>() {
            @Override
            public String getValue(DeploymentRecord record) {
                return record.getName();
            }
        };

        TextColumn<DeploymentRecord> dplRuntimeColumn = new TextColumn<DeploymentRecord>() {
            @Override
            public String getValue(DeploymentRecord record) {
                return record.getRuntimeName();
            }
        };

        deploymentTable.addColumn(dplNameColumn, Console.CONSTANTS.common_label_name());
        deploymentTable.addColumn(dplRuntimeColumn, Console.CONSTANTS.common_label_runtimeName());
        deploymentTable.addColumn(makeEnabledColumn(), Console.CONSTANTS.common_label_enabled());
       
        deploymentTable.addColumn(new DeploymentCommandColumn(this.presenter, DeploymentCommand.ENABLE_DISABLE), Console.CONSTANTS.common_label_enOrDisable());
        deploymentTable.addColumn(new DeploymentCommandColumn(this.presenter, DeploymentCommand.REMOVE_FROM_STANDALONE), Console.CONSTANTS.common_label_remove());
       
        panel.add(deploymentTable);

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(deploymentTable);
        panel.add(pager);

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

        layout.add(scroll);
        layout.setWidgetTopHeight(scroll, 55, Style.Unit.PX, 65, Style.Unit.PCT);
       
        return layout;
    }
View Full Code Here

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

        this.presenter = presenter;
    }

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

        // ---

        HorizontalPanel horzPanel = new HorizontalPanel();
        horzPanel.getElement().setAttribute("style", "width:100%;");
View Full Code Here

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

    }

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("Domain Overview");

        HorizontalPanel hlayout = new HorizontalPanel();
        hlayout.setStyleName("fill-layout-width");
        hlayout.getElement().setAttribute("cellpadding", "10");

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

        profileList = new CellList<ProfileRecord>(new ProfileCell());
        profileList.setPageSize(25);

        ContentGroupLabel leftLabel = new ContentGroupLabel("Available Profiles");
        leftLabel.setIcon("common/profile.png");
        vlayoutLeft.add(leftLabel);
        vlayoutLeft.add(profileList);

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

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

        ContentGroupLabel rightLabel = new ContentGroupLabel("Server Groups");
        rightLabel.setIcon("common/server_group.png");

        vlayoutRight.add(rightLabel);

        ServerGroupCell groupCell = new ServerGroupCell();
        groupList = new CellList<ServerGroupRecord>(groupCell);
        groupList.setPageSize(25);

        final SingleSelectionModel<ServerGroupRecord> selectionModel = new SingleSelectionModel<ServerGroupRecord>();
        groupList.setSelectionModel(selectionModel);
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            public void onSelectionChange(SelectionChangeEvent event) {
                ServerGroupRecord selectedRecord = selectionModel.getSelectedObject();
                final String groupName = selectedRecord.getGroupName();

                Console.MODULES.getPlaceManager().revealPlaceHierarchy(
                        new ArrayList<PlaceRequest>() {{
                            add(new PlaceRequest("domain"));
                            add(new PlaceRequest(NameTokens.ServerGroupPresenter).with("name", groupName));
                        }}
                );
            }
        });


        vlayoutRight.add(groupList);
        // --------------------------------------

        hlayout.add(vlayoutLeft);
        hlayout.add(vlayoutRight);

        layout.add(hlayout);

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

        //layout.add(new ContentGroupLabel("Domain Level Deployments"));
View Full Code Here

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

    private ProfileSection profileSection;

    public LHSProfileNavigation() {

        layout = new LayoutPanel();
        layout.setStyleName("fill-layout");

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

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

        //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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.