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

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


    private LHSNavTree subsysTree;

    public LHSStandaloneNavigation() {
        super();

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

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


        stack = new StackLayoutPanel(Style.Unit.PX);
        stack.addStyleName("section-stack");
        stack.setWidth("180");

        LayoutPanel commonLayout = new LayoutPanel();
        commonLayout.setStyleName("stack-section");

        LHSNavItem[] commonItems = new LHSNavItem[] {
                new LHSNavItem("Browser", "debug/model-browser"),
                new LHSNavItem("Invocation Metrics", "debug/invocation-metrics")
                //new LHSNavItem("Operations", "debug/model-operations"),
        };

        int i =0;
        for(LHSNavItem item : commonItems)
        {
            commonLayout.add(item);
            commonLayout.setWidgetTopHeight(item, i, Style.Unit.PX, 25, Style.Unit.PX);
            i+=25;
        }

        stack.add(commonLayout, new StackSectionHeader("Domain Model"), 28);
View Full Code Here

    }

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("Invocation Metrics");

        invocationTable = new DefaultCellTable<SimpleMetric>(100);
        TextColumn<SimpleMetric> type = new TextColumn<SimpleMetric>() {
            @Override
            public String getValue(SimpleMetric metric) {
                return metric.getKey();
            }
        };

        TextColumn<SimpleMetric> count = new TextColumn<SimpleMetric>() {

            @Override
            public void render(Cell.Context context, SimpleMetric object, SafeHtmlBuilder sb) {


                int value = object.getValue().intValue();
                String color = value>upperHalf ? "red" : "black";

                // fallback when num records < 3
                if(upperHalf==0) color ="black";

                sb.appendHtmlConstant("<div style='text-align:right; color:"+color+"'>")
                        .append(value)
                        .appendHtmlConstant("</div>");
            }

            @Override
            public String getValue(SimpleMetric metric) {
                return String.valueOf(metric.getValue().intValue());
            }
        };

        invocationTable.addColumn(type, "Type");
        invocationTable.addColumn(count, "Count");

        layout.add(new ContentGroupLabel("Invocation Count"));
        layout.add(invocationTable);

        return layout;
    }
View Full Code Here

    private ToolButton edit;

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("Servlet");

        layout.add(new ContentHeaderLabel("Servlet Subsystem Configuration"));

        // ----

        ContentGroupLabel label = new ContentGroupLabel("JSP Container");
        label.getElement().setAttribute("style", "margin-bottom:0px;");
        layout.add(label);

        /*ToolStrip toolStrip = new ToolStrip();
        edit = new ToolButton("Edit", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                Console.error("Not implemented yet!");

                if(edit.getText().equals("Edit"))
                    presenter.onEditJSPConfig();
                else
                    presenter.onSaveJSPConfig();
            }
        });
        toolStrip.addToolButton(edit);

        layout.add(toolStrip);*/

        // ----


        form = new Form(JSPContainerConfiguration.class);
        form.setNumColumns(2);

        StatusItem listing = new StatusItem("listings", "Listings?");

        StatusItem disabled= new StatusItem("disabled", "Disabled?");

        StatusItem development= new StatusItem("development", "Development?");

        StatusItem keepGenerated= new StatusItem("keepGenerated", "Keep Generated?");

        NumberBoxItem checkInterval = new NumberBoxItem("checkInterval", "Check Interval");

        StatusItem sourceFragment= new StatusItem("displaySource", "Display Source?");


        form.setFields(disabled, development);
        form.setFieldsInGroup("Advanced", new DisclosureGroupRenderer(), listing, keepGenerated, checkInterval, sourceFragment);


        StaticHelpPanel helpPanel = new StaticHelpPanel(WebDescriptions.getJSPConfigDescription());
        layout.add(helpPanel.asWidget());

        layout.add(form.asWidget());
        form.setEnabled(false); // TODO:

        // ----

        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");
        bottomLayout.getElement().setAttribute("style", "padding-top:20px;");


        connectorList = new ConnectorList(presenter);
        bottomLayout.add(connectorList.asWidget(),"Connectors");

        serverList = new VirtualServerList(presenter);
        bottomLayout.add(serverList.asWidget(),"Virtual Servers");

        bottomLayout.selectTab(0);

        layout.add(bottomLayout);

        return layout;
    }
View Full Code Here

    private PropertyEditor propertyEditor;

    @Override
    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("System Properties");
        layout.add(new ContentHeaderLabel("Property Declarations"));

        if(!Console.MODULES.getAppProperties().isStandalone())
        {
            HTML description = new HTML("These properties will be inherited by any subresource in the domain (i.e. server-groups)");
            description.getElement().setAttribute("style", "margin-bottom:15px;");
            layout.add(description);
        }

        propertyEditor = new PropertyEditor(presenter, Console.MODULES.getBootstrapContext().isStandalone());
        layout.add(propertyEditor.asWidget());
        propertyEditor.setEnabled(false);

        return layout;
    }
View Full Code Here

    private ToolButton editBtn;
    private Form<SocketBinding> form;

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

        TitleBar titleBar = new TitleBar("Socket Binding Groups");
        layout.add(titleBar);

        ToolStrip toolstrip = new ToolStrip();
        toolstrip.addToolButtonRight(new ToolButton("New Socket Binding", new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewSocketDialogue();
            }
        }));

        layout.add(toolstrip);

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

        ContentHeaderLabel nameLabel = new ContentHeaderLabel("Socket Binding Declarations");

        HorizontalPanel horzPanel = new HorizontalPanel();
        horzPanel.getElement().setAttribute("style", "width:100%;");
        //Image image = new Image(Icons.INSTANCE.deployment());
        //horzPanel.add(image);
        //image.getElement().getParentElement().setAttribute("width", "25");

        horzPanel.add(nameLabel);

        panel.add(horzPanel);

        socketTable = new SocketTable();

        HorizontalPanel tableOptions = new HorizontalPanel();
        tableOptions.getElement().setAttribute("cellpadding", "2px");

        groupFilter = new ComboBox();
        groupFilter.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                presenter.onFilterGroup(event.getValue());
            }
        });
        Widget groupFilterWidget = groupFilter.asWidget();
        groupFilterWidget.getElement().setAttribute("style", "width:200px;");


        tableOptions.add(new Label("Socket Binding Group:"));
        tableOptions.add(groupFilterWidget);


        tableOptions.getElement().setAttribute("style", "float:right;");
        panel.add(tableOptions);
        DefaultCellTable socketTableWidget = socketTable.asWidget();
        panel.add(socketTableWidget);

        DefaultPager pager = new DefaultPager();
        pager.setPage(0);
        pager.setPageSize(6);
        pager.setDisplay(socketTableWidget);
        panel.add(pager);


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

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

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

        ToolStrip detailToolStrip = new ToolStrip();
        editBtn = new ToolButton(Console.CONSTANTS.common_label_edit());
View Full Code Here

    private InterfacePresenter presenter;
    private CellTable<Interface> table;

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

        layout.add(new ContentHeaderLabel("Interface Declarations"));

        //HTML description = new HTML("A named network interface, but without any criteria for determining the IP address to associate with that interface. Acts as a placeholder in the model (e.g. at the domain level) until a fully specified interface definition is applied at a lower level (e.g. at the server level, where available addresses are known.)");
        //description.getElement().setAttribute("style", "margin-bottom:15px;");

        //layout.add(description);

        table = new DefaultCellTable<Interface>(10);

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

         TextColumn<Interface> criteriaColumn = new TextColumn<Interface>() {
            @Override
            public String getValue(Interface record) {
                return record.getCriteria();
            }
        };

        table.addColumn(nameColumn, "Name");
        table.addColumn(criteriaColumn, "Criteria");

        layout.add(table);

        return layout;
    }
View Full Code Here

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

        panel.add(new ContentHeaderLabel("Messaging Provider Configuration"));

        panel.add(new ContentGroupLabel("Attributes"));
View Full Code Here

    public DebugToolsView() {
        super();

        layout = new SplitLayoutPanel(4);

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

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

    private CellTable<WebServiceEndpoint> table ;
    private Form<WebServiceEndpoint> form;

    @Override
    public Widget createWidget() {
        LayoutPanel layout = new RHSContentPanel("Web Services");

        layout.add(new ContentHeaderLabel("Registered Web Service Endpoints"));

        table = new DefaultCellTable<WebServiceEndpoint>(6);

        TextColumn<WebServiceEndpoint> nameCol = new TextColumn<WebServiceEndpoint>() {
            @Override
            public String getValue(WebServiceEndpoint object) {
                return object.getName();
            }
        };

        TextColumn<WebServiceEndpoint> contextCol = new TextColumn<WebServiceEndpoint>() {
            @Override
            public String getValue(WebServiceEndpoint object) {
                return object.getContext();
            }
        };

        table.addColumn(nameCol, "Name");
        table.addColumn(contextCol, "Context");

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(table);

        layout.add(table);
        layout.add(pager);

        // -----

        layout.add(new ContentGroupLabel("Web Service"));

        form = new Form<WebServiceEndpoint>(WebServiceEndpoint.class);
        form.setNumColumns(2);

        TextItem nameItem = new TextItem("name", "Name");
        TextItem contextItem = new TextItem("context", "Context");
        TextItem classItem = new TextItem("className", "Class");
        TextItem typeItem = new TextItem("type", "Type");
        TextItem wsdlItem = new TextItem("wsdl", "WSDL Url");

        form.setFields(nameItem, contextItem, classItem, typeItem, wsdlItem);
        form.bind(table);
        form.setEnabled(false);


        final StaticHelpPanel helpPanel = new StaticHelpPanel(WebServiceDescriptions.getEndpointDescription());
        layout.add(helpPanel.asWidget());

        layout.add(form.asWidget());

        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.