Package pivot.util

Examples of pivot.util.Vote


        return expanded;
    }

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

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


                listener.titleChanged(expander, previousTitle);
            }
        }

        public Vote previewExpandedChange(Expander expander) {
            Vote vote = Vote.APPROVE;

            for (ExpanderListener listener : this) {
                vote = vote.tally(listener.previewExpandedChange(expander));
            }

            return vote;
        }
View Full Code Here

        close(false);
    }

    public void close(boolean result) {
        if (!isClosed()) {
            Vote vote = sheetStateListeners.previewSheetClose(this, result);

            if (vote.isApproved()) {
                super.close();

                if (isClosed()) {
                    this.result = result;
View Full Code Here

*/
public class Sheet extends Window {
    private static class SheetStateListenerList extends ListenerList<SheetStateListener>
        implements SheetStateListener {
        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

        invalidateComponent();
    }

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

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

    // RollupStateListener methods

    @Override
    public Vote previewExpandedChange(final Rollup rollup) {
        Vote vote = Vote.APPROVE;

        if (rollup.getDisplay() != null) {
            if (rollup.isExpanded()) {
                // Start a collapse transition, return false, and set the
                // expanded state when the transition is complete
View Full Code Here

        titleLabel.setDisplayable(title != null);
        titleLabel.setText(title);
    }

    public Vote previewExpandedChange(final Expander expander) {
        Vote vote = Vote.APPROVE;

        if (expander.isShowing()) {
            if (expandTransition == null) {
                if (expander.isExpanded()
                    && expander.getContent() != null) {
View Full Code Here

        invalidateComponent();
    }

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

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

    }

    public Vote previewSheetClose(final Sheet sheet, final boolean result) {
        // Start a close transition, return false, and close the window
        // when the transition is complete
        Vote vote = Vote.APPROVE;

        Window owner = sheet.getOwner();
        if (!owner.isClosing()
            && closeTransition == null) {
            int duration = SLIDE_DURATION;
View Full Code Here

        invalidateComponent();
    }

    // Accordion selection events
    public Vote previewSelectedIndexChange(final Accordion accordion, final int selectedIndex) {
        Vote vote = Vote.APPROVE;

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

TOP

Related Classes of 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.