API java : TreeSelectionEvent


javax.swing.event
Class TreeSelectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.swing.event.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 Summary
protected  boolean[] areNew
          For each path identifies if that is path is in fact new.
protected  TreePath newLeadSelectionPath
          leadSelectionPath after the paths changed, may be null.
protected  TreePath oldLeadSelectionPath
          leadSelectionPath before the paths changed, may be null.
protected  TreePath[] paths
          Paths this event represents.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
          Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
          Represents a change in the selection of a TreeSelectionModel.
 
Method Summary
 Object cloneWithSource(Object newSource)
          Returns a copy of the receiver, but with the source being newSource.
 TreePath getNewLeadSelectionPath()
          Returns the current lead path.
 TreePath getOldLeadSelectionPath()
          Returns the path that was previously the lead path.
 TreePath getPath()
          Returns the first path element.
 TreePath[] getPaths()
          Returns the paths that have been added or removed from the selection.
 boolean isAddedPath()
          Returns true if the first path element has been added to the selection, a return value of false means the first path has been removed from the selection.
 boolean isAddedPath(int index)
          Returns true if the path identified by index was added to the selection.
 boolean isAddedPath(TreePath path)
          Returns true if the path identified by path was added to the selection.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paths

protected TreePath[] paths
Paths this event represents.


areNew

protected boolean[] areNew
For each path identifies if that is 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 true if the first path element has been added to the selection, a return value of false means the first path has been removed from the selection.


isAddedPath

public boolean isAddedPath(TreePath path)
Returns true if the path identified by path was added to the selection. A return value of false means the path was in the selection but is no longer in the selection. This will raise if path is not one of the paths identified by this event.


isAddedPath

public boolean isAddedPath(int index)
Returns true if the path identified by index was added to the selection. A return value of false means the path was in the selection but is no longer in the selection. This will raise if index < 0 || >= getPaths.length.

Since:
1.3

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.


Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

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 :

Quels sont les motivations de cette démarche?

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.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

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.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-2420
Document créé le 30/08/06 21:22, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-javax/swing/event/TreeSelectionEvent.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,57 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Au cinéma vous écrivez pour séduire, pour que les gens sortent de chez eux, alors que sur le petit écran, vous écrivez pour ne pas les heurter et qu'ils restent devant leur poste.

Gérard Bitton
 
l'infobrol
Nous sommes le Samedi 02 Juin 2012, 04:54, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)