Example usage for javax.swing.event UndoableEditListener undoableEditHappened

List of usage examples for javax.swing.event UndoableEditListener undoableEditHappened

Introduction

In this page you can find the example usage for javax.swing.event UndoableEditListener undoableEditHappened.

Prototype

void undoableEditHappened(UndoableEditEvent e);

Source Link

Document

An undoable edit happened

Usage

From source file:org.jcurl.core.ui.ChangeManager.java

/**
 * // w  ww  .  j a v  a  2 s. co m
 * @param <E>
 * @param anEdit
 * @return {@link UndoManager#addEdit(UndoableEdit)}
 */
private boolean addEdit(final UndoableEdit anEdit) {
    final boolean ret = undoer.addEdit(anEdit);
    for (final UndoableEditListener elem : listeners)
        elem.undoableEditHappened(new UndoableEditEvent(undoer, anEdit));
    return ret;
}

From source file:org.jcurl.core.ui.ChangeManager.java

/** Delegate to {@link UndoManager#discardAllEdits()}. */
public void discardAllEdits() {
    undoer.discardAllEdits();//from   w  w  w  . j  a  v a  2 s.  co  m
    for (final UndoableEditListener elem : listeners)
        elem.undoableEditHappened(new UndoableEditEvent(undoer, null));
}

From source file:org.jcurl.core.ui.ChangeManager.java

public void redo() {
    undoer.redo();// w w  w .j  a va  2 s. c  om
    for (final UndoableEditListener elem : listeners)
        elem.undoableEditHappened(new UndoableEditEvent(undoer, null));
}

From source file:org.jcurl.core.ui.ChangeManager.java

public void undo() {
    undoer.undo();//from  www.  j  a va 2  s  .  c  o m
    for (final UndoableEditListener elem : listeners)
        elem.undoableEditHappened(new UndoableEditEvent(undoer, null));
}