Package net.rim.device.api.ui.component.pane

Examples of net.rim.device.api.ui.component.pane.TitleView


            // Choose which pane the model is displaying
            model.setCurrentlySelectedIndex(1);

            // Create the header and initialize the model and visual properties
            TitleView header;
            PaneManagerController controller;
            header = new HorizontalScrollableTitleView(Field.FOCUSABLE);
            ((HorizontalScrollableTitleView) header).enableArrows(true);
            controller = new HorizontalScrollableController();
            header.setModel(model);
            final XYEdges edgesFour = new XYEdges(4, 4, 4, 4);
            header.setBorder(BorderFactory.createRoundedBorder(edgesFour));

            // Set arrow images
            final Bitmap leftArrow = Bitmap.getBitmapResource("leftArrow.png");
            final Bitmap rightArrow =
                    Bitmap.getBitmapResource("rightArrow.png");
            if (leftArrow != null) {
                header.setLeftArrow(leftArrow);
            }
            if (rightArrow != null) {
                header.setRightArrow(rightArrow);
            }

            // Create the PaneView object, which will display the panes and is
            // controlled by the model.
            final PaneView paneView = new PaneView(Field.FOCUSABLE);
View Full Code Here


            // Check to be sure everything is instantiated
            if (_paneManagerView == null) {
                return;
            }
            final PaneManagerModel model = _paneManagerView.getModel();
            TitleView header = _paneManagerView.getTitle();
            if (header == null || model == null) {
                return;
            }

            PaneManagerController controller = null;

            // Switch the header style based on current style
            if (header instanceof HorizontalScrollableTitleView) {
                header = new HorizontalTabTitleView(Field.FOCUSABLE);
                ((HorizontalTabTitleView) header)
                        .setNumberOfDisplayedTabs(model.numberOfPanes());
                controller = new HorizontalTabController();
            } else if (header instanceof HorizontalTabTitleView) {
                header = new HorizontalScrollableTitleView(Field.FOCUSABLE);
                ((HorizontalScrollableTitleView) header).enableArrows(true);
                controller = new HorizontalScrollableController();

                if (_leftArrow != null) {
                    header.setLeftArrow(_leftArrow);
                }
                if (_rightArrow != null) {
                    header.setRightArrow(_rightArrow);
                }
            }

            // Set up references between objects
            header.setModel(model);
            header.setBorder(BorderFactory.createRoundedBorder(_edgesFour));
            if (controller != null) {
                _paneManagerView.setController(controller);
                model.setController(controller);
                controller.setView(_paneManagerView);
                controller.setModel(model);
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.component.pane.TitleView

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.