Package org.apache.pivot.util

Examples of org.apache.pivot.util.Vote


        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

            }
        }

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

            if (vote == Vote.APPROVE) {
                // Set the owner and add to the owner's owned window list
                this.owner = ownerArgument;
View Full Code Here

            // close - not doing so would prevent close transitions from running
            // in parallel, forcing them to run in series)
            if (cancel) {
                closing = false;
            } else {
                Vote vote = windowStateListeners.previewWindowClose(this);

                if (vote == Vote.APPROVE) {
                    // Remove the window from the display
                    Display display = getDisplay();
                    display.remove(this);
View Full Code Here

    }

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

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

            }
        }

        @Override
        public Vote previewWindowClose(Window window) {
            Vote vote = Vote.APPROVE;

            for (WindowStateListener listener : this) {
                vote = vote.tally(listener.previewWindowClose(window));
            }

            return vote;
        }
View Full Code Here

            }
        }

        @Override
        public Vote previewWindowOpen(Window window) {
            Vote vote = Vote.APPROVE;

            for (WindowStateListener listener : this) {
                vote = vote.tally(listener.previewWindowOpen(window));
            }

            return vote;
        }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public Vote previewExpandedChange(final Expander expander) {
        Vote vote;

        if (expander.isShowing()
            && expandTransition == null
            && expander.getContent() != null) {
            final boolean expanded = expander.isExpanded();
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.