java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
public class AbstractUndoableEdit
An abstract implementation of UndoableEdit,
implementing simple responses to all boolean methods in
that interface.
| Field Summary | |
|---|---|
protected static String |
RedoName
String returned by getRedoPresentationName;
as of Java 2 platform v1.3.1 this field is no longer used. |
protected static String |
UndoName
String returned by getUndoPresentationName;
as of Java 2 platform v1.3.1 this field is no longer used. |
| Constructor Summary | |
|---|---|
AbstractUndoableEdit()
Creates an AbstractUndoableEdit which defaults
alive to true. |
|
| Method Summary | |
|---|---|
boolean |
addEdit(UndoableEdit anEdit)
This default implementation returns false. |
boolean |
canRedo()
Returns true if this edit is alive
and hasBeenDone is false. |
boolean |
canUndo()
Returns true if this edit is alive
and hasBeenDone is true. |
void |
die()
Sets alive to false. |
String |
getPresentationName()
This default implementation returns "". |
String |
getRedoPresentationName()
Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns
that value followed by a space, followed by
getPresentationName. |
String |
getUndoPresentationName()
Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns
that value followed by a space, followed by
getPresentationName. |
boolean |
isSignificant()
This default implementation returns true. |
void |
redo()
Throws CannotRedoException if canRedo
returns false. |
boolean |
replaceEdit(UndoableEdit anEdit)
This default implementation returns false. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
void |
undo()
Throws CannotUndoException if canUndo
returns false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String UndoName
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.
UIDefaults,
Constant Field Valuesprotected static final String RedoName
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.
UIDefaults,
Constant Field Values| Constructor Detail |
|---|
public AbstractUndoableEdit()
AbstractUndoableEdit which defaults
alive to true.
| Method Detail |
|---|
public void die()
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.
die in interface UndoableEditCompoundEdit.die()
public void undo()
throws CannotUndoException
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.
undo in interface UndoableEditCannotUndoException - if canUndo
returns falsecanUndo()public boolean canUndo()
alive
and hasBeenDone is true.
canUndo in interface UndoableEdit
public void redo()
throws CannotRedoException
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.
redo in interface UndoableEditCannotRedoException - if canRedo
returns falsecanRedo()public boolean canRedo()
true if this edit is alive
and hasBeenDone is false.
canRedo in interface UndoableEditpublic boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditanEdit - the edit to be added
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit in interface UndoableEditanEdit - the edit to replace
UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)public boolean isSignificant()
isSignificant in interface UndoableEditUndoableEdit.isSignificant()public String getPresentationName()
getUndoPresentationName and
getRedoPresentationName to
construct the strings they return. Subclasses should override to
return an appropriate description of the operation this edit
represents.
getPresentationName in interface UndoableEditgetUndoPresentationName(),
getRedoPresentationName()public String getUndoPresentationName()
AbstractUndoableEdit.undoText and returns
that value followed by a space, followed by
getPresentationName.
If getPresentationName returns "",
then the defaults value is returned alone.
getUndoPresentationName in interface UndoableEditAbstractUndoableEdit.undoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone.getPresentationName()public String getRedoPresentationName()
AbstractUndoableEdit.redoText and returns
that value followed by a space, followed by
getPresentationName.
If getPresentationName returns "",
then the defaults value is returned alone.
getRedoPresentationName in interface UndoableEditAbstractUndoableEdit.redoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone.getPresentationName()public String toString()
Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)