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

Examples of org.jboss.as.console.client.widgets.tabs.DefaultTabLayoutPanel


                this.delegate = createDefaultTabPanel(interactionUnit, eventBus);
            }
        }

        private TabPanelContract createEditorPanel(final InteractionUnit interactionUnit, final EventBus eventBus) {
            final DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
            tabLayoutpanel.addStyleName("default-tabpanel");

            tabLayoutpanel.addBeforeSelectionHandler(new NavigationHandler(interactionUnit, childUnits));

           /* tabLayoutpanel.addAttachHandler(new AttachEvent.Handler() {
                @Override
                public void onAttachOrDetach(AttachEvent attachEvent) {

                    if(attachEvent.isAttached() && tabLayoutpanel.getWidgetCount()>0)
                        tabLayoutpanel.selectTab(0);
                }
            });*/

            TabPanelContract tabPanelContract = new TabPanelContract() {
                @Override
                public void add(InteractionUnit unit, Widget widget) {
                    final VerticalPanel vpanel = new VerticalPanel();
                    vpanel.setStyleName("rhs-content-panel");
                    vpanel.add(widget);

                    ScrollPanel scroll = new ScrollPanel(vpanel);
                    tabLayoutpanel.add(scroll, unit.getLabel());

                    // register tab2index mapping
                    childUnits.put(tabLayoutpanel.getWidgetCount() - 1, unit.getId());
                }

                @Override
                public Widget as() {
                    return tabLayoutpanel;
                }
            };


            // activation listener
            eventBus.addHandler(SystemEvent.TYPE,
                    new ChildActivationHandler<DefaultTabLayoutPanel>(tabLayoutpanel, childUnits, new ChildUnitCommand<DefaultTabLayoutPanel>() {
                        @Override
                        public void execute(DefaultTabLayoutPanel parent, int key) {
                            tabLayoutpanel.selectTab(key, false);
                        }
                    })
            );

            eventBus.addHandler(SystemEvent.TYPE,
                    new SystemEvent.Handler() {
                        @Override
                        public boolean accepts(SystemEvent event) {

                            return event.getId().equals(CommonQNames.ACTIVATION_ID)
                                    && childUnits.containsValue(event.getPayload()
                            );
                        }

                        @Override
                        public void onSystemEvent(SystemEvent event) {
                            QName id = (QName) event.getPayload();

                            Set<Integer> keys = childUnits.keySet();
                            for (Integer key : keys) {
                                if (childUnits.get(key).equals(id)) {
                                    tabLayoutpanel.selectTab(key, false);
                                    break;
                                }
                            }
                        }
                    }
View Full Code Here


    public Widget createWidget() {

        this.dsMetrics = new DataSourceMetrics(presenter, false);
        this.xaMetrics = new DataSourceMetrics(presenter, true);

        tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);

        tabLayoutpanel.addStyleName("default-tabpanel");

        tabLayoutpanel.add(dsMetrics.asWidget(), "Data Sources", true);
        tabLayoutpanel.add(xaMetrics.asWidget(), "XA Data Sources", true);
View Full Code Here

        this.presenter = presenter;
    }

    @Override
    public Widget createWidget() {
        DefaultTabLayoutPanel tabLayoutPanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        tabLayoutPanel.addStyleName("default-tabpanel");

        groupOverview = new GroupDeploymentsOverview(presenter);

        tabLayoutPanel.add(makeDeploymentsPanel(), "Content Repository", true);
        tabLayoutPanel.add(groupOverview.asWidget(), "Server Groups", true);

        tabLayoutPanel.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
            @Override
            public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
                if(event.getItem()==1)
                {
                    groupOverview.resetPages();
View Full Code Here

    }

    @Override
    public Widget createWidget() {

        loggersTabs = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        loggersTabs.addStyleName("default-tabpanel");

        loggersTabs.add(rootLoggerSubview.asWidget(), rootLoggerSubview.getEntityDisplayName(), true);
        loggersTabs.add(loggerSubview.asWidget(), loggerSubview.getEntityDisplayName(), true);
View Full Code Here

    public Widget createWidget() {
        groupEditor = new RoleAssignmentEditor(presenter, GROUP);
        userEditor = new RoleAssignmentEditor(presenter, USER);
        roleEditor = new RoleEditor(presenter);

        DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        tabLayoutpanel.addStyleName("default-tabpanel");
        tabLayoutpanel.add(userEditor, Console.CONSTANTS.common_label_users(), true);
        tabLayoutpanel.add(groupEditor, Console.CONSTANTS.common_label_groups(), true);
        tabLayoutpanel.add(roleEditor, Console.CONSTANTS.common_label_roles(), true);
        tabLayoutpanel.selectTab(0);

        return tabLayoutpanel;
    }
View Full Code Here

                .setDescription(Console.CONSTANTS.server_config_desc())
                .setMaster("Configuration", form.asWidget())
                .addDetail("Status", reloadPanel);

        // ---------------------
        DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        tabLayoutpanel.addStyleName("default-tabpanel");


        tabLayoutpanel.add(layout.build(), "Server", true);
        tabLayoutpanel.add(extensions.asWidget(), "Extensions", true);

        tabLayoutpanel.selectTab(0);

        return tabLayoutpanel;

    }
View Full Code Here

        layout.addContent("topology", container);

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

        DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        tabLayoutpanel.addStyleName("default-tabpanel");

        tabLayoutpanel.add(layout.build(), "Topology", true);
        tabLayoutpanel.add(extensions.asWidget(), "Extensions", true);

        tabLayoutpanel.selectTab(0);

        return tabLayoutpanel;
    }
View Full Code Here

        ScrollPanel scroll = new ScrollPanel(main);
        LayoutPanel layout = new LayoutPanel();
        layout.add(scroll);
        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        DefaultTabLayoutPanel root = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        root.addStyleName("default-tabpanel");
        root.add(layout, Console.CONSTANTS.administration_audit_log());
        root.selectTab(0);
        return root;
    }
View Full Code Here

    public Widget createWidget() {
        groupEditor = new RoleAssignmentEditor(GROUP, presenter, beanFactory);
        userEditor = new RoleAssignmentEditor(USER, presenter, beanFactory);
        scopedRoleEditor = new ScopedRoleEditor(presenter);

        DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
        tabLayoutpanel.addStyleName("default-tabpanel");
        tabLayoutpanel.add(groupEditor, Console.CONSTANTS.common_label_groups());
        tabLayoutpanel.add(userEditor, Console.CONSTANTS.common_label_users());
        tabLayoutpanel.add(scopedRoleEditor, Console.CONSTANTS.administration_scoped_roles());
        tabLayoutpanel.selectTab(0);

        return tabLayoutpanel;
    }
View Full Code Here

                this.delegate = createDefaultTabPanel(interactionUnit, eventBus);
            }
        }

        private TabPanelContract createEditorPanel(final InteractionUnit interactionUnit, final EventBus eventBus) {
            final DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40, Style.Unit.PX);
            tabLayoutpanel.addStyleName("default-tabpanel");

            tabLayoutpanel.addBeforeSelectionHandler(new NavigationHandler(interactionUnit, childUnits, tabLayoutpanel));

           /* tabLayoutpanel.addAttachHandler(new AttachEvent.Handler() {
                @Override
                public void onAttachOrDetach(AttachEvent attachEvent) {

                    if(attachEvent.isAttached() && tabLayoutpanel.getWidgetCount()>0)
                        tabLayoutpanel.selectTab(0);
                }
            });*/

            TabPanelContract tabPanelContract = new TabPanelContract() {
                @Override
                public void add(InteractionUnit unit, Widget widget) {
                    final VerticalPanel vpanel = new VerticalPanel();
                    vpanel.setStyleName("rhs-content-panel");
                    vpanel.add(widget);

                    ScrollPanel scroll = new ScrollPanel(vpanel);
                    tabLayoutpanel.add(scroll, unit.getLabel());

                    // register tab2index mapping
                    childUnits.put(tabLayoutpanel.getWidgetCount() - 1, unit.getId());
                }

                @Override
                public Widget as() {
                    return tabLayoutpanel;
                }
            };


            // activation listener
            eventBus.addHandler(SystemEvent.TYPE,
                    new ChildActivationHandler<DefaultTabLayoutPanel>(tabLayoutpanel, childUnits, new ChildUnitCommand<DefaultTabLayoutPanel>() {
                        @Override
                        public void execute(DefaultTabLayoutPanel parent, int key) {
                            tabLayoutpanel.selectTab(key, false);
                        }
                    })
            );

            eventBus.addHandler(SystemEvent.TYPE,
                    new SystemEvent.Handler() {
                        @Override
                        public boolean accepts(SystemEvent event) {

                            return event.getId().equals(CommonQNames.ACTIVATION_ID)
                                    && childUnits.containsValue(event.getPayload()
                            );
                        }

                        @Override
                        public void onSystemEvent(SystemEvent event) {
                            QName id = (QName) event.getPayload();

                            Set<Integer> keys = childUnits.keySet();
                            for (Integer key : keys) {
                                if (childUnits.get(key).equals(id)) {
                                    tabLayoutpanel.selectTab(key, false);
                                    break;
                                }
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.tabs.DefaultTabLayoutPanel

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.