Example usage for javax.swing.event UndoableEditEvent getEdit

List of usage examples for javax.swing.event UndoableEditEvent getEdit

Introduction

In this page you can find the example usage for javax.swing.event UndoableEditEvent getEdit.

Prototype

public UndoableEdit getEdit() 

Source Link

Document

Returns the edit value.

Usage

From source file:plugin.notes.gui.NotesView.java

private void editorUndoableEditHappened(UndoableEditEvent e) {
    undo.addEdit(e.getEdit());
    undoAction.updateUndoState();
    redoAction.updateRedoState();
}

From source file:ro.nextreports.designer.ui.sqleditor.syntax.SyntaxDocument.java

public SyntaxDocument(Lexer lexer) {
    super();//from www  .  ja  va2  s. c  o  m
    putProperty(PlainDocument.tabSizeAttribute, 4); // outside ?!
    this.lexer = lexer;

    // Listen for undo and redo events
    addUndoableEditListener(new UndoableEditListener() {

        public void undoableEditHappened(UndoableEditEvent event) {
            if (event.getEdit().isSignificant()) {
                undo.addEdit(event.getEdit());
            }
        }

    });
}