站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.0

UndoRedo.Manager (NetBeans UI Utilities API) - NetBeans API Javadoc 5.5.0

org.openide.awt 6.7.22

org.openide.awt
Class UndoRedo.Manager

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by javax.swing.undo.CompoundEdit
          extended by javax.swing.undo.UndoManager
              extended by org.openide.awt.UndoRedo.Manager
All Implemented Interfaces:
Serializable, EventListener, UndoableEditListener, UndoableEdit, UndoRedo
Enclosing interface:
UndoRedo

public static class UndoRedo.Manager
extends UndoManager
implements UndoRedo

An undo manager which fires a change event each time it consumes a new undoable edit.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openide.awt.UndoRedo
UndoRedo.Empty, UndoRedo.Manager
 
Field Summary
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Fields inherited from interface org.openide.awt.UndoRedo
NONE
 
Constructor Summary
UndoRedo.Manager()
           
 
Method Summary
 void addChangeListener(ChangeListener l)
          Add a change listener.
 boolean canUndo()
          Test whether the component currently has edits which may be undone.
 void discardAllEdits()
          Discard all the existing edits from the undomanager.
 String getRedoPresentationName()
          Get a human-presentable name describing the redo operation.
 String getUndoPresentationName()
          Get a human-presentable name describing the undo operation.
 void removeChangeListener(ChangeListener l)
          Remove a change listener.
 void undoableEditHappened(UndoableEditEvent ue)
          Consume an undoable edit.
 
Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getUndoOrRedoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoOrRedo, undoTo
 
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openide.awt.UndoRedo
canRedo, redo, undo
 

Constructor Detail

UndoRedo.Manager

public UndoRedo.Manager()
Method Detail

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent ue)
Consume an undoable edit. Delegates to superclass and notifies listeners.

Specified by:
undoableEditHappened in interface UndoableEditListener
Overrides:
undoableEditHappened in class UndoManager
Parameters:
ue - the edit

discardAllEdits

public void discardAllEdits()
Discard all the existing edits from the undomanager.

Overrides:
discardAllEdits in class UndoManager

canUndo

public boolean canUndo()
Description copied from interface: UndoRedo
Test whether the component currently has edits which may be undone.

Specified by:
canUndo in interface UndoableEdit
Specified by:
canUndo in interface UndoRedo
Overrides:
canUndo in class UndoManager
Returns:
true if undo is allowed

addChangeListener

public void addChangeListener(ChangeListener l)
Description copied from interface: UndoRedo
Add a change listener. The listener will be notified every time the undo/redo ability of this object changes.

Specified by:
addChangeListener in interface UndoRedo
Parameters:
l - the listener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Description copied from interface: UndoRedo
Remove a change listener.

Specified by:
removeChangeListener in interface UndoRedo
Parameters:
l - the listener to remove
See Also:
UndoRedo.addChangeListener(javax.swing.event.ChangeListener)

getUndoPresentationName

public String getUndoPresentationName()
Description copied from interface: UndoRedo
Get a human-presentable name describing the undo operation.

Specified by:
getUndoPresentationName in interface UndoableEdit
Specified by:
getUndoPresentationName in interface UndoRedo
Overrides:
getUndoPresentationName in class UndoManager
Returns:
the name

getRedoPresentationName

public String getRedoPresentationName()
Description copied from interface: UndoRedo
Get a human-presentable name describing the redo operation.

Specified by:
getRedoPresentationName in interface UndoableEdit
Specified by:
getRedoPresentationName in interface UndoRedo
Overrides:
getRedoPresentationName in class UndoManager
Returns:
the name

org.openide.awt 6.7.22

Built on May 28 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.