org.faceless.pdf2.viewer2.feature
Class Undo
java.lang.Object
org.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.feature.Undo
- All Implemented Interfaces:
- ActionListener, EventListener, UndoableEditListener, DocumentPanelListener
public final class Undo
- extends ViewerFeature
- implements ActionListener, UndoableEditListener, DocumentPanelListener
This features adds an "Undo" and "Redo" entry to the Edit menu, which interfaces
with the DocumentPanel.fireUndoableEditEvent(javax.swing.event.UndoableEditEvent)
method to provide undo/redo
across the Document.
The name of this feature is Undo
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
- Since:
- 2.11.19
Constructor Summary |
Undo()
|
DISCARD
public static final UndoableEdit DISCARD
- An UndableEdit which can be passed into
DocumentPanel.fireUndoableEditEvent(javax.swing.event.UndoableEditEvent)
to clear the list. This should be done when the list needs to be cleared, due to an
action on the Document that permanently changes the state of the PDF.
Undo
public Undo()
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interface ActionListener
initialize
public void initialize(PDFViewer viewer)
- Description copied from class:
ViewerFeature
- Called when the feature is first added to a viewer
- Overrides:
initialize
in class ViewerFeature
documentUpdated
public void documentUpdated(DocumentPanelEvent event)
- Description copied from interface:
DocumentPanelListener
- Called when an
DocumentPanelEvent
is raised
- Specified by:
documentUpdated
in interface DocumentPanelListener
undoableEditHappened
public void undoableEditHappened(UndoableEditEvent event)
- Specified by:
undoableEditHappened
in interface UndoableEditListener
Copyright © 2001-2010 Big Faceless Organization