Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class ContactListTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by net.java.sip.communicator.impl.gui.main.contactlist.ContactListTreeModel
All Implemented Interfaces:
Serializable, TreeModel

public class ContactListTreeModel
extends DefaultTreeModel

The data model of the contact list.

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
ContactListTreeModel(JTree tree)
          Creates an instance of ContactListTreeModel.
 
Method Summary
 void clear()
          Removes all nodes except the root node and clears all dependencies.
 ContactNode findFirstContactNode()
          Returns the first found child ContactNode.
 JTree getParentTree()
          Returns the parent tree.
 GroupNode getRoot()
          Returns the root group node.
 void nodeChanged(TreeNode node)
          Invoke this method after you've changed how node is to be represented in the tree.
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactListTreeModel

public ContactListTreeModel(JTree tree)
Creates an instance of ContactListTreeModel.

Parameters:
tree - the parent tree
Method Detail

getRoot

public GroupNode getRoot()
Returns the root group node.

Specified by:
getRoot in interface TreeModel
Overrides:
getRoot in class DefaultTreeModel
Returns:
the root group node

findFirstContactNode

public ContactNode findFirstContactNode()
Returns the first found child ContactNode.

Returns:
the first found child ContactNode or null if there is no ContactNode.

clear

public void clear()
Removes all nodes except the root node and clears all dependencies.


getParentTree

public JTree getParentTree()
Returns the parent tree.

Returns:
the parent tree

nodeChanged

public void nodeChanged(TreeNode node)
Invoke this method after you've changed how node is to be represented in the tree.

Overrides:
nodeChanged in class DefaultTreeModel
Parameters:
node - the node that has changed

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.