Package org.apache.pivot.wtk.Menu

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


                    sectionIndex--;
                }
            }

            while (sectionIndex >= 0) {
                Section section = sections.get(sectionIndex);
                if (itemIndex == -1) {
                    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;
                    }
View Full Code Here


        }

        char characterUpper = Character.toUpperCase(character);

        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
View Full Code Here

                    sectionIndex--;
                }
            }

            while (sectionIndex >= 0) {
                Section section = sections.get(sectionIndex);
                if (itemIndex == -1) {
                    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;
                    }
View Full Code Here

        }

        character = Character.toUpperCase(character);

        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
View Full Code Here

                    sectionIndex--;
                }
            }

            while (sectionIndex >= 0) {
                Section section = sections.get(sectionIndex);
                if (itemIndex == -1) {
                    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;
                    }
View Full Code Here

        }

        character = Character.toUpperCase(character);

        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
View Full Code Here

TOP

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

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.