Package org.jboss.as.console.client.widgets.tools

Examples of org.jboss.as.console.client.widgets.tools.ToolStrip


   
    public Widget asWidget() {
        VerticalPanel detailPanel = new VerticalPanel();
        detailPanel.setStyleName("fill-layout-width");
       
        ToolStrip detailToolStrip = new ToolStrip();
        editBtn = new ToolButton(Console.CONSTANTS.common_label_edit());
        ClickHandler editHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if(editBtn.getText().equals(Console.CONSTANTS.common_label_edit()))
                    presenter.onEditHandler();
                else {
                    editedHandler = form.getEditedEntity();
                    presenter.onSaveHandlerDetails(form.getEditedEntity().getName(), form.getEditedEntity().getType(), form.getChangedValues());
                }
            }
        };
        editBtn.addClickHandler(editHandler);
       
        cancelBtn = new ToolButton(Console.CONSTANTS.common_label_cancel());
        ClickHandler cancelHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                form.cancel();
                HandlerDetails.this.setEnabled(false);
            }       
        };
        cancelBtn.addClickHandler(cancelHandler);
        cancelBtn.setVisible(false);
       
        detailToolStrip.addToolButton(editBtn);
        detailToolStrip.addToolButton(cancelBtn);
        detailPanel.add(detailToolStrip);
       
        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        TextItem typeItem = new TextItem("type", Console.CONSTANTS.subsys_logging_type());
View Full Code Here


    public Widget asWidget() {
        VerticalPanel detailPanel = new VerticalPanel();
        detailPanel.setStyleName("fill-layout-width");

        ToolStrip detailToolStrip = new ToolStrip();
        editBtn = new ToolButton(Console.CONSTANTS.common_label_edit());
        ClickHandler editHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if(editBtn.getText().equals(Console.CONSTANTS.common_label_edit()))
                    presenter.onEditLogger();
                else {
                    editedLogger = form.getEditedEntity();
                    presenter.onSaveLoggerDetails(form.getEditedEntity().getName(), form.getChangedValues());
                }
            }
        };
        editBtn.addClickHandler(editHandler);

        cancelBtn = new ToolButton(Console.CONSTANTS.common_label_cancel());
        ClickHandler cancelHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                form.cancel();
                LoggerConfigDetails.this.setEnabled(false);
            }
        };
        cancelBtn.addClickHandler(cancelHandler);

        detailToolStrip.addToolButton(editBtn);
        detailToolStrip.addToolButton(cancelBtn);

        detailPanel.add(detailToolStrip);

        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
View Full Code Here

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

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

    }

    Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();

        ToolStrip toolStrip = new ToolStrip();
        toolStrip.getElement().setAttribute("style", "margin-bottom:10px;");

        edit = new ToolButton("Edit", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                if(edit.getText().equals("Edit"))
                    presenter.onEditTopic();
                else
                    presenter.onSaveTopic(form.getEditedEntity().getName(), form.getChangedValues());
            }
        });

        //toolStrip.addToolButton(edit);

        toolStrip.addToolButton(new ToolButton("Delete", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {

                final JMSEndpoint topic = form.getEditedEntity();
                Feedback.confirm("Remove Topic", "Really remove topic " + topic.getName() + "?",
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed)
                                    presenter.onDeleteTopic(topic);
                            }
                        });

            }
        }));


        toolStrip.addToolButtonRight(new ToolButton("Add", new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewTopicDialogue();
            }
        }));
View Full Code Here

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

        // ----

        final ToolStrip toolStrip = new ToolStrip();
        edit = new ToolButton(Console.CONSTANTS.common_label_edit());
        edit.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {
                if(edit.getText().equals(Console.CONSTANTS.common_label_edit()))
                {
                    onEdit();
                }
                else
                {
                    onSave();
                }
            }
        });

        toolStrip.addToolButton(edit);
        ToolButton delete = new ToolButton(Console.CONSTANTS.common_label_delete());
        delete.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {
                Feedback.confirm(
                        Console.MESSAGES.deleteServerConfig(),
                        Console.MESSAGES.deleteServerConfigConfirm(form.getEditedEntity().getName()),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if(isConfirmed)
                                    presenter.deleteCurrentRecord();
                            }
                        });
            }
        });

        toolStrip.addToolButton(delete);
        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_createNewServerConfig(), new ClickHandler(){
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewConfigDialoge();
            }
        }));

        toolStrip.addToolButtonRight(new ToolButton("Ports", new ClickHandler(){
            @Override
            public void onClick(ClickEvent event) {
                presenter.onShowEffectivePorts();
            }
        }));
View Full Code Here

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

        // ----

        final ToolStrip toolStrip = new ToolStrip();
        edit = new ToolButton(Console.CONSTANTS.common_label_edit());
        edit.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {
                if(edit.getText().equals(Console.CONSTANTS.common_label_edit()))
                {
                    onEdit();
                }
                else
                {
                    onSave();
                }
            }
        });

        toolStrip.addToolButton(edit);
        ToolButton delete = new ToolButton(Console.CONSTANTS.common_label_delete());
        delete.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {
                Feedback.confirm(
                        Console.MESSAGES.deleteServerGroup(),
                        Console.MESSAGES.deleteServerGroupConfirm(form.getEditedEntity().getGroupName()),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if(isConfirmed)
                                    presenter.deleteCurrentRecord();
                            }
                        });
            }
        });
        toolStrip.addToolButton(delete);

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_newServerGroup(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewGroupDialoge();
            }
        }));
View Full Code Here

        form.setNumColumns(2);
    }

    public Widget asWidget() {

        ToolStrip detailToolStrip = new ToolStrip();
        editBtn = new ToolButton(Console.CONSTANTS.common_label_edit());
        ClickHandler editHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if(editBtn.getText().equals(Console.CONSTANTS.common_label_edit()))
                    presenter.onEditXA(form.getEditedEntity());
                else
                    presenter.onSaveXADetails(form.getEditedEntity().getName(), form.getChangedValues());
            }
        };
        editBtn.addClickHandler(editHandler);
        detailToolStrip.addToolButton(editBtn);


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

                DataSource currentSelection = form.getEditedEntity();

                Feedback.confirm(
                        "Delete DataSource",
                        "Really delete this DataSource '" + currentSelection.getName() + "' ?",
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed) {
                                    presenter.onDeleteXA(form.getEditedEntity());
                                }
                            }
                        });
            }
        };
        ToolButton deleteBtn = new ToolButton(Console.CONSTANTS.common_label_delete());
        deleteBtn.addClickHandler(clickHandler);
        detailToolStrip.addToolButton(deleteBtn);


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

                String state = form.getEditedEntity().isEnabled() ? Console.CONSTANTS.common_label_disable() : Console.CONSTANTS.common_label_enable();
                final boolean doEnable = !form.getEditedEntity().isEnabled();
                Feedback.confirm(state + " datasource", "Do you want to " + state + " this DataSource?",
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if (isConfirmed) {
                                    presenter.onDisableXA(form.getEditedEntity(), doEnable);
                                }
                            }
                        });
            }
        };

        ToolButton enableBtn = new ToolButton(Console.CONSTANTS.common_label_enOrDisable());
        enableBtn.addClickHandler(disableHandler);
        detailToolStrip.addToolButtonRight(enableBtn);

        VerticalPanel panel = new VerticalPanel();
        panel.add(detailToolStrip);

        final TextItem nameItem = new TextItem("name", "Name");
View Full Code Here

        LayoutPanel layout = new LayoutPanel();

        TitleBar titleBar = new TitleBar("Host JVM");
        layout.add(titleBar);

        ToolStrip toolStrip = new ToolStrip();

        ToolButton add= new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewJVMDialogue();
            }
        });

        toolStrip.addToolButtonRight(add);

        layout.add(toolStrip);

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("rhs-content-panel");
View Full Code Here

        LayoutPanel layout = new LayoutPanel();

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

        final ToolStrip toolStrip = new ToolStrip();

        toolStrip.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_addContent(), new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                presenter.launchNewDeploymentDialoge();
            }
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.tools.ToolStrip

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.