|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dmc.UserList
Manages user lists over multiple connections. It uses a tree hierarchy with a users connected to groups, connected to connections, connected to a single root node.
Constructor Summary | |
UserList()
Default ctor, creates the tree representation of user lists. |
Method Summary | |
void |
addConnection(java.lang.String connectionName)
Adds a connection named connectionName. |
void |
addGroup(java.lang.String groupName,
java.lang.String connectionName)
Adds a group named groupName to connectionName. |
protected void |
addNode(javax.swing.tree.DefaultMutableTreeNode child,
javax.swing.tree.DefaultMutableTreeNode parent)
Adds a node child to parent node. |
void |
addUser(java.lang.String userName,
java.lang.String groupName,
java.lang.String connectionName)
Adds userName to the specified group. |
void |
delConnection(java.lang.String connectionName)
Removes the named connection, and everything under it. |
void |
delGroup(java.lang.String groupName,
java.lang.String connectionName)
Removes the named group, and all users under it. |
void |
delUser(java.lang.String userName,
java.lang.String groupName,
java.lang.String connectionName)
Removes the named user, assuming user exists under the named group and connection. |
javax.swing.JScrollPane |
getUI()
Returns the GUI representation of the user list. |
protected void |
registerMessageGUI(dmc.TabbedChat tc)
Registers the messaging GUI to allow the buddy list to open windows for conversations. |
protected void |
updateTree(javax.swing.tree.DefaultMutableTreeNode node)
House keeping to be done after tree manipuplations, such as additions and deletions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserList()
Method Detail |
public javax.swing.JScrollPane getUI()
protected void addNode(javax.swing.tree.DefaultMutableTreeNode child, javax.swing.tree.DefaultMutableTreeNode parent)
child
- Node to be added.parent
- Node to add child to.protected void updateTree(javax.swing.tree.DefaultMutableTreeNode node)
node
- Node for whom this function is called (or its parent).public void addConnection(java.lang.String connectionName)
If there is already a connection by this name, there is no change made.
addConnection
in interface IUserList
connectionName
- The name of connection to be added.public void addGroup(java.lang.String groupName, java.lang.String connectionName)
If the specified group already exists, no change is made.
addGroup
in interface IUserList
groupName
- The group to be added.connectionName
- An existing connection to which group
is to be added.public void addUser(java.lang.String userName, java.lang.String groupName, java.lang.String connectionName)
If the specified user already exists, no change is made.
addUser
in interface IUserList
userName
- The name of the user to add.groupName
- The name of the group to add userName to.connectionName
- The connection in which to search for
groupName.public void delConnection(java.lang.String connectionName)
delConnection
in interface IUserList
connectionName
- Name of connection to remove.public void delGroup(java.lang.String groupName, java.lang.String connectionName)
delGroup
in interface IUserList
groupName
- Name of group to be removed.connectionName
- Name of connection under which group exists.public void delUser(java.lang.String userName, java.lang.String groupName, java.lang.String connectionName)
delUser
in interface IUserList
userName
- User to be removed from the user list.groupName
- Group name to which User belongs.connectionName
- Connection under which to search
for groupName.protected void registerMessageGUI(dmc.TabbedChat tc)
This may be abstracted away at some point, but for now it is a TabbedChat.
tc
- GUI to use to create windows when a buddy is clicked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |