Package org.apache.pivot.util

Examples of org.apache.pivot.util.Vote


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

            Vote vote = sheetStateListeners.previewSheetClose(this, resultArgument);

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

                super.close();
View Full Code Here


public class Sheet extends Window {
    private static class SheetStateListenerList extends WTKListenerList<SheetStateListener>
        implements SheetStateListener {
        @Override
        public Vote previewSheetClose(Sheet sheet, boolean result) {
            Vote vote = Vote.APPROVE;

            for (SheetStateListener listener : this) {
                vote = vote.tally(listener.previewSheetClose(sheet, result));
            }

            return vote;
        }
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

        return expanded;
    }

    public void setExpanded(boolean expanded) {
        if (expanded != this.expanded) {
            Vote vote = rollupStateListeners.previewExpandedChange(this);

            if (vote == Vote.APPROVE) {
                this.expanded = expanded;
                rollupStateListeners.expandedChanged(this);
            } else {
View Full Code Here

    private static class RollupStateListenerList extends WTKListenerList<RollupStateListener>
        implements RollupStateListener {
        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            Vote vote = Vote.APPROVE;

            for (RollupStateListener listener : this) {
                vote = vote.tally(listener.previewExpandedChange(rollup));
            }

            return vote;
        }
View Full Code Here

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

        int previousSelectedIndex = this.selectedIndex;

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

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

public class CardPane extends Container {
    private static class CardPaneListenerList extends WTKListenerList<CardPaneListener>
        implements CardPaneListener {
        @Override
        public Vote previewSelectedIndexChange(CardPane cardPane, int selectedIndex) {
            Vote vote = Vote.APPROVE;

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

            return vote;
        }
View Full Code Here

        invalidateComponent();
    }

    @Override
    public Vote previewSelectedIndexChange(CardPane cardPane, int selectedIndex) {
        Vote vote;

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

        window.requestFocus();
    }

    @Override
    public Vote previewSheetClose(final Sheet sheet, final boolean result) {
        Vote vote;

        if (result
            && !okButton.isEnabled()) {
            vote = Vote.DENY;
        } else {
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.