Package org.apache.pivot.util

Examples of org.apache.pivot.util.Vote


    private static class TextInputContentListenerList extends WTKListenerList<TextInputContentListener>
        implements TextInputContentListener {
        @Override
        public Vote previewInsertText(TextInput textInput, CharSequence text, int index) {
            Vote vote = Vote.APPROVE;

            for (TextInputContentListener listener : this) {
                vote = vote.tally(listener.previewInsertText(textInput, text, index));
            }

            return vote;
        }
View Full Code Here


            }
        }

        @Override
        public Vote previewRemoveText(TextInput textInput, int index, int count) {
            Vote vote = Vote.APPROVE;

            for (TextInputContentListener listener : this) {
                vote = vote.tally(listener.previewRemoveText(textInput, index, count));
            }

            return vote;
        }
View Full Code Here

    public void close(boolean resultArgument) {
        if (!isClosed()) {
            closing = true;

            Vote vote = suggestionPopupStateListeners.previewSuggestionPopupClose(this, resultArgument);

            if (vote == Vote.APPROVE) {
                super.close();

                closing = super.isClosing();
View Full Code Here

    private static class SuggestionPopupStateListenerList extends WTKListenerList<SuggestionPopupStateListener>
        implements SuggestionPopupStateListener {
        @Override
        public Vote previewSuggestionPopupClose(SuggestionPopup suggestionPopup, boolean result) {
            Vote vote = Vote.APPROVE;

            for (SuggestionPopupStateListener listener : this) {
                vote = vote.tally(listener.previewSuggestionPopupClose(suggestionPopup, result));
            }

            return vote;
        }
View Full Code Here

    public void close(boolean immediate) {
        if (!isClosed()) {
            closing = true;

            Vote vote = menuPopupStateListeners.previewMenuPopupClose(this, immediate);

            if (vote == Vote.APPROVE) {
                super.close();

                closing = super.isClosing();
View Full Code Here

    private static class MenuPopupStateListenerList extends WTKListenerList<MenuPopupStateListener>
        implements MenuPopupStateListener {
        @Override
        public Vote previewMenuPopupClose(MenuPopup menuPopup, boolean immediate) {
            Vote vote = Vote.APPROVE;

            for (MenuPopupStateListener listener : this) {
                vote = vote.tally(listener.previewMenuPopupClose(menuPopup, immediate));
            }

            return vote;
        }
View Full Code Here

        indexBoundsCheck("selectedIndex", selectedIndex, -1, tabs.getLength() - 1);

        int previousSelectedIndex = this.selectedIndex;

        if (previousSelectedIndex != selectedIndex) {
            Vote vote = tabPaneSelectionListeners.previewSelectedIndexChange(this, selectedIndex);

            if (vote == Vote.APPROVE) {
                this.selectedIndex = selectedIndex;
                tabPaneSelectionListeners.selectedIndexChanged(this, previousSelectedIndex);
            } else {
View Full Code Here

        @Override
        public Sequence<Component> remove(int index, int count) {
            Sequence<Component> removed;

            Vote vote = tabPaneListeners.previewRemoveTabs(TabPane.this, index, count);
            if (vote == Vote.APPROVE) {
                // Remove the tabs from the tab list
                removed = tabs.remove(index, count);

                // Update the selection
View Full Code Here

            }
        }

        @Override
        public Vote previewRemoveTabs(TabPane tabPane, int index, int count) {
            Vote vote = Vote.APPROVE;

            for (TabPaneListener listener : this) {
                vote = vote.tally(listener.previewRemoveTabs(tabPane, index, count));
            }

            return vote;
        }
View Full Code Here

    private static class TabPaneSelectionListenerList extends WTKListenerList<TabPaneSelectionListener>
        implements TabPaneSelectionListener {
        @Override
        public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex) {
            Vote vote = Vote.APPROVE;

            for (TabPaneSelectionListener listener : this) {
                vote = vote.tally(listener.previewSelectedIndexChange(tabPane, selectedIndex));
            }

            return vote;
        }
View Full Code Here

TOP

Related Classes of org.apache.pivot.util.Vote

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.