Package org.apache.pivot.util

Examples of org.apache.pivot.util.Vote


            extends ListenerList<RowEditorListener>
            implements RowEditorListener {
            @Override
            public Vote previewEditRow(RowEditor rowEditor, TableView tableView,
                int rowIndex, int columnIndex) {
                Vote vote = Vote.APPROVE;

                for (RowEditorListener listener : this) {
                    vote = vote.tally(listener.previewEditRow(rowEditor,
                        tableView, rowIndex, columnIndex));
                }

                return vote;
            }
View Full Code Here


            }

            @Override
            public Vote previewSaveChanges(RowEditor rowEditor, TableView tableView,
                int rowIndex, int columnIndex, Dictionary<String, Object> changes) {
                Vote vote = Vote.APPROVE;

                for (RowEditorListener listener : this) {
                    vote = vote.tally(listener.previewSaveChanges(rowEditor,
                        tableView, rowIndex, columnIndex, changes));
                }

                return vote;
            }
View Full Code Here

            extends ListenerList<NodeEditorListener>
            implements NodeEditorListener {
            @Override
            public Vote previewEditNode(NodeEditor nodeEditor, TreeView treeView,
                Path path) {
                Vote vote = Vote.APPROVE;

                for (NodeEditorListener listener : this) {
                    vote = vote.tally(listener.previewEditNode(nodeEditor,
                        treeView, path));
                }

                return vote;
            }
View Full Code Here

            }

            @Override
            public Vote previewSaveChanges(NodeEditor nodeEditor, TreeView treeView,
                Path path, Object changes) {
                Vote vote = Vote.APPROVE;

                for (NodeEditorListener listener : this) {
                    vote = vote.tally(listener.previewSaveChanges(nodeEditor,
                        treeView, path, changes));
                }

                return vote;
            }
View Full Code Here

    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

        }

        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

    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

    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

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

        }

        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

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.