Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
javax.swing.event

Class TreeSelectionEvent

  • All Implemented Interfaces:
    Serializable

    public class TreeSelectionEvent
    extends EventObject
    An event that characterizes a change in the current selection. The change is based on any number of paths. TreeSelectionListeners will generally query the source of the event for the new selected status of each potentially changed row.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    TreeSelectionListener, TreeSelectionModel
    • Field Detail

      • paths

        protected TreePath[] paths
        Paths this event represents.
      • areNew

        protected boolean[] areNew
        For each path identifies if that path is in fact new.
      • oldLeadSelectionPath

        protected TreePath oldLeadSelectionPath
        leadSelectionPath before the paths changed, may be null.
      • newLeadSelectionPath

        protected TreePath newLeadSelectionPath
        leadSelectionPath after the paths changed, may be null.
    • Constructor Detail

      • TreeSelectionEvent

        public TreeSelectionEvent(Object source,
                          TreePath[] paths,
                          boolean[] areNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
        Represents a change in the selection of a TreeSelectionModel. paths identifies the paths that have been either added or removed from the selection.
        Parameters:
        source - source of event
        paths - the paths that have changed in the selection
      • TreeSelectionEvent

        public TreeSelectionEvent(Object source,
                          TreePath path,
                          boolean isNew,
                          TreePath oldLeadSelectionPath,
                          TreePath newLeadSelectionPath)
        Represents a change in the selection of a TreeSelectionModel. path identifies the path that have been either added or removed from the selection.
        Parameters:
        source - source of event
        path - the path that has changed in the selection
        isNew - whether or not the path is new to the selection, false means path was removed from the selection.
    • Method Detail

      • getPaths

        public TreePath[] getPaths()
        Returns the paths that have been added or removed from the selection.
      • getPath

        public TreePath getPath()
        Returns the first path element.
      • isAddedPath

        public boolean isAddedPath()
        Returns whether the path identified by getPath was added to the selection. A return value of true indicates the path identified by getPath was added to the selection. A return value of false indicates getPath was selected, but is no longer selected.
        Returns:
        true if getPath was added to the selection, false otherwise
      • isAddedPath

        public boolean isAddedPath(TreePath path)
        Returns whether the specified path was added to the selection. A return value of true indicates the path identified by path was added to the selection. A return value of false indicates path is no longer selected. This method is only valid for the paths returned from getPaths(); invoking with a path not included in getPaths() throws an IllegalArgumentException.
        Parameters:
        path - the path to test
        Returns:
        true if path was added to the selection, false otherwise
        Throws:
        IllegalArgumentException - if path is not contained in getPaths
        See Also:
        getPaths()
      • isAddedPath

        public boolean isAddedPath(int index)
        Returns whether the path at getPaths()[index] was added to the selection. A return value of true indicates the path was added to the selection. A return value of false indicates the path is no longer selected.
        Parameters:
        index - the index of the path to test
        Returns:
        true if the path was added to the selection, false otherwise
        Throws:
        IllegalArgumentException - if index is outside the range of getPaths
        Since:
        1.3
        See Also:
        getPaths()
      • getOldLeadSelectionPath

        public TreePath getOldLeadSelectionPath()
        Returns the path that was previously the lead path.
      • getNewLeadSelectionPath

        public TreePath getNewLeadSelectionPath()
        Returns the current lead path.
      • cloneWithSource

        public Object cloneWithSource(Object newSource)
        Returns a copy of the receiver, but with the source being newSource.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/event/treeselectionevent.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut