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

Examples of org.jboss.as.console.client.widgets.pages.Pages


            return tabPanelContract;
        }

        private TabPanelContract createPages(InteractionUnit<StereoTypes> interactionUnit, EventBus eventBus) {
            final Pages pagedView = new Pages();

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

            // activation listener

            eventBus.addHandler(SystemEvent.TYPE,
                    new ChildActivationHandler<Pages>(pagedView, childUnits, new ChildUnitCommand<Pages>() {
                        @Override
                        public void execute(Pages parent, int key) {
                            // TODO: this doesn't really work (rendering bugs) ...
                            parent.selectTab(key, false);
                            parent.getDeckPanel().showWidget(key); // workaround
                        }
                    })
            );

            TabPanelContract tabPanelContract = new TabPanelContract() {

                @Override
                public void add(InteractionUnit unit, Widget widget) {

                    widget.addStyleName("rhs-content-panel");

                    pagedView.add(widget, unit.getLabel());

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

                @Override
                public Widget as() {
                    Widget widget = pagedView.asWidget();
                    widget.addStyleName("fill-layout");

                    widget.addAttachHandler(new AttachEvent.Handler() {
                        @Override
                        public void onAttachOrDetach(AttachEvent attachEvent) {
                            if (pagedView.getWidgetCount() > 0)
                                pagedView.selectTab(0, true);
                        }
                    });

                    //pagedView.showPage(0);
                    return pagedView;
View Full Code Here


            return tabPanelContract;
        }

        private TabPanelContract createPages(InteractionUnit<StereoTypes> interactionUnit, EventBus eventBus) {
            final Pages pagedView = new Pages();

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

            // activation listener

            eventBus.addHandler(SystemEvent.TYPE,
                    new ChildActivationHandler<Pages>(pagedView, childUnits, new ChildUnitCommand<Pages>() {
                        @Override
                        public void execute(Pages parent, int key) {
                            // TODO: this doesn't really work (rendering bugs) ...
                            parent.selectTab(key, false);
                            parent.getDeckPanel().showWidget(key); // workaround
                        }
                    })
            );

            TabPanelContract tabPanelContract = new TabPanelContract() {

                @Override
                public void add(InteractionUnit unit, Widget widget) {

                    widget.addStyleName("rhs-content-panel");

                    pagedView.add(widget, unit.getLabel());

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

                @Override
                public Widget as() {
                    Widget widget = pagedView.asWidget();
                    widget.addStyleName("fill-layout");

                    widget.addAttachHandler(new AttachEvent.Handler() {
                        @Override
                        public void onAttachOrDetach(AttachEvent attachEvent) {
                            if (pagedView.getWidgetCount() > 0)
                                pagedView.selectTab(0, true);
                        }
                    });

                    //pagedView.showPage(0);
                    return pagedView;
View Full Code Here

            return tabPanelContract;
        }

        private TabPanelContract createPages(InteractionUnit<StereoTypes> interactionUnit, EventBus eventBus) {
            final Pages pagedView = new Pages();

            return new TabPanelContract() {

                @Override
                public void add(InteractionUnit unit, Widget widget) {

                    widget.addStyleName("rhs-content-panel");

                    pagedView.add(widget, unit.getLabel());

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

                @Override
                public Widget as() {
                    Widget widget = pagedView.asWidget();
                    widget.addStyleName("fill-layout");

                    widget.addAttachHandler(new AttachEvent.Handler() {
                        @Override
                        public void onAttachOrDetach(AttachEvent attachEvent) {
                            if(pagedView.getWidgetCount()>0)
                                pagedView.selectTab(0);
                        }
                    });

                    //pagedView.showPage(0);
                    return pagedView;
View Full Code Here

            return tabPanelContract;
        }

        private TabPanelContract createPages(InteractionUnit<StereoTypes> interactionUnit, EventBus eventBus) {
            final Pages pagedView = new Pages();

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

            // activation listener

            eventBus.addHandler(SystemEvent.TYPE,
                    new ChildActivationHandler<Pages>(pagedView, childUnits, new ChildUnitCommand<Pages>() {
                        @Override
                        public void execute(Pages parent, int key) {
                            // TODO: this doesn't really work (rendering bugs) ...
                            parent.selectTab(key, false);
                            parent.getDeckPanel().showWidget(key); // workaround
                        }
                    })
            );

            TabPanelContract tabPanelContract = new TabPanelContract() {

                @Override
                public void add(InteractionUnit unit, Widget widget) {

                    //widget.addStyleName("rhs-content-panel");

                    pagedView.add(widget, unit.getLabel());

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

                @Override
                public Widget as() {
                    Widget widget = pagedView.asWidget();
                    widget.addStyleName("fill-layout");

                    widget.addAttachHandler(new AttachEvent.Handler() {
                        @Override
                        public void onAttachOrDetach(AttachEvent attachEvent) {
                            if (pagedView.getWidgetCount() > 0)
                                pagedView.selectTab(0, true);
                        }
                    });

                    //pagedView.showPage(0);
                    return pagedView;
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.pages.Pages

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.