Examples of Vote


Examples of org.apache.pivot.util.Vote

    private static class MenuPopupStateListenerList extends ListenerList<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

Examples of org.apache.pivot.util.Vote

        }

        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

Examples of org.apache.pivot.util.Vote

    private static class TabPaneSelectionListenerList extends ListenerList<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

Examples of org.apache.pivot.util.Vote

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

            Vote vote = dialogStateListeners.previewDialogClose(this, result);

            if (vote == Vote.APPROVE) {
                Window owner = getOwner();

                super.close();
View Full Code Here

Examples of org.apache.pivot.util.Vote

public class Dialog extends Frame {
    private static class DialogStateListenerList extends ListenerList<DialogStateListener>
        implements DialogStateListener {
        @Override
        public Vote previewDialogClose(Dialog dialog, boolean result) {
            Vote vote = Vote.APPROVE;

            for (DialogStateListener listener : this) {
                vote = vote.tally(listener.previewDialogClose(dialog, result));
            }

            return vote;
        }
View Full Code Here

Examples of org.apache.pivot.util.Vote

        }

        int previousSelectedIndex = this.selectedIndex;

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

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

Examples of org.apache.pivot.util.Vote

    private static class AccordionSelectionListenerList extends ListenerList<AccordionSelectionListener>
        implements AccordionSelectionListener {
        @Override
        public Vote previewSelectedIndexChange(Accordion accordion, int selectedIndex) {
            Vote vote = Vote.APPROVE;

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

            return vote;
        }
View Full Code Here

Examples of org.apache.pivot.util.Vote

    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

Examples of org.apache.pivot.util.Vote

    }

    // Tab pane selection events
    @Override
    public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex) {
        Vote vote;

        if (tabPane.isShowing()
            && selectionChangeTransition == null) {
            int previousSelectedIndex = tabPane.getSelectedIndex();
View Full Code Here

Examples of org.apache.pivot.util.Vote

            }
        }

        if (!isOpen()) {
            opening = true;
            Vote vote = windowStateListeners.previewWindowOpen(this, display);

            if (vote == Vote.APPROVE) {
                // Set the owner and add to the owner's owned window list
                this.owner = owner;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.