Package org.jboss.ballroom.client.widgets

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


                Window.alert(sb.toString());
            }
        });
        layout.add(diffBtn);

        ContentGroupLabel delim = new ContentGroupLabel("Databinding Example");
        layout.add(delim);

        form = new Form<User>(User.class);
        TextBoxItem firstName = new TextBoxItem("firstName", "First Name");
        TextBoxItem lastName = new TextBoxItem("lastName", "Last Name");
View Full Code Here


        panel.add(new ContentDescription(description));

        if(master!=null)
        {
            if(master.title!=null && !master.title.isEmpty())
                panel.add(new ContentGroupLabel(master.title));

            if(masterTools!=null) panel.add(masterTools);
            panel.add(master.widget);
        }

        // -----

        if(detail!=null)
        {
            if(detail.title!=null && !detail.title.isEmpty())
                panel.add(new ContentGroupLabel(detail.title));
            panel.add(detail.widget);
            detail.widget.getElement().addClassName("fill-layout-width");
        }
        else if(details.size()>0)
        {
View Full Code Here

        bottomLayout.add(formPanel, "Availability");

        bottomLayout.selectTab(0);

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

        vpanel.add(bottomLayout);

        return layout;
    }
View Full Code Here

        headerLabel = new ContentHeaderLabel("TITLE HERE");
        vpanel.add(headerLabel);
        vpanel.add(new ContentDescription(description));

        vpanel.add(new ContentGroupLabel(getStackName()));

        ToolStrip tableTools = new ToolStrip();

        addModule = new ToolButton(Console.CONSTANTS.common_label_add());
        addModule.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                openWizard(null);
            }
        });
        addModule.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_add_abstractDomainDetailEditor());
        tableTools.addToolButtonRight(addModule);
        tableTools.addToolButtonRight(
                new ToolButton(Console.CONSTANTS.common_label_remove(), new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {

                        final T policy = getCurrentSelection();
                        Feedback.confirm(
                                Console.MESSAGES.deleteTitle(getEntityName()),
                                Console.MESSAGES.deleteConfirm(policy.getCode()),
                                new Feedback.ConfirmationHandler() {
                                    @Override
                                    public void onConfirmation(boolean isConfirmed) {
                                        if (isConfirmed) {
                                            attributesProvider.getList().remove(policy);
                                            saveData();
                                        }
                                    }
                                });
                    }
                })
        );
        vpanel.add(tableTools);

        // -------

        Column<T, String> codeColumn = new Column<T, String>(new TextCell()) {
            @Override
            public String getValue(T record) {
                return record.getCode();
            }
        };
        attributesTable.addColumn(codeColumn, Console.CONSTANTS.subsys_security_codeField());

        addCustomColumns(attributesTable);

        List<HasCell<T, T>> actionCells = new ArrayList<HasCell<T,T>>();
        IdentityColumn<T> actionColumn = new IdentityColumn<T>(new CompositeCell(actionCells));
        attributesTable.addColumn(actionColumn, "");

        vpanel.add(attributesTable);

        // -------

        DefaultPager pager = new DefaultPager();
        pager.setDisplay(attributesTable);
        vpanel.add(pager);

        // -------


        propertyEditor = new PropertyEditor(this, true);
        propertyEditor.setHideButtons(false);

        final SingleSelectionModel<T> ssm = new SingleSelectionModel<T>();
        ssm.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                T policy = ssm.getSelectedObject();
                if (policy == null) // Can this actually happen?
                {
                    return;
                }

                List<PropertyRecord> props = policy.getProperties();
                if (props == null)  {
                    props = new ArrayList<PropertyRecord>();
                    policy.setProperties(props);
                }

                propertyEditor.setProperties("", policy.getProperties());

                wizard.edit(policy);

            }
        });
        attributesTable.setSelectionModel(ssm);


        wizard = getWizard();

        TabPanel bottomTabs = new TabPanel();
        bottomTabs.setStyleName("default-tabpanel");
        bottomTabs.add(wizard.asWidget(), "Attributes");
        bottomTabs.add(propertyEditor.asWidget(), "Module Options");

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

        vpanel.add(bottomTabs);
        bottomTabs.selectTab(0);

        // -------
View Full Code Here

        horzPanel.add(new ContentHeaderLabel(Console.CONSTANTS.subsys_configadmin_header()));
        vpanel.add(horzPanel);

        pidTable = new PIDTable();

        vpanel.add(new ContentGroupLabel(Console.CONSTANTS.subsys_configadmin_PIDLabel()));
        vpanel.add(pidTable.asWidget());

        propertyEditor = new PropertyEditor(this, true, 10);
        final SingleSelectionModel<ConfigAdminData> selectionModel = new SingleSelectionModel<ConfigAdminData>();
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                ConfigAdminData pid = selectionModel.getSelectedObject();
                propertyEditor.setProperties(pid.getPid(), pid.getProperties());
            }
        });
        pidTable.setSelectionModel(selectionModel);

        vpanel.add(new ContentGroupLabel(Console.CONSTANTS.subsys_configadmin_valuesLabel()));
        vpanel.add(propertyEditor.asWidget());
        propertyEditor.setAllowEditProps(false);

        return layout;
    }
View Full Code Here

        reloadPanel.setStyleName("fill-layout-width");

        // ----

        VerticalPanel configUptodate = new VerticalPanel();
        ContentGroupLabel label = new ContentGroupLabel("Server Configuration");
        label.getElement().setAttribute("style", "padding-top:15px;");
        configUptodate.add(label);

        HorizontalPanel uptodateContent = new HorizontalPanel();
        uptodateContent.setStyleName("status-panel");
        uptodateContent.addStyleName("serverUptoDate");

        Image img = new Image(Icons.INSTANCE.status_good());
        HTML desc = new HTML(Console.CONSTANTS.server_config_uptodate());
        uptodateContent.add(desc);
        uptodateContent.add(img);

        img.getElement().getParentElement().setAttribute("style", "padding:15px;vertical-align:top");
        desc.getElement().getParentElement().setAttribute("style", "padding:15px;vertical-align:top");

        configUptodate.add(uptodateContent);

        // --

        VerticalPanel configNeedsUpdate = new VerticalPanel();
        ContentGroupLabel label2 = new ContentGroupLabel("Server Configuration");
        label2.getElement().setAttribute("style", "padding-top:15px;");
        configNeedsUpdate.add(label2);
        configNeedsUpdate.add(tools.asWidget());

        HorizontalPanel staleContent = new HorizontalPanel();
        staleContent.setStyleName("status-panel");
        staleContent.addStyleName("serverNeedsUpdate");

        Image img2 = new Image(Icons.INSTANCE.status_bad());
        HTML desc2 = new HTML(Console.CONSTANTS.server_reload_desc());
        staleContent.add(desc2);
        staleContent.add(img2);

        img2.getElement().getParentElement().setAttribute("style", "padding:15px;vertical-align:top");
        desc2.getElement().getParentElement().setAttribute("style", "padding:15px;vertical-align:top");

        configNeedsUpdate.add(staleContent);

        // ----


        extensionTable = new DefaultCellTable<String>(8);
        extensionTable.addColumn(new Column<String, String>(new TextCell()) {
            @Override
            public String getValue(String object) {
                return object;
            }
        }, "Name");

        dataProvider = new ListDataProvider<String>();
        dataProvider.addDataDisplay(extensionTable);

        VerticalPanel extPanel = new VerticalPanel();
        extPanel.setStyleName("fill-layout-width");
        extPanel.getElement().setAttribute("style", "padding-top:15px;");

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

        extPanel.add(new ContentGroupLabel("Extensions"));
        extPanel.add(extensionTable.asWidget());
        extPanel.add(pager);

        // ---
View Full Code Here

        panel.add(new ContentHeaderLabel("Network Interfaces"));

        if(description!=null) {
            panel.add(new ContentDescription(description));
        }
        panel.add(new ContentGroupLabel(Console.MESSAGES.available("Interfaces")));

        table = new DefaultCellTable<Interface>(8, new ProvidesKey<Interface>() {
            @Override
            public Object getKey(Interface item) {
                return item.getName();
            }
        });

        dataProvider = new ListDataProvider<Interface>();
        dataProvider.addDataDisplay(table);

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

        table.addColumn(nameColumn, "Name");

        panel.add(topLevelTools);
        panel.add(table);


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

        form.setNumColumns(2);

        TextItem nameItem = new TextItem("name", "Name");
        TextBoxItem inetAddress = new TextBoxItem("inetAddress", "Inet Address", false);
View Full Code Here

        ContentHeaderLabel nameLabel = new ContentHeaderLabel("Socket Bindings");

        panel.add(nameLabel);
        panel.add(new ContentDescription(Console.CONSTANTS.common_socket_bindings_desc()));

        panel.add(new ContentGroupLabel(Console.MESSAGES.available("Socket Bindings")));

        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(toolstrip.asWidget());
        panel.add(socketTableWidget);


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


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

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

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

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

        FormToolStrip<SocketBinding> detailToolStrip = new FormToolStrip<SocketBinding>(
                form,
                new FormToolStrip.FormCallback<SocketBinding>()
                {
                    @Override
                    public void onSave(Map<String, Object> changeset) {
                        SocketBinding updatedEntity = form.getUpdatedEntity();
                        presenter.saveSocketBinding(
                                updatedEntity.getName(),
                                form.getEditedEntity().getGroup()// TODO: why does it not get pushed through?
                                form.getChangedValues()
                        );
                    }

                    @Override
                    public void onDelete(SocketBinding entity) {

                    }
                }
        );

        detailToolStrip.providesDeleteOp(false);

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

        panel.add(detailToolStrip.asWidget());
        // ---

View Full Code Here

            panel.add(new ContentDescription(description.asString()));

        if(master !=null)
        {
            if(master.title!=null && !master.title.isEmpty())
                panel.add(new ContentGroupLabel(master.title));

            if(masterTools!=null) panel.add(masterTools);

            master.widget.getElement().setAttribute("role", "application");

            panel.add(master.widget);

            DefaultPager pager = new DefaultPager();
            pager.setDisplay(master.widget);
            panel.add(pager);
        }

        // -----

        if(detail!=null)
        {
            if(detail.title!=null && !detail.title.isEmpty())
                panel.add(new ContentGroupLabel(detail.title));

            if(detailTools!=null) panel.add(detailTools);
            panel.add(detail.widget);
        }
        else if(details.size()>0)
View Full Code Here

        List<Column> columns = makeNameAndRuntimeColumns();
        columns.add(new DeploymentCommandColumn(this.presenter, DeploymentCommand.ADD_TO_GROUP));
        columns.add(new DeploymentCommandColumn(this.presenter, DeploymentCommand.UPDATE_CONTENT));
        columns.add(new DeploymentCommandColumn(this.presenter, DeploymentCommand.REMOVE_FROM_DOMAIN));

        ContentGroupLabel repositoryLabel = new ContentGroupLabel(Console.CONSTANTS.common_label_contentRepository());

        Widget domainDeploymentTable = makeDeploymentTable(repositoryLabel, domainDeploymentProvider, columns, columnHeaders);

        panel.add(domainDeploymentTable);
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.