Java Doc for CompoundUndoManager.java in  » IDE » DrJava » edu » rice » cs » drjava » model » definitions » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » DrJava » edu.rice.cs.drjava.model.definitions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.undo.AbstractUndoableEdit
      javax.swing.undo.CompoundEdit
         javax.swing.undo.UndoManager
            edu.rice.cs.drjava.model.definitions.CompoundUndoManager

CompoundUndoManager
public class CompoundUndoManager extends UndoManager (Code)
Extended UndoManager with increased functionality. Can handle aggregating multiple edits into one for the purposes of undoing and redoing. It exposes editToBeUndone and editToBeRedone (under new names); they are protected methods in UndoManager. The public methods that involve composite state are synchronized, so this manager can be accessed outside of the event thread. The internal data structures _compoundEdits and _keys are not thread safe but they only accessed only by synchronized methods. The synchronization scheme (locking on this) follows UndoManager.
version:
   $Id: CompoundUndoManager.java 4255 2007-08-28 19:17:37Z mgricken $



Constructor Summary
public  CompoundUndoManager(GlobalEventNotifier notifier)
     Standard constructor.

Method Summary
public synchronized  boolean_compoundEditInProgress()
     Returns whether or not a compound edit is in progress.
public synchronized  booleanaddEdit(UndoableEdit e)
     Adds an edit.
public synchronized  booleancanUndo()
    
public synchronized  voiddocumentSaved()
     Informs this undo manager that the document has been saved.
public synchronized  voidendCompoundEdit(int key)
     Ends a compound edit.
public synchronized  voidendLastCompoundEdit()
     Ends the last compound edit that was created.
public synchronized  CompoundEditgetLastCompoundEdit()
     We are getting the last Compound Edit entered into the list.
public  UndoableEditgetNextRedo()
     Gets the next redo.
public  UndoableEditgetNextUndo()
     Gets the next undo.
public synchronized  StringgetUndoPresentationName()
    
public synchronized  booleanisModified()
     Determines if the document is in the same undo state as it was when it was last saved.
public synchronized  voidredo()
     Overrides redo so that any compound edit in progress is ended before the redo is performed.
public synchronized  intstartCompoundEdit()
     Starts a compound edit.
public  StringtoString()
    
public synchronized  voidundo()
     Undoes the last undoable edit, or compound edit created by the user.
public synchronized  voidundo(int key)
     Overload for undo which allows the initiator of a CompoundEdit to abandon it.


Constructor Detail
CompoundUndoManager
public CompoundUndoManager(GlobalEventNotifier notifier)(Code)
Standard constructor.




Method Detail
_compoundEditInProgress
public synchronized boolean _compoundEditInProgress()(Code)
Returns whether or not a compound edit is in progress. true iff in progress



addEdit
public synchronized boolean addEdit(UndoableEdit e)(Code)
Adds an edit. Checks whether or not the current edit is a compound edit.
Parameters:
  e - the edit to be added true if the add is successful, false otherwise



canUndo
public synchronized boolean canUndo()(Code)
Returns true when a compound edit is in progress, or when there are valid stored undoable edits true iff undoing is possible



documentSaved
public synchronized void documentSaved()(Code)
Informs this undo manager that the document has been saved.



endCompoundEdit
public synchronized void endCompoundEdit(int key)(Code)
Ends a compound edit.
Parameters:
  key - the key that was returned by startCompoundEdit()



endLastCompoundEdit
public synchronized void endLastCompoundEdit()(Code)
Ends the last compound edit that was created. Used when a compound edit is created by the _undoListener in DefinitionsPane and the key is not known in DefinitionsDocument.



getLastCompoundEdit
public synchronized CompoundEdit getLastCompoundEdit()(Code)
We are getting the last Compound Edit entered into the list. This is for making a Compound edit for granular undo.



getNextRedo
public UndoableEdit getNextRedo()(Code)
Gets the next redo. the next redo



getNextUndo
public UndoableEdit getNextUndo()(Code)
Gets the next undo. the next undo



getUndoPresentationName
public synchronized String getUndoPresentationName()(Code)
Returns the presentation name for this undo, or delegates to super if none is available the undo's presentation name



isModified
public synchronized boolean isModified()(Code)
Determines if the document is in the same undo state as it was when it was last saved. true iff all changes have been undone since the last save



redo
public synchronized void redo()(Code)
Overrides redo so that any compound edit in progress is ended before the redo is performed.



startCompoundEdit
public synchronized int startCompoundEdit()(Code)
Starts a compound edit. the key for the compound edit



toString
public String toString()(Code)



undo
public synchronized void undo()(Code)
Undoes the last undoable edit, or compound edit created by the user.



undo
public synchronized void undo(int key)(Code)
Overload for undo which allows the initiator of a CompoundEdit to abandon it. WARNING: this has been used to date and has not been properly tested and very possibly may not work.
Parameters:
  key - the key returned by the last call to startCompoundEdit
throws:
  IllegalArgumentException - if the key is incorrect



Methods inherited from javax.swing.undo.UndoManager
public synchronized boolean addEdit(UndoableEdit anEdit)(Code)(Java Doc)
public synchronized boolean canRedo()(Code)(Java Doc)
public synchronized boolean canUndo()(Code)(Java Doc)
public synchronized boolean canUndoOrRedo()(Code)(Java Doc)
public synchronized void discardAllEdits()(Code)(Java Doc)
protected UndoableEdit editToBeRedone()(Code)(Java Doc)
protected UndoableEdit editToBeUndone()(Code)(Java Doc)
public synchronized void end()(Code)(Java Doc)
public synchronized int getLimit()(Code)(Java Doc)
public synchronized String getRedoPresentationName()(Code)(Java Doc)
public synchronized String getUndoOrRedoPresentationName()(Code)(Java Doc)
public synchronized String getUndoPresentationName()(Code)(Java Doc)
public synchronized void redo() throws CannotRedoException(Code)(Java Doc)
protected void redoTo(UndoableEdit edit) throws CannotRedoException(Code)(Java Doc)
public synchronized void setLimit(int l)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
protected void trimEdits(int from, int to)(Code)(Java Doc)
protected void trimForLimit()(Code)(Java Doc)
public synchronized void undo() throws CannotUndoException(Code)(Java Doc)
public synchronized void undoOrRedo() throws CannotRedoException, CannotUndoException(Code)(Java Doc)
protected void undoTo(UndoableEdit edit) throws CannotUndoException(Code)(Java Doc)
public void undoableEditHappened(UndoableEditEvent e)(Code)(Java Doc)

Fields inherited from javax.swing.undo.CompoundEdit
protected Vector<UndoableEdit> edits(Code)(Java Doc)

Methods inherited from javax.swing.undo.CompoundEdit
public boolean addEdit(UndoableEdit anEdit)(Code)(Java Doc)
public boolean canRedo()(Code)(Java Doc)
public boolean canUndo()(Code)(Java Doc)
public void die()(Code)(Java Doc)
public void end()(Code)(Java Doc)
public String getPresentationName()(Code)(Java Doc)
public String getRedoPresentationName()(Code)(Java Doc)
public String getUndoPresentationName()(Code)(Java Doc)
public boolean isInProgress()(Code)(Java Doc)
public boolean isSignificant()(Code)(Java Doc)
protected UndoableEdit lastEdit()(Code)(Java Doc)
public void redo() throws CannotRedoException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void undo() throws CannotUndoException(Code)(Java Doc)

Fields inherited from javax.swing.undo.AbstractUndoableEdit
final protected static String RedoName(Code)(Java Doc)
final protected static String UndoName(Code)(Java Doc)

Methods inherited from javax.swing.undo.AbstractUndoableEdit
public boolean addEdit(UndoableEdit anEdit)(Code)(Java Doc)
public boolean canRedo()(Code)(Java Doc)
public boolean canUndo()(Code)(Java Doc)
public void die()(Code)(Java Doc)
public String getPresentationName()(Code)(Java Doc)
public String getRedoPresentationName()(Code)(Java Doc)
public String getUndoPresentationName()(Code)(Java Doc)
public boolean isSignificant()(Code)(Java Doc)
public void redo() throws CannotRedoException(Code)(Java Doc)
public boolean replaceEdit(UndoableEdit anEdit)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void undo() throws CannotUndoException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.