public class GroupNode extends javax.swing.tree.DefaultMutableTreeNode implements ContactListNode
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GroupNode.NodeComparator
Note: this comparator imposes orderings that are inconsistent with
equals.
|
Constructor and Description |
---|
GroupNode(ContactListTreeModel treeModel,
UIGroupImpl uiGroup)
Creates a GroupNode by specifying the parent treeModel
and the corresponding uiGroup.
|
Modifier and Type | Method and Description |
---|---|
ContactNode |
addContact(UIContactImpl uiContact)
Creates a ContactNode for the given uiContact
and adds it to this group.
|
GroupNode |
addContactGroup(UIGroupImpl uiGroup)
Creates a GroupNode for the given uiGroup and
adds it to this group.
|
void |
clear()
Clears all dependencies for all children in the given groupNode
(i.e.
|
java.util.Collection<ContactNode> |
getContacts()
Returns a collection of all direct children of this GroupNode.
|
UIGroupImpl |
getGroupDescriptor()
Returns the UIGroup corresponding to this GroupNode.
|
int |
getSourceIndex()
Returns the index of this node in its parent group.
|
boolean |
isCollapsed()
Returns true if the group is collapsed or false
otherwise.
|
void |
removeContact(UIContactImpl uiContact)
Removes the node corresponding to the given uiContact from this
group.
|
void |
removeContactGroup(UIGroupImpl uiGroup)
Removes the node corresponding to the given uiGroup from this
group node.
|
void |
sort(ContactListTreeModel treeModel)
Sorts the children of this node.
|
ContactNode |
sortedAddContact(UIContactImpl uiContact)
Creates a ContactNode for the given uiContact,
adds it to this group and performs a sort at the end.
|
GroupNode |
sortedAddContactGroup(UIGroupImpl uiGroup)
Creates a GroupNode for the given uiGroup,
adds it to this group node and performs a sort at the end.
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
public GroupNode(ContactListTreeModel treeModel, UIGroupImpl uiGroup)
treeModel
- the parent tree model containing this groupuiGroup
- the corresponding UIGroupImplpublic ContactNode addContact(UIContactImpl uiContact)
uiContact
- the UIContactImpl to addpublic ContactNode sortedAddContact(UIContactImpl uiContact)
uiContact
- the UIContactImpl to addpublic void removeContact(UIContactImpl uiContact)
uiContact
- the UIContactImpl to removepublic GroupNode addContactGroup(UIGroupImpl uiGroup)
uiGroup
- the UIGroupImpl to addpublic void removeContactGroup(UIGroupImpl uiGroup)
uiGroup
- the UIGroupImpl to removepublic GroupNode sortedAddContactGroup(UIGroupImpl uiGroup)
uiGroup
- the UIGroupImpl to addpublic java.util.Collection<ContactNode> getContacts()
public UIGroupImpl getGroupDescriptor()
public int getSourceIndex()
getSourceIndex
in interface ContactListNode
public void sort(ContactListTreeModel treeModel)
treeModel
- the ContactListTreeModel, which should be
refreshedpublic boolean isCollapsed()
public void clear()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.