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

Examples of org.jboss.as.console.client.widgets.Code


        basicsPanel.add(basicsForm);

        // operations
        VerticalPanel operationsPanel = new VerticalPanel();
        operationsPanel.setStyleName("fill-layout-width");
        final Code code = new Code(Code.Language.JAVASCRIPT, false);
        operationsPanel.add(code);

        // form tabs
        TabPanel forms = new TabPanel();
        forms.setStyleName("default-tabpanel");
        forms.add(basicsPanel, Console.CONSTANTS.common_label_attributes());
        forms.add(operationsPanel, Console.CONSTANTS.common_label_operations());
        forms.selectTab(0);

        // update operations upon selection
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(final SelectionChangeEvent event) {
                code.clear();
                AuditLogItem item = selectionModel.getSelectedObject();
                if (item != null) {
                    JSONArray jsonArray = JSONParser.parseStrict(item.getOperations().getPayload()).isArray();
                    if (jsonArray != null) {
                        String stringify = stringify(jsonArray.getJavaScriptObject());
                        code.setValue(SafeHtmlUtils.fromString(stringify));
                    }
                }
            }
        });
View Full Code Here


        basicsPanel.add(basicsForm);

        // operations
        VerticalPanel operationsPanel = new VerticalPanel();
        operationsPanel.setStyleName("fill-layout-width");
        final Code code = new Code(Code.Language.JAVASCRIPT, false);
        operationsPanel.add(code);

        // form tabs
        TabPanel forms = new TabPanel();
        forms.setStyleName("default-tabpanel");
        forms.add(basicsPanel, Console.CONSTANTS.common_label_attributes());
        forms.add(operationsPanel, Console.CONSTANTS.common_label_operations());
        forms.selectTab(0);

        // update operations upon selection
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(final SelectionChangeEvent event) {
                code.clear();
                AuditLogItem item = selectionModel.getSelectedObject();
                JSONArray jsonArray = JSONParser.parseStrict(item.getOperations().getPayload()).isArray();
                if (jsonArray != null) {
                    String stringify = stringify(jsonArray.getJavaScriptObject());
                    code.setValue(SafeHtmlUtils.fromString(stringify));
                }
            }
        });

        // setup layout
View Full Code Here

                @Override
                public void onOpen(OpenEvent<DisclosurePanel> event) { event.getTarget().addStyleName("help-panel-aligned-open");
                }
            });
            Code detailsText = new Code();
            detailsText.setValue(SafeHtmlUtils.fromString(result.getDetails()));
            detailsPanel.add(detailsText);
            panel.add(detailsPanel);
        }

        ClickHandler confirmHandler = new ClickHandler() {
View Full Code Here

            public void onClose(CloseEvent<DisclosurePanel> event) {
                panel.getHeaderTextAccessor().setText(show);
            }
        });

        details = new Code();
        panel.add(details);

        initWidget(panel);
        setStyleName("hal-error-details");
    }
View Full Code Here

    Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");
        layout.getElement().setAttribute("style", "padding:10px");

        dump = new Code();

        ToolStrip tools = new ToolStrip();
        tools.addToolButtonRight(new ToolButton("Refresh", new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
View Full Code Here

        basicsPanel.add(basicsForm);

        // operations
        VerticalPanel operationsPanel = new VerticalPanel();
        operationsPanel.setStyleName("fill-layout-width");
        final Code code = new Code(Code.Language.JAVASCRIPT, false);
        operationsPanel.add(code);

        // form tabs
        TabPanel forms = new TabPanel();
        forms.setStyleName("default-tabpanel");
        forms.add(basicsPanel, Console.CONSTANTS.common_label_attributes());
        forms.add(operationsPanel, Console.CONSTANTS.common_label_operations());
        forms.selectTab(0);

        // update operations upon selection
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(final SelectionChangeEvent event) {
                code.clear();
                AuditLogItem item = selectionModel.getSelectedObject();
                if (item != null) {
                    JSONArray jsonArray = JSONParser.parseStrict(item.getOperations().getPayload()).isArray();
                    if (jsonArray != null) {
                        String stringify = stringify(jsonArray.getJavaScriptObject());
                        code.setValue(SafeHtmlUtils.fromString(stringify));
                    }
                }
            }
        });
View Full Code Here

            public void onClose(CloseEvent<DisclosurePanel> event) {
                panel.getHeaderTextAccessor().setText(show);
            }
        });

        details = new Code();
        panel.add(details);

        initWidget(panel);
        setStyleName("hal-error-details");
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.Code

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.