|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTree
net.java.sip.communicator.impl.gui.main.contactlist.DefaultTreeContactList
net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList
public class TreeContactList
The TreeContactList is a contact list based on JTree.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTree |
|---|
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static CallHistoryFilter |
historyFilter
The call history filter. |
static MetaContactListSource |
mclSource
|
static PresenceFilter |
presenceFilter
The presence filter. |
static SearchFilter |
searchFilter
The search filter. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TreeContactList()
Creates the TreeContactList. |
|
| Method Summary | |
|---|---|
void |
addContact(ContactQuery query,
UIContact contact,
UIGroup group,
boolean isSorted)
Adds the given contact to this list. |
void |
addContact(UIContact contact,
UIGroup group,
boolean isContactSorted,
boolean isGroupSorted)
Adds the given contact to this list. |
void |
addContactListListener(ContactListListener listener)
Adds a listener for ContactListEvents. |
void |
addGroup(UIGroup group,
boolean isSorted)
Adds the given group to this list. |
FilterQuery |
applyDefaultFilter()
Applies the default filter. |
FilterQuery |
applyFilter(ContactListFilter filter)
Applies the given filter. |
void |
contactReceived(ContactReceivedEvent event)
Indicates that a contact has been received for a query. |
static JMenuItem |
createAddContactMenu(SourceContact sourceContact)
Create an the add contact menu, taking into account the number of contact details available in the given sourceContact. |
void |
deactivateAll()
Deactivates all active contacts. |
protected void |
fireContactListEvent(List<ContactListListener> contactListListeners,
ContactListEvent event)
Notifies all interested listeners that a ContactListEvent has occurred. |
void |
fireContactListEvent(Object source,
int eventID,
int clickCount)
Creates the corresponding ContactListEvent and notifies all ContactListListeners that a contact is selected. |
static ExternalContactSource |
getContactSource(ContactSourceService contactSource)
Returns the ExternalContactSource corresponding to the given ContactSourceService. |
static ExternalContactSource |
getContactSource(String identifier)
Returns the contact source with the given identifier. |
static Collection<ExternalContactSource> |
getContactSources()
Returns the list of registered contact sources to search in. |
ContactListFilter |
getCurrentFilter()
Returns the currently applied filter. |
MetaContactListSource |
getMetaContactListSource()
|
static NotificationContactSource |
getNotificationContactSource()
Returns the notification contact source. |
Component |
getRightButtonMenu()
Returns the right button menu opened over the contact list. |
ContactListTreeModel |
getTreeModel()
|
boolean |
isContactActive(UIContact contact)
Returns true if the given metaContact has been previously set to active, otherwise returns false. |
boolean |
isEmpty()
Indicates if this contact list is empty. |
void |
metaContactQueryStatusChanged(MetaContactQueryStatusEvent event)
Indicates that the status of a query has changed. |
void |
metaContactReceived(MetaContactQueryEvent event)
Indicates that a MetaContact has been received for a search in the MetaContactListService. |
void |
metaGroupReceived(MetaGroupQueryEvent event)
Indicates that a MetaGroup has been received from a search in the MetaContactListService. |
void |
mouseClicked(MouseEvent e)
Manages a mouse click over the contact list. |
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent event)
Forwards the given mouse event to the list of original MouseListener-s. |
void |
mouseExited(MouseEvent event)
Forwards the given mouse event to the list of original MouseListener-s. |
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
When the right mouse button is clicked on a contact cell, the cell is selected and the ContactRightButtonMenu is opened. |
void |
mouseReleased(MouseEvent event)
Forwards the given mouse event to the list of original MouseListener-s. |
void |
nodeChanged(TreeNode node)
Indicates that a node has been changed. |
void |
queryStatusChanged(ContactQueryStatusEvent event)
Indicates that the status of a query has changed. |
void |
refreshContact(UIContact contact)
Indicates that the information corresponding to the given contact has changed. |
void |
removeContact(UIContact contact)
Removes the node corresponding to the given MetaContact from this list. |
void |
removeContactListListener(ContactListListener listener)
Removes a listener previously added with addContactListListener. |
void |
removeGroup(UIGroup group)
Removes the given group and its children from the list. |
void |
selectFirstContact()
Selects the first found contact node from the beginning of the contact list. |
void |
setActiveContact(MetaContact metaContact,
boolean isActive)
Updates the active state of the contact node corresponding to the given MetaContact. |
void |
setDefaultFilter(ContactListFilter filter)
Sets the default filter to the given filter. |
void |
setGroupClickConsumed(boolean isGroupClickConsumed)
If set to true prevents all operations coming in response to a mouse click. |
static void |
setSourceContactImage(String contactString,
JLabel label,
int imgWidth,
int imgHeight)
Searches for a source contact image for the given peer string in one of the available contact sources. |
static void |
showAddContactDialog(ContactDetail contactDetail)
Creates and shows an AddContactDialog with a predefined contactAddress and protocolProvider. |
void |
startSelectedContactCall()
Starts a call with the currently selected contact in the contact list. |
void |
startSelectedContactChat()
Starts a chat with the currently selected contact if any, otherwise nothing happens. |
void |
startSelectedContactDesktopSharing()
Starts a desktop sharing session with the currently selected contact in the contact list. |
void |
startSelectedContactVideoCall()
Starts a video call with the currently selected contact in the contact list. |
void |
treeCollapsed(TreeExpansionEvent event)
Stores the state of the collapsed group. |
void |
treeExpanded(TreeExpansionEvent event)
Stores the state of the expanded group. |
| Methods inherited from class net.java.sip.communicator.impl.gui.main.contactlist.DefaultTreeContactList |
|---|
createToolTip, getSelectedValue, getToolTipText, isContactActive, loadSkin |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PresenceFilter presenceFilter
public static final MetaContactListSource mclSource
public static final SearchFilter searchFilter
public static final CallHistoryFilter historyFilter
| Constructor Detail |
|---|
public TreeContactList()
| Method Detail |
|---|
public void contactReceived(ContactReceivedEvent event)
contactReceived in interface ContactQueryListenerevent - the ContactReceivedEvent that notified uspublic void metaContactReceived(MetaContactQueryEvent event)
metaContactReceived in interface MetaContactQueryListenerevent - the received MetaContactQueryEventpublic void metaGroupReceived(MetaGroupQueryEvent event)
metaGroupReceived in interface MetaContactQueryListenerevent - the MetaContactGroupQueryEvent that has been
receivedpublic void queryStatusChanged(ContactQueryStatusEvent event)
queryStatusChanged in interface ContactQueryListenerevent - the ContactQueryStatusEvent that notified uspublic void metaContactQueryStatusChanged(MetaContactQueryStatusEvent event)
metaContactQueryStatusChanged in interface MetaContactQueryListenerevent - the ContactQueryStatusEvent that notified uspublic Component getRightButtonMenu()
public void deactivateAll()
public void setActiveContact(MetaContact metaContact,
boolean isActive)
metaContact - the MetaContact to updateisActive - indicates if the node should be set to activepublic boolean isContactActive(UIContact contact)
isContactActive in class DefaultTreeContactListcontact - the UIContact to check
public void addContact(UIContact contact,
UIGroup group,
boolean isContactSorted,
boolean isGroupSorted)
contact - the UIContact to addgroup - the UIGroup to add toisContactSorted - indicates if the contact should be sorted
regarding to the GroupNode policyisGroupSorted - indicates if the group should be sorted regarding to
the GroupNode policy in case it doesn't exist and should be
added
public void addContact(ContactQuery query,
UIContact contact,
UIGroup group,
boolean isSorted)
query - the ContactQuery that adds the given contactcontact - the UIContact to addgroup - the UIGroup to add toisSorted - indicates if the contact should be sorted regarding to
the GroupNode policypublic void removeContact(UIContact contact)
contact - the UIContact to removepublic void refreshContact(UIContact contact)
contact - the contact that has changed
public void addGroup(UIGroup group,
boolean isSorted)
group - the UIGroup to addisSorted - indicates if the contact should be sorted regarding to
the GroupNode policypublic void removeGroup(UIGroup group)
group - the UIGroup to removepublic void addContactListListener(ContactListListener listener)
listener - the listener to addpublic void removeContactListListener(ContactListListener listener)
listener - the listener to removepublic void setGroupClickConsumed(boolean isGroupClickConsumed)
isGroupClickConsumed - indicates if the group click event is
consumed by an external partypublic FilterQuery applyDefaultFilter()
public FilterQuery applyFilter(ContactListFilter filter)
filter - the ContactListFilter to apply.
public void setDefaultFilter(ContactListFilter filter)
filter - the ContactListFilter to set as defaultpublic ContactListFilter getCurrentFilter()
public boolean isEmpty()
public void selectFirstContact()
public void fireContactListEvent(Object source,
int eventID,
int clickCount)
source - the contact that this event is about.eventID - the id indicating the exact type of the event to fire.clickCount - the number of clicks accompanying the event.
protected void fireContactListEvent(List<ContactListListener> contactListListeners,
ContactListEvent event)
contactListListeners - the list of listeners to notifyevent - the ContactListEvent to triggerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEvent that notified us of the clickpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the MouseEvent that notified us of the presspublic void mouseEntered(MouseEvent event)
mouseEntered in interface MouseListenerevent - the MouseEvent that notified uspublic void mouseExited(MouseEvent event)
mouseExited in interface MouseListenerevent - the MouseEvent that notified uspublic void mouseReleased(MouseEvent event)
mouseReleased in interface MouseListenerevent - the MouseEvent that notified uspublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void treeCollapsed(TreeExpansionEvent event)
treeCollapsed in interface TreeExpansionListenerevent - the TreeExpansionEvent that notified us for about
the expansionpublic void treeExpanded(TreeExpansionEvent event)
treeExpanded in interface TreeExpansionListenerevent - the TreeExpansionEvent that notified us for about
the expansionpublic void startSelectedContactChat()
public void startSelectedContactCall()
public void startSelectedContactVideoCall()
public void startSelectedContactDesktopSharing()
public void nodeChanged(TreeNode node)
node - the TreeNode that has been refreshedpublic static Collection<ExternalContactSource> getContactSources()
public static NotificationContactSource getNotificationContactSource()
public static ExternalContactSource getContactSource(ContactSourceService contactSource)
contactSource - the ContactSourceService, which
corresponding external source implementation we're looking for
public static ExternalContactSource getContactSource(String identifier)
identifier - the identifier we're looking for
public static void setSourceContactImage(String contactString,
JLabel label,
int imgWidth,
int imgHeight)
contactString - the address of the contact to search an image forlabel - the label to set the image toimgWidth - the desired image widthimgHeight - the desired image heightpublic static JMenuItem createAddContactMenu(SourceContact sourceContact)
sourceContact - the external source contact, for which we'd like
to create a menu
public static void showAddContactDialog(ContactDetail contactDetail)
contactDetail - the contact detail to be addedpublic ContactListTreeModel getTreeModel()
public MetaContactListSource getMetaContactListSource()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||