Example usage for javax.swing.event UndoableEditEvent getSource

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

Introduction

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

Prototype

public Object getSource() 

Source Link

Document

The object on which the Event initially occurred.

Usage

From source file:org.fife.ui.rsyntaxtextarea.EOLPreservingRSyntaxDocument.java

@Override
protected void fireUndoableEditUpdate(UndoableEditEvent evt) {
    if (lastEdit != null) {
        CompoundEdit edit = new CompoundEdit();
        edit.addEdit(evt.getEdit());/*from  w  w w .  j a v a 2 s .co  m*/
        edit.addEdit(lastEdit);
        edit.end();
        super.fireUndoableEditUpdate(new UndoableEditEvent(evt.getSource(), edit));
        lastEdit = null;
    } else {
        super.fireUndoableEditUpdate(evt);
    }
}