Package pivot.util

Examples of pivot.util.Vote


     * @author gbrown
     */
    private static class WindowStateListenerList extends ListenerList<WindowStateListener>
        implements WindowStateListener {
        public Vote previewWindowOpen(Window window, Display display) {
            Vote vote = Vote.APPROVE;

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

            return vote;
        }
View Full Code Here


                listener.windowOpened(window);
            }
        }

        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

        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

                    passwdTextInput.setText(keystorePassword);
                }

                sheet.getSheetStateListeners().add(new SheetStateListener() {
                    public Vote previewSheetClose(Sheet sheet, boolean result) {
                        Vote vote = Vote.APPROVE;

                        if (result) {
                            TextInput pathTextInput = (TextInput)sheetSerializer.getObjectByName("path");
                            TextInput passwdTextInput = (TextInput)sheetSerializer.getObjectByName("passwd");
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

        return expanded;
    }

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

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

*/
public class Rollup extends pivot.wtk.Container {
    private static class RollupListenerList extends ListenerList<RollupListener>
        implements RollupListener {
        public Vote previewExpandedChange(Rollup rollup) {
            Vote vote = Vote.APPROVE;

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

            return vote;
        }
View Full Code Here

        close(false);
    }

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

            if (vote == Vote.APPROVE) {
                super.close();

                if (isClosed()) {
View Full Code Here

*/
public class Dialog extends Frame {
    private static class DialogStateListenerList extends ListenerList<DialogStateListener>
        implements DialogStateListener {
        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

    public void setSelectedIndex(int selectedIndex) {
        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

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.