Package javax.swing.event

Examples of javax.swing.event.UndoableEditEvent


        event.end();

        fireRemoveUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here


    protected void _postEdit(final UndoableEdit ue) {
        if (listeners.isEmpty()) {
            return;
        }
        Vector duplicateVector = (Vector)listeners.clone();
        UndoableEditEvent event = new UndoableEditEvent(realSource, ue);
        for (int i = 0; i < duplicateVector.size(); i++) {
            ((UndoableEditListener)duplicateVector.elementAt(i))
                    .undoableEditHappened(event);
        }
    }
View Full Code Here

                currentOffset = element.getEndOffset();
            }

            event.end();
            fireChangedUpdate(event);
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

                currentOffset = element.getEndOffset();
            }

            event.end();
            fireChangedUpdate(event);
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

            buffer.create(specs, event);

            event.end();
            fireInsertUpdate(event);
            if (contentInsert != null) {
                fireUndoableEditUpdate(new UndoableEditEvent(this, event));
            }
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

            buffer.insert(offset, text.length(), specs, event);

            event.end();
            fireInsertUpdate(event);
            if (contentInsert != null) {
                fireUndoableEditUpdate(new UndoableEditEvent(this, event));
            }
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

        event.end();

        fireInsertUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here

        event.end();

        fireRemoveUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here

    protected void _postEdit(final UndoableEdit ue) {
        if (listeners.isEmpty()) {
            return;
        }
        Vector duplicateVector = (Vector)listeners.clone();
        UndoableEditEvent event = new UndoableEditEvent(realSource, ue);
        for (int i = 0; i < duplicateVector.size(); i++) {
            ((UndoableEditListener)duplicateVector.elementAt(i))
                    .undoableEditHappened(event);
        }
    }
View Full Code Here

        assertEquals(edit3.getUndoPresentationName(), um.getUndoPresentationName());
    }

    public void testUndoableEditHappened() {
        UndoableEdit edit = new TestUndoableEdit();
        UndoableEditEvent event = new UndoableEditEvent(this, edit);
        um.undoableEditHappened(event);
        assertEquals(1, um.edits.size());
        assertEquals(edit, um.edits.get(0));
    }
View Full Code Here

TOP

Related Classes of javax.swing.event.UndoableEditEvent

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.