Java Doc for AbstractUndoableEdit.java in  » 6.0-JDK-Core » swing » javax » swing » undo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing.undo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.undo.AbstractUndoableEdit

All known Subclasses:   javax.swing.undo.StateEdit,  javax.swing.undo.CompoundEdit,
AbstractUndoableEdit
public class AbstractUndoableEdit implements UndoableEdit,Serializable(Code)
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
version:
   1.37 05/05/07
author:
   Ray Ryan


Field Summary
final protected static  StringRedoName
     String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
final protected static  StringUndoName
     String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
 booleanalive
     True if this edit has not received die; defaults to true.
 booleanhasBeenDone
     Defaults to true; becomes false if this edit is undone, true again if it is redone.

Constructor Summary
public  AbstractUndoableEdit()
     Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.

Method Summary
public  booleanaddEdit(UndoableEdit anEdit)
     This default implementation returns false.
public  booleancanRedo()
     Returns true if this edit is alive and hasBeenDone is false.
public  booleancanUndo()
     Returns true if this edit is alive and hasBeenDone is true.
public  voiddie()
     Sets alive to false.
public  StringgetPresentationName()
     This default implementation returns "".
public  StringgetRedoPresentationName()
     Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName.
public  StringgetUndoPresentationName()
     Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName.
public  booleanisSignificant()
     This default implementation returns true.
public  voidredo()
     Throws CannotRedoException if canRedo returns false.
public  booleanreplaceEdit(UndoableEdit anEdit)
     This default implementation returns false.
public  StringtoString()
     Returns a string that displays and identifies this object's properties.
public  voidundo()
     Throws CannotUndoException if canUndo returns false.

Field Detail
RedoName
final protected static String RedoName(Code)
String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.redoText.
See Also:   javax.swing.UIDefaults



UndoName
final protected static String UndoName(Code)
String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.undoText.
See Also:   javax.swing.UIDefaults



alive
boolean alive(Code)
True if this edit has not received die; defaults to true.



hasBeenDone
boolean hasBeenDone(Code)
Defaults to true; becomes false if this edit is undone, true again if it is redone.




Constructor Detail
AbstractUndoableEdit
public AbstractUndoableEdit()(Code)
Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.




Method Detail
addEdit
public boolean addEdit(UndoableEdit anEdit)(Code)
This default implementation returns false.
Parameters:
  anEdit - the edit to be added false
See Also:   UndoableEdit.addEdit



canRedo
public boolean canRedo()(Code)
Returns true if this edit is alive and hasBeenDone is false. true if this edit is aliveand hasBeenDone is false
See Also:   AbstractUndoableEdit.die
See Also:   AbstractUndoableEdit.undo
See Also:   AbstractUndoableEdit.redo



canUndo
public boolean canUndo()(Code)
Returns true if this edit is alive and hasBeenDone is true. true if this edit is aliveand hasBeenDone is true
See Also:   AbstractUndoableEdit.die
See Also:   AbstractUndoableEdit.undo
See Also:   AbstractUndoableEdit.redo



die
public void die()(Code)
Sets alive to false. Note that this is a one way operation; dead edits cannot be resurrected. Sending undo or redo to a dead edit results in an exception being thrown.

Typically an edit is killed when it is consolidated by another edit's addEdit or replaceEdit method, or when it is dequeued from an UndoManager.




getPresentationName
public String getPresentationName()(Code)
This default implementation returns "". Used by getUndoPresentationName and getRedoPresentationName to construct the strings they return. Subclasses should override to return an appropriate description of the operation this edit represents. the empty string ""
See Also:   AbstractUndoableEdit.getUndoPresentationName
See Also:   AbstractUndoableEdit.getRedoPresentationName



getRedoPresentationName
public String getRedoPresentationName()(Code)
Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone. the value from the defaults table with keyAbstractUndoableEdit.redoText, followedby a space, followed by getPresentationNameunless getPresentationName is "" in whichcase, the defaults value is returned alone.
See Also:   AbstractUndoableEdit.getPresentationName



getUndoPresentationName
public String getUndoPresentationName()(Code)
Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone. the value from the defaults table with keyAbstractUndoableEdit.undoText, followedby a space, followed by getPresentationNameunless getPresentationName is "" in whichcase, the defaults value is returned alone.
See Also:   AbstractUndoableEdit.getPresentationName



isSignificant
public boolean isSignificant()(Code)
This default implementation returns true. true
See Also:   UndoableEdit.isSignificant



redo
public void redo() throws CannotRedoException(Code)
Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.
exception:
  CannotRedoException - if canRedoreturns false
See Also:   AbstractUndoableEdit.canRedo



replaceEdit
public boolean replaceEdit(UndoableEdit anEdit)(Code)
This default implementation returns false.
Parameters:
  anEdit - the edit to replace false
See Also:   UndoableEdit.replaceEdit



toString
public String toString()(Code)
Returns a string that displays and identifies this object's properties. a String representation of this object



undo
public void undo() throws CannotUndoException(Code)
Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.
exception:
  CannotUndoException - if canUndoreturns false
See Also:   AbstractUndoableEdit.canUndo



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.