Package org.jboss.ballroom.client.widgets

Examples of org.jboss.ballroom.client.widgets.ContentGroupLabel


        TextItem profileItem = new TextItem("profileName", Console.CONSTANTS.common_label_profile());

        form.setFields(nameField, profileItem, socketBindingItem);
        //form.setFieldsInGroup("Advanced", new DisclosureGroupRenderer(), socketBindingItem);

        panel.add(new ContentGroupLabel(Console.CONSTANTS.common_label_attributes()));

        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
                        ModelNode address = new ModelNode();
                        address.add("server-group", "*");
                        return address;
                    }
                }, form
        );
        panel.add(helpPanel.asWidget());

        panel.add(form.asWidget());

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


        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");


        jvmEditor = new JvmEditor(presenter);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.add("server-group", nameLabel.getText());
                address.add("jvm", "*");
                return address;
            }
        });
        bottomLayout .add(jvmEditor.asWidget(), Console.CONSTANTS.common_label_virtualMachine());

        propertyEditor = new PropertyEditor(presenter);
        propertyEditor.setHelpText("A system property to set on all servers in this server-group.");
        bottomLayout.add(propertyEditor.asWidget(), Console.CONSTANTS.common_label_systemProperties());
        propertyEditor.setEnabled(false);

        bottomLayout .selectTab(0);

        panel.add(new ContentGroupLabel("Subresources"));
        panel.add(bottomLayout);

        return layout;
    }
View Full Code Here


        dataSourceTable.addColumn(nameColumn, "Name");
        dataSourceTable.addColumn(jndiNameColumn, "JNDI");
        dataSourceTable.addColumn(poolColumn, "Pool");
        dataSourceTable.addColumn(statusColumn, "Enabled?");

        vpanel.add(new ContentGroupLabel("Registered XA Datasources"));
        vpanel.add(dataSourceTable);


        // -----------
        details = new XADataSourceDetails(presenter);
        propertyEditor = new PropertyEditor(this,true);
        propertyEditor.setHelpText("Properties to assign to the XADataSource implementation class.");

        final SingleSelectionModel<XADataSource> selectionModel = new SingleSelectionModel<XADataSource>();
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                XADataSource dataSource = selectionModel.getSelectedObject();
                details.setSelectedRecord(dataSource);
                propertyEditor.setProperties(dataSource.getName(), dataSource.getProperties());
            }
        });
        dataSourceTable.setSelectionModel(selectionModel);


        TabPanel bottomPanel = new TabPanel();
        bottomPanel.setStyleName("default-tabpanel");

        bottomPanel.add(details.asWidget(), "Attributes");
        bottomPanel.add(propertyEditor.asWidget(), "XA Properties");
        propertyEditor.setEnabled(false); // TODO: modifications of XA properties
        //bottomPanel.add(new HTML("All the nitty gritty details"), "Advanced");
        //bottomPanel.add(new HTML("Current pool size, connections in use, etc"), "Metrics");

        bottomPanel.selectTab(0);
        vpanel.add(new ContentGroupLabel("Datasource"));
        vpanel.add(bottomPanel);
        return layout;
    }
View Full Code Here

        vpanel.add(horzPanel);

        dataSourceTable = new DatasourceTable();

        vpanel.add(new ContentGroupLabel("Registered Datasources"));
        vpanel.add(dataSourceTable.asWidget());


        // -----------
        details = new DataSourceDetails(presenter);
        details.bind(dataSourceTable.getCellTable());

        TabPanel bottomPanel = new TabPanel();
        bottomPanel.setStyleName("default-tabpanel");

        bottomPanel.add(details.asWidget(), "Attributes");
        //bottomPanel.add(new HTML("All the nitty gritty details"), "Advanced");
        //bottomPanel.add(new HTML("Pool-size, connections in use, etc"), "Metrics");
        bottomPanel.selectTab(0);

        vpanel.add(new ContentGroupLabel("Datasource"));
        vpanel.add(bottomPanel);

        return layout;
    }
View Full Code Here

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

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

        panel.add(new ContentGroupLabel("Attributes"));

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

        TextItem name = new TextItem("name", "Provider");
        StatusItem persistenceItem = new StatusItem("persistenceEnabled", "Persistence enabled?");

        TextItem connector = new TextItem("connectorBinding", "Connector Binding");
        TextItem acceptor = new TextItem("acceptorBinding", "Acceptor Binding");

        form.setFields(name, connector, persistenceItem, acceptor);

        StaticHelpPanel helpPanel = new StaticHelpPanel(MessagingDescription.getProviderDescription());

        panel.add(helpPanel.asWidget());
        panel.add(form.asWidget());

        // ------

        panel.add(new ContentGroupLabel("Subresources"));

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

        panel.add(horzPanel);

        // ----

        panel.add(new ContentGroupLabel("Connection Factories"));

        factoryTable = new DefaultCellTable<ConnectionFactory>(10);

        Column<ConnectionFactory, String> nameColumn = new Column<ConnectionFactory, String>(new TextCell()) {
            @Override
            public String getValue(ConnectionFactory object) {
                return object.getName();
            }
        };

        Column<ConnectionFactory, String> jndiColumn = new Column<ConnectionFactory, String>(new TextCell()) {
            @Override
            public String getValue(ConnectionFactory object) {
                return object.getJndiName();
            }
        };

        factoryTable.addColumn(nameColumn, "Name");
        factoryTable.addColumn(jndiColumn, "JNDI");

        StaticHelpPanel helpPanel = new StaticHelpPanel(MessagingDescription.getFactoryDescription());

        panel.add(helpPanel.asWidget());

        panel.add(factoryTable);

        // ----

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

        queueList = new QueueList(presenter);
View Full Code Here

        pager = new DefaultPager();
        pager.setDisplay(table);
        layout.add(pager);
       
        details.bind(table);
        layout.add(new ContentGroupLabel(Console.CONSTANTS.common_label_details()));
        layout.add(details.asWidget());

        panel.add(scroll);

        panel.setWidgetTopHeight(toolStrip, 0, Style.Unit.PX, 26, Style.Unit.PX);
View Full Code Here

        StaticHelpPanel helpPanel = new StaticHelpPanel(
                "These JVM settings will be inherited by any server on this host."
        );
        panel.add(helpPanel.asWidget());

        panel.add(new ContentGroupLabel("Available JVM Declarations"));

        table = new DefaultCellTable<Jvm>(10);

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


        table.addColumn(nameCol, "Name");
        //table.addColumn(debugCol, "IsDebugEnabled?");

        panel.add(table);

        // ----


        panel.add(new ContentGroupLabel("JVM Details"));

        jvmEditor = new JvmEditor(presenter);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {
View Full Code Here

        vpanel.add(horzPanel);

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

        vpanel.add(new ContentGroupLabel("Server Instances"));

        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.onFilterByGroup(event.getValue());
            }
        });

        Widget typeFilterWidget = groupFilter.asWidget();
        typeFilterWidget.getElement().setAttribute("width", "200px;");


        tableOptions.add(new Label(Console.CONSTANTS.common_label_serverGroup()+":"));
        tableOptions.add(typeFilterWidget);

        tableOptions.getElement().setAttribute("style", "float:right;");
        vpanel.add(tableOptions);

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

        instanceTable = new DefaultCellTable<ServerInstance>(10);
        instanceProvider = new ListDataProvider<ServerInstance>();
        instanceProvider.addDataDisplay(instanceTable);

        // Create columns
        Column<ServerInstance, String> nameColumn = new Column<ServerInstance, String>(new TextCell()) {
            @Override
            public String getValue(ServerInstance object) {
                return object.getName();
            }
        };


        Column<ServerInstance, String> groupColumn = new Column<ServerInstance, String>(new TextCell()) {
            @Override
            public String getValue(ServerInstance object) {
                return object.getGroup();
            }
        };

        Column<ServerInstance, ImageResource> statusColumn =
                new Column<ServerInstance, ImageResource>(new ImageResourceCell()) {
            @Override
            public ImageResource getValue(ServerInstance instance) {

                ImageResource res = null;

                if(instance.isRunning())
                    res = Icons.INSTANCE.statusGreen_small();
                else
                    res = Icons.INSTANCE.statusRed_small();

                return res;
            }
        };

        instanceTable.addColumn(nameColumn, Console.CONSTANTS.common_label_server());
        instanceTable.addColumn(groupColumn, Console.CONSTANTS.common_label_serverGroup());
        instanceTable.addColumn(statusColumn, Console.CONSTANTS.common_label_status());
        vpanel.add(instanceTable);


        // scroll enabled
        ScrollPanel scroll = new ScrollPanel();
        scroll.add(vpanel);

        layout.add(scroll);

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


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

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

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

        ToolStrip formTools = new ToolStrip();
        formTools.addToolButton(new ToolButton("Start/Stop", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                String state = form.getEditedEntity().isRunning() ? "stop" : "start";
                Feedback.confirm(Console.CONSTANTS.common_label_serverStatus(), Console.MESSAGES.changeServerStatus(state, form.getEditedEntity().getName()),
                        new Feedback.ConfirmationHandler()
                        {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if(isConfirmed)
                                {
                                    ServerInstance instance = form.getEditedEntity();
                                    presenter.startServer(instance.getServer(), !instance.isRunning());
                                }
                            }
                        });
            }
        }));

        /* https://issues.jboss.org/browse/AS7-953
        formTools.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)
                                {
                                    ServerInstance instance = form.getEditedEntity();
                                    presenter.reloadServer(instance.getServer());
                                }
                            }
                        });
            }
        }));

        */
        formPanel.add(formTools);

        // -----


        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_serverInstance());
        TextItem serverItem = new TextItem("server", Console.CONSTANTS.common_label_serverConfig());
        StatusItem enableItem = new StatusItem("running", "Running?");

        form.setFields(nameItem, serverItem, enableItem);
        form.bind(instanceTable);
        form.setEnabled(false);

        Widget formWidget = form.asWidget();
        //formWidget.getElement().setAttribute("style", "margin-top:15px;");

        formPanel.add(formWidget);

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

        bottomLayout.add(formPanel, "Availability");

        // TODO: server VM metrics
        //bottomLayout.add(new HTML("This going to display heap, permgen, etc, "), Console.CONSTANTS.common_label_virtualMachine());

        bottomLayout.selectTab(0);

        vpanel.add(new ContentGroupLabel("Status"));

        vpanel.add(bottomLayout);

        return layout;
    }
View Full Code Here

        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
View Full Code Here

        panel.add(horzPanel);

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


        panel.add(new ContentGroupLabel(Console.CONSTANTS.common_label_attributes()));

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

        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        CheckBoxItem startedItem = new CheckBoxItem("autoStart", Console.CONSTANTS.common_label_autoStart());
        //groupItem = new ComboBoxItem("group", "Server Group");

        // TODO: https://issues.jboss.org/browse/AS7-661
        TextItem groupItem = new TextItem("group", Console.CONSTANTS.common_label_serverGroup());

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

        final NumberBoxItem portOffset = new NumberBoxItem("portOffset", Console.CONSTANTS.common_label_portOffset());

        socketItem = new ComboBoxItem("socketBinding", Console.CONSTANTS.common_label_socketBinding())
        {
            @Override
            public boolean validate(String value) {
                boolean parentValid = super.validate(value);
                //boolean portDefined = !portOffset.isModified();
                return parentValid ;//&& portDefined;
            }

            @Override
            public String getErrMessage() {
                return Console.MESSAGES.common_validation_portOffsetUndefined(super.getErrMessage());
            }
        };


        form.setFields(nameItem, groupItem, startedItem);
        form.setFieldsInGroup(
                "Advanced",
                new DisclosureGroupRenderer(),
                socketItem, portOffset
        );


        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
                        ModelNode address = new ModelNode();
                        address.add("host", presenter.getSelectedHost());
                        address.add("server-config", "*");
                        return address;
                    }
                }, form
        );
        panel.add(helpPanel.asWidget());

        panel.add(form.asWidget());
        form.setEnabled(false);

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

        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");

        // jvm editor
        jvmEditor = new JvmEditor(presenter);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.add("host", presenter.getSelectedHost());
                address.add("server-config", nameLabel.getText());
                address.add("jvm", "*");
                return address;
            }
        });
        bottomLayout.add(jvmEditor.asWidget(), Console.CONSTANTS.common_label_virtualMachine());

        propertyEditor = new PropertyEditor(presenter);
        propertyEditor.setHelpText("A system property to set on this server.");
        bottomLayout.add(propertyEditor.asWidget(), Console.CONSTANTS.common_label_systemProperties());
        propertyEditor.setEnabled(false);


        panel.add(new ContentGroupLabel("Subresources"));

        panel.add(bottomLayout);

        bottomLayout.selectTab(0);

View Full Code Here

TOP

Related Classes of org.jboss.ballroom.client.widgets.ContentGroupLabel

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.