Package org.apache.pivot.wtk.Menu

Examples of org.apache.pivot.wtk.Menu.Item


                    int sectionLength = section.getLength();
                    itemIndex = sectionLength - 1;
                }

                while (itemIndex >= 0) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex--;
                }

                if (itemIndex >= 0) {
                    break;
                }

                sectionIndex--;
            }

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.DOWN) {
            Menu.SectionSequence sections = menu.getSections();
            int sectionCount = sections.getLength();

            Menu.Item activeItem = menu.getActiveItem();
            int sectionIndex;
            int itemIndex;
            if (activeItem == null) {
                sectionIndex = 0;
                itemIndex = 0;
            } else {
                Menu.Section section = activeItem.getSection();
                sectionIndex = sections.indexOf(section);
                itemIndex = section.indexOf(activeItem) + 1;
            }

            while (sectionIndex < sectionCount) {
                Section section = sections.get(sectionIndex);
                int sectionLength = section.getLength();

                while (itemIndex < sectionLength) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex++;
                }
View Full Code Here


        while (sectionIndex < sectionCount) {
            Section section = sections.get(sectionIndex);
            int sectionLength = section.getLength();

            while (itemIndex < sectionLength) {
                Item item = section.get(itemIndex);
                if (item.isEnabled()) {
                    Button.DataRenderer itemDataRenderer = item.getDataRenderer();
                    String string = itemDataRenderer.toString(item.getButtonData());

                    if (string != null
                        && string.length() > 0) {
                        char first = Character.toUpperCase(string.charAt(0));

                        if (first == characterUpper) {
                            item.setActive(true);
                            consumed = true;
                            break;
                        }
                    }
                }
View Full Code Here

                    int sectionLength = section.getLength();
                    itemIndex = sectionLength - 1;
                }

                while (itemIndex >= 0) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex--;
                }

                if (itemIndex >= 0) {
                    break;
                }

                sectionIndex--;
            }

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.DOWN) {
            Menu.SectionSequence sections = menu.getSections();
            int sectionCount = sections.getLength();

            Menu.Item activeItem = menu.getActiveItem();
            int sectionIndex;
            int itemIndex;
            if (activeItem == null) {
                sectionIndex = 0;
                itemIndex = 0;
            } else {
                Menu.Section section = activeItem.getSection();
                sectionIndex = sections.indexOf(section);
                itemIndex = section.indexOf(activeItem) + 1;
            }

            while (sectionIndex < sectionCount) {
                Section section = sections.get(sectionIndex);
                int sectionLength = section.getLength();

                while (itemIndex < sectionLength) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex++;
                }
View Full Code Here

        while (sectionIndex < sectionCount) {
            Section section = sections.get(sectionIndex);
            int sectionLength = section.getLength();

            while (itemIndex < sectionLength) {
                Item item = section.get(itemIndex);
                if (item.isEnabled()) {
                    Button.DataRenderer itemDataRenderer = item.getDataRenderer();
                    String string = itemDataRenderer.toString(item.getButtonData());

                    if (string != null
                        && string.length() > 0) {
                        char first = Character.toUpperCase(string.charAt(0));

                        if (first == character) {
                            item.setActive(true);
                            consumed = true;
                            break;
                        }
                    }
                }
View Full Code Here

                    int sectionLength = section.getLength();
                    itemIndex = sectionLength - 1;
                }

                while (itemIndex >= 0) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex--;
                }

                if (itemIndex >= 0) {
                    break;
                }

                sectionIndex--;
            }

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.DOWN) {
            Menu.SectionSequence sections = menu.getSections();
            int sectionCount = sections.getLength();

            Menu.Item activeItem = menu.getActiveItem();
            int sectionIndex;
            int itemIndex;
            if (activeItem == null) {
                sectionIndex = 0;
                itemIndex = 0;
            } else {
                Menu.Section section = activeItem.getSection();
                sectionIndex = sections.indexOf(section);
                itemIndex = section.indexOf(activeItem) + 1;
            }

            while (sectionIndex < sectionCount) {
                Section section = sections.get(sectionIndex);
                int sectionLength = section.getLength();

                while (itemIndex < sectionLength) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex++;
                }
View Full Code Here

        while (sectionIndex < sectionCount) {
            Section section = sections.get(sectionIndex);
            int sectionLength = section.getLength();

            while (itemIndex < sectionLength) {
                Item item = section.get(itemIndex);
                if (item.isEnabled()) {
                    Button.DataRenderer itemDataRenderer = item.getDataRenderer();
                    String string = itemDataRenderer.toString(item.getButtonData());

                    if (string != null
                        && string.length() > 0) {
                        char first = Character.toUpperCase(string.charAt(0));

                        if (first == character) {
                            item.setActive(true);
                            consumed = true;
                            break;
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.Menu.Item

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.