Package org.jboss.ballroom.client.widgets.tools

Examples of org.jboss.ballroom.client.widgets.tools.ToolButton


        this.presenter = presenter;
    }

    Widget asWidget() {
        final ToolStrip toolStrip = new ToolStrip();
        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_refresh(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.setSelectedQueue(getCurrentSelection());
            }
        }));

        // ----

        queueTable = new DefaultCellTable<Queue>(5);
        queueTable.setSelectionModel(new SingleSelectionModel<Queue>());

        dataProvider = new ListDataProvider<Queue>();
        dataProvider.addDataDisplay(queueTable);

        com.google.gwt.user.cellview.client.Column<Queue, String> nameColumn = new com.google.gwt.user.cellview.client.Column<Queue, String>(new TextCell()) {
            @Override
            public String getValue(Queue object) {
                return object.getName();
            }
        };

        JMSEndpointJndiColumn<Queue> jndiColumn = new JMSEndpointJndiColumn<Queue>();

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

        queueTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                Queue queue = getCurrentSelection();
                presenter.setSelectedQueue(queue);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Queued");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-queue", "*");
                return address;
            }
        };

        if(Console.protovisAvailable())
        {
            sampler = new BulletGraphView(title, "count")
                    .setColumns(cols);
        }
        else
        {


            sampler = new PlainColumnView(title, addressCallback)
                    .setColumns(cols)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        Column[] cols2 = new Column[] {
                new NumberColumn("messages-added", "Added"),
                new NumberColumn("scheduled-count","Scheduled")
        };

        String title2 = "Messages Processed";


        if(Console.protovisAvailable())
        {
            messageSampler = new BulletGraphView(title2, "count")
                    .setColumns(cols2);
        }
        else
        {
            messageSampler = new PlainColumnView(title2, addressCallback)
                    .setColumns(cols2)
                    .setWidth(100, Style.Unit.PCT);
        }
        // ----


        NumberColumn consumerCol = new NumberColumn("consumer-count", "Consumers");
        Column[] cols3 = new Column[] {
                consumerCol
        };

        String title3 = "Consumer";


        if(Console.protovisAvailable())
        {
            consumerSampler = new BulletGraphView(title3, "count")
                    .setColumns(cols3);
        }
        else
        {
            consumerSampler = new PlainColumnView(title3, addressCallback)
                    .setColumns(cols3)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----


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

        ToolStrip queueTools = new ToolStrip();
        queueTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<Queue> selectionModel =
                        (SingleSelectionModel<Queue>)queueTable.getSelectionModel();

View Full Code Here



        // ---

        final ToolStrip toolStrip = new ToolStrip();
        ToolButton addBtn = new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewDeploymentDialoge(null, false);
            }
        });
        addBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_add_deploymentListView());
        toolStrip.addToolButtonRight(addBtn);

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_remove(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                DeploymentRecord selection = selectionModel.getSelectedObject();
                if(selection!=null)
                {
                    new DeploymentCommandDelegate(
                            DeploymentListView.this.presenter,
                            DeploymentCommand.REMOVE_FROM_STANDALONE).execute(
                            selection
                    );
                }
            }
        }));

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_enOrDisable(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                DeploymentRecord selection = selectionModel.getSelectedObject();
                if(selection!=null)
                {
                    new DeploymentCommandDelegate(
                            DeploymentListView.this.presenter,
                            DeploymentCommand.ENABLE_DISABLE).execute(
                            selection
                    );
                }
            }
        }));

        toolStrip.addToolButtonRight(new ToolButton("Update", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                DeploymentRecord selection = selectionModel.getSelectedObject();
                if(selection!=null)
                {
View Full Code Here

        this.presenter = presenter;
    }

    Widget asWidget() {
        final ToolStrip toolStrip = new ToolStrip();
        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_refresh(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.setSelectedTopic(getCurrentSelection());
            }
        }));
View Full Code Here

        instanceTable.addColumn(groupColumn, Console.CONSTANTS.common_label_serverGroup());
        instanceTable.addColumn(stateColumn, Console.CONSTANTS.common_label_status());
        instanceTable.addColumn(statusColumn, Console.CONSTANTS.common_label_active());

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

                String state = form.getEditedEntity().isRunning() ? "Stop" : "Start";
                Feedback.confirm(
View Full Code Here

        filter = new DeploymentFilter(domainDeploymentProvider);
        toolStrip.addToolWidget(filter.asWidget());

        // ---

        ToolButton addContentBtn = new ToolButton("Add", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewDeploymentDialoge(null, false);
            }
        });
        addContentBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_addContent_deploymentsOverview());
        toolStrip.addToolButtonRight(addContentBtn);

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_remove()
                , new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                final DeploymentRecord selection = selectionModel.getSelectedObject();
                if(selection!=null) {
                    new DeploymentCommandDelegate(
                            ContentRepositoryView.this.presenter,
                            DeploymentCommand.REMOVE_FROM_DOMAIN).execute(
                            selection
                    );
                }
            }
        }));

        // --

        toolStrip.addToolButtonRight(new ToolButton("Assign"
                , new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                final DeploymentRecord selection = selectionModel.getSelectedObject();
                if(selection!=null)
                {
                    new DeploymentCommandDelegate(
                            ContentRepositoryView.this.presenter,
                            DeploymentCommand.ADD_TO_GROUP).execute(
                            selection
                    );
                }
            }
        }));


        toolStrip.addToolButtonRight(new ToolButton("Update"
                , new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {

                final DeploymentRecord selection = selectionModel.getSelectedObject();
View Full Code Here

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

        this.presenter = presenter;
    }

    Widget asWidget() {
        final ToolStrip toolStrip = new ToolStrip();
        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_refresh(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.setSelectedQueue(getCurrentSelection());
            }
        }));

        // ----

        queueTable = new DefaultCellTable<Queue>(5);
        queueTable.setSelectionModel(new SingleSelectionModel<Queue>());

        dataProvider = new ListDataProvider<Queue>();
        dataProvider.addDataDisplay(queueTable);

        com.google.gwt.user.cellview.client.Column<Queue, String> nameColumn = new com.google.gwt.user.cellview.client.Column<Queue, String>(new TextCell()) {
            @Override
            public String getValue(Queue object) {
                return object.getName();
            }
        };

        com.google.gwt.user.cellview.client.Column<Queue, List<String>> protocolColumn = new com.google.gwt.user.cellview.client.Column<Queue, List<String>>(new ProtocolCell()) {
            @Override
            public List<String> getValue(Queue object) {
                return object.getEntries();
            }
        };

        queueTable.addColumn(nameColumn, "Name");
        queueTable.addColumn(protocolColumn, "JNDI");

        queueTable.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler(){
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                Queue queue = getCurrentSelection();
                presenter.setSelectedQueue(queue);

            }
        });

        // ----

        NumberColumn inQueue = new NumberColumn("message-count", "Queued");
        Column[] cols = new Column[] {
                inQueue.setBaseline(true),
                new NumberColumn("delivering-count","In Delivery").setComparisonColumn(inQueue),
        };

        String title = "In-Flight Messages";

        final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
            @Override
            public ModelNode getAddress() {
                ModelNode address = new ModelNode();
                address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
                address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "messaging");
                address.get(ModelDescriptionConstants.ADDRESS).add("hornetq-server", "default");
                address.get(ModelDescriptionConstants.ADDRESS).add("jms-queue", "*");
                return address;
            }
        };

        if(Console.protovisAvailable())
        {
            sampler = new BulletGraphView(title, "count")
                    .setColumns(cols);
        }
        else
        {


            sampler = new PlainColumnView(title, addressCallback)
                    .setColumns(cols)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----

        Column[] cols2 = new Column[] {
                new NumberColumn("messages-added", "Added"),
                new NumberColumn("scheduled-count","Scheduled")
        };

        String title2 = "Messages Processed";


        if(Console.protovisAvailable())
        {
            messageSampler = new BulletGraphView(title2, "count")
                    .setColumns(cols2);
        }
        else
        {
            messageSampler = new PlainColumnView(title2, addressCallback)
                    .setColumns(cols2)
                    .setWidth(100, Style.Unit.PCT);
        }
        // ----


        NumberColumn consumerCol = new NumberColumn("consumer-count", "Consumers");
        Column[] cols3 = new Column[] {
                consumerCol
        };

        String title3 = "Consumer";


        if(Console.protovisAvailable())
        {
            consumerSampler = new BulletGraphView(title3, "count")
                    .setColumns(cols3);
        }
        else
        {
            consumerSampler = new PlainColumnView(title3, addressCallback)
                    .setColumns(cols3)
                    .setWidth(100, Style.Unit.PCT);
        }

        // ----


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

        ToolStrip queueTools = new ToolStrip();
        queueTools.addToolButtonRight(new ToolButton("Flush", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SingleSelectionModel<Queue> selectionModel =
                        (SingleSelectionModel<Queue>)queueTable.getSelectionModel();

View Full Code Here

                connectionSql,
                tx, jtaItem, ccmItem);

        form.setEnabled(false);

        ToolButton verifyBtn = new ToolButton(Console.CONSTANTS.subsys_jca_dataSource_verify(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                presenter.verifyConnection(form.getEditedEntity().getName(), false);
            }
        });

        verifyBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_verify_dataSourceDetails());

        FormToolStrip<DataSource> formTools = new FormToolStrip<DataSource>(form,callback);
        formTools.providesDeleteOp(false);

        // standalone only
View Full Code Here

    @Override
    protected ToolStrip createToolStrip() {

        ToolStrip toolStrip = super.createToolStrip();

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_setDefault(),
                    new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                           defaultCacheContainerWindow.setChoices(bridge.getEntityList());
                           defaultCacheContainerWindow.show();
                        }
                    }));

        ToolButton clearBtn = new ToolButton(Console.CONSTANTS.subsys_infinispan_cache_container_clear_caches(),
                    new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent clickEvent) {
                            final CacheContainer cacheContainer = (CacheContainer) ((SingleSelectionModel)
                                    table.getSelectionModel()).getSelectedObject();
View Full Code Here

        this.presenter = presenter;
    }

    Widget asWidget() {
        ToolStrip topLevelTools = new ToolStrip();
        topLevelTools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {

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

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

                final AdminObject selection = getCurrentSelection();

                if(selection!=null)
                {
                    Feedback.confirm(
                            Console.MESSAGES.deleteTitle("Admin Object"),
                            Console.MESSAGES.deleteConfirm("Admin Object" + selection.getJndiName()),
                            new Feedback.ConfirmationHandler() {
                                @Override
                                public void onConfirmation(boolean isConfirmed) {
                                    if (isConfirmed) {
                                        presenter.onRemoveAdmin(selection);
                                    }
                                }
                            });
                }
            }
        };

        ToolButton deleteBtn = new ToolButton(Console.CONSTANTS.common_label_delete());
        deleteBtn.addClickHandler(clickHandler);
        topLevelTools.addToolButtonRight(deleteBtn);

        disableBtn = new ToolButton(Console.CONSTANTS.common_label_disable(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                final AdminObject selection = getCurrentSelection();
View Full Code Here

TOP

Related Classes of org.jboss.ballroom.client.widgets.tools.ToolButton

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.