java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
public class CompoundEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
| Field Summary | |
|---|---|
protected Vector<UndoableEdit> |
edits
The collection of UndoableEdits
undone/redone en masse by this CompoundEdit. |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
CompoundEdit()
|
|
| Method Summary | |
|---|---|
boolean |
addEdit(UndoableEdit anEdit)
If this edit is inProgress,
accepts anEdit and returns true. |
boolean |
canRedo()
Returns false if isInProgress or if super
returns false. |
boolean |
canUndo()
Returns false if isInProgress or if super
returns false. |
void |
die()
Sends die to each subedit,
in the reverse of the order that they were added. |
void |
end()
Sets inProgress to false. |
String |
getPresentationName()
Returns getPresentationName from the
last UndoableEdit added to
edits. |
String |
getRedoPresentationName()
Returns getRedoPresentationName
from the last UndoableEdit
added to edits. |
String |
getUndoPresentationName()
Returns getUndoPresentationName
from the last UndoableEdit
added to edits. |
boolean |
isInProgress()
Returns true if this edit is in progress--that is, it has not received end. |
boolean |
isSignificant()
Returns true if any of the UndoableEdits
in edits do. |
protected UndoableEdit |
lastEdit()
Returns the last UndoableEdit in
edits, or null
if edits is empty. |
void |
redo()
Sends redo to all contained
UndoableEdits in the order in
which they were added. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
void |
undo()
Sends undo to all contained
UndoableEdits in the reverse of
the order in which they were added. |
| 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 |
| Field Detail |
|---|
protected Vector<UndoableEdit> edits
UndoableEdits
undone/redone en masse by this CompoundEdit.
| Constructor Detail |
|---|
public CompoundEdit()
| Method Detail |
|---|
public void undo()
throws CannotUndoException
undo to all contained
UndoableEdits in the reverse of
the order in which they were added.
undo in interface UndoableEditundo in class AbstractUndoableEditCannotUndoException - if canUndo
returns falseAbstractUndoableEdit.canUndo()
public void redo()
throws CannotRedoException
redo to all contained
UndoableEdits in the order in
which they were added.
redo in interface UndoableEditredo in class AbstractUndoableEditCannotRedoException - if canRedo
returns falseAbstractUndoableEdit.canRedo()protected UndoableEdit lastEdit()
UndoableEdit in
edits, or null
if edits is empty.
public void die()
die to each subedit,
in the reverse of the order that they were added.
die in interface UndoableEditdie in class AbstractUndoableEditdie()public boolean addEdit(UndoableEdit anEdit)
inProgress,
accepts anEdit and returns true.
The last edit added to this CompoundEdit
is given a chance to addEdit(anEdit).
If it refuses (returns false), anEdit is
given a chance to replaceEdit the last edit.
If anEdit returns false here,
it is added to edits.
addEdit in interface UndoableEditaddEdit in class AbstractUndoableEditanEdit - the edit to be added
inProgress;
otherwise returns falseUndoableEdit.addEdit(javax.swing.undo.UndoableEdit)public void end()
public boolean canUndo()
isInProgress or if super
returns false.
canUndo in interface UndoableEditcanUndo in class AbstractUndoableEditalive
and hasBeenDone is trueisInProgress()public boolean canRedo()
isInProgress or if super
returns false.
canRedo in interface UndoableEditcanRedo in class AbstractUndoableEdittrue if this edit is alive
and hasBeenDone is falseisInProgress()public boolean isInProgress()
end()public boolean isSignificant()
UndoableEdits
in edits do.
Returns false if they all return false.
isSignificant in interface UndoableEditisSignificant in class AbstractUndoableEditUndoableEdit.isSignificant()public String getPresentationName()
getPresentationName from the
last UndoableEdit added to
edits. If edits is empty,
calls super.
getPresentationName in interface UndoableEditgetPresentationName in class AbstractUndoableEditAbstractUndoableEdit.getUndoPresentationName(),
AbstractUndoableEdit.getRedoPresentationName()public String getUndoPresentationName()
getUndoPresentationName
from the last UndoableEdit
added to edits.
If edits is empty, calls super.
getUndoPresentationName in interface UndoableEditgetUndoPresentationName in class AbstractUndoableEditAbstractUndoableEdit.undoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone.AbstractUndoableEdit.getPresentationName()public String getRedoPresentationName()
getRedoPresentationName
from the last UndoableEdit
added to edits.
If edits is empty, calls super.
getRedoPresentationName in interface UndoableEditgetRedoPresentationName in class AbstractUndoableEditAbstractUndoableEdit.redoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone.AbstractUndoableEdit.getPresentationName()public String toString()
toString in class AbstractUndoableEditCes 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)