Package org.apache.pivot.util

Examples of org.apache.pivot.util.Vote


        display.getComponentKeyListeners().add(displayKeyListener);
    }

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

        if (fade) {
            if (closeTransition == null) {
                closeTransition = new FadeWindowTransition(window,
                    CLOSE_TRANSITION_DURATION, CLOSE_TRANSITION_RATE,
View Full Code Here


            isReadOnly = beanDictionary.isReadOnly(columnName);
            rowData = beanDictionary;
        }

        if (!isReadOnly) {
            Vote vote = rowEditorListeners.previewEditRow(this, tableView, rowIndex, columnIndex);

            if (vote == Vote.APPROVE) {
                this.tableView = tableView;
                this.rowIndex = rowIndex;
                this.columnIndex = columnIndex;
View Full Code Here

        String columnName = tableView.getColumns().get(columnIndex).getName();

        // Preview the changes
        HashMap<String, Object> changes = new HashMap<String, Object>();
        changes.put(columnName, text);
        Vote vote = rowEditorListeners.previewSaveChanges(this, tableView, rowIndex,
            columnIndex, changes);

        if (vote == Vote.APPROVE) {
            List<Object> tableData = (List<Object>)tableView.getTableData();
View Full Code Here

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

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

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

                super.close();
View Full Code Here

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

            extends ListenerList<ItemEditorListener>
            implements ItemEditorListener {
            @Override
            public Vote previewEditItem(ItemEditor itemEditor, ListView listView,
                int index) {
                Vote vote = Vote.APPROVE;

                for (ItemEditorListener listener : this) {
                    vote = vote.tally(listener.previewEditItem(itemEditor,
                        listView, index));
                }

                return vote;
            }
View Full Code Here

            }

            @Override
            public Vote previewSaveChanges(ItemEditor itemEditor, ListView listView,
                int index, Object changes) {
                Vote vote = Vote.APPROVE;

                for (ItemEditorListener listener : this) {
                    vote = vote.tally(listener.previewSaveChanges(itemEditor,
                        listView, index, changes));
                }

                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

            || columnIndex < 0
            || columnIndex >= tableView.getColumns().getLength()) {
            throw new IndexOutOfBoundsException();
        }

        Vote vote = rowEditorListeners.previewEditRow(this, tableView, rowIndex, columnIndex);

        if (vote == Vote.APPROVE) {
            editorPopup = new EditorPopup(tableView, rowIndex, columnIndex);

            Container tableViewParent = tableView.getParent();
View Full Code Here

        @SuppressWarnings("unchecked")
        public void saveChanges() {
            // Preview the changes
            HashMap<String, Object> changes = new HashMap<String, Object>();
            tablePane.store(changes);
            Vote vote = rowEditorListeners.previewSaveChanges(TableViewRowEditor.this, tableView,
                rowIndex, columnIndex, changes);

            if (vote == Vote.APPROVE) {
                saving = true;
                List<Object> tableData = (List<Object>)tableView.getTableData();
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.