javax.swing.event

Interface DocumentEvent

  • All Known Implementing Classes:
    AbstractDocument.DefaultDocumentEvent

    public interface DocumentEvent
    Interface for document change notifications. This provides detailed information to Document observers about how the Document changed. It provides high level information such as type of change and where it occurred, as well as the more detailed structural changes (What Elements were inserted and removed).
    See Also:
    Document, DocumentListener
    • Method Detail

      • getOffset

        int getOffset()
        Returns the offset within the document of the start of the change.
        Returns:
        the offset >= 0
      • getLength

        int getLength()
        Returns the length of the change.
        Returns:
        the length >= 0
      • getDocument

        Document getDocument()
        Gets the document that sourced the change event.
        Returns:
        the document
      • getChange

        DocumentEvent.ElementChange getChange(Element elem)
        Gets the change information for the given element. The change information describes what elements were added and removed and the location. If there were no changes, null is returned.

        This method is for observers to discover the structural changes that were made. This means that only elements that existed prior to the mutation (and still exist after the mutatino) need to have ElementChange records. The changes made available need not be recursive.

        For example, if the an element is removed from it's parent, this method should report that the parent changed and provide an ElementChange implementation that describes the change to the parent. If the child element removed had children, these elements do not need to be reported as removed.

        If an child element is insert into a parent element, the parent element should report a change. If the child element also had elements inserted into it (grandchildren to the parent) these elements need not report change.

        Parameters:
        elem - the element
        Returns:
        the change information, or null if the element was not modified

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/event/documentevent.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, DocumentEvent

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut