diff options
author | Yana Stamcheva <yana@jitsi.org> | 2010-05-20 15:00:15 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2010-05-20 15:00:15 +0000 |
commit | ab366d7717d88c2b20e18856f7969b77837cfeae (patch) | |
tree | defc5dbc058c285ab07dd5ada47e49a6913741fd /src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java | |
parent | 2fb1f2db0cbae837e4295a164daf5a1cc790d0ed (diff) | |
download | jitsi-ab366d7717d88c2b20e18856f7969b77837cfeae.zip jitsi-ab366d7717d88c2b20e18856f7969b77837cfeae.tar.gz jitsi-ab366d7717d88c2b20e18856f7969b77837cfeae.tar.bz2 |
Fixes contact list behavior and introduces more smooth writing in the search field.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java new file mode 100644 index 0000000..ff84db1 --- /dev/null +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryStatusEvent.java @@ -0,0 +1,74 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.gui.main.contactlist.contactsource; + +import java.util.*; + +/** + * The <tt>MetaContactQueryStatusEvent</tt> is triggered each time a + * <tt>MetaContactQuery</tt> changes its status. Possible statuses are: + * QUERY_COMPLETED, QUERY_CANCELED and QUERY_ERROR. + * + * @author Yana Stamcheva + */ +public class MetaContactQueryStatusEvent + extends EventObject +{ + /** + * Indicates that a query has been completed. + */ + public static final int QUERY_COMPLETED = 0; + + /** + * Indicates that a query has been canceled. + */ + public static final int QUERY_CANCELED = 1; + + /** + * Indicates that a query has been stopped because of an error. + */ + public static final int QUERY_ERROR = 2; + + /** + * Indicates the type of this event. + */ + private final int eventType; + + /** + * Creates a <tt>MetaContactQueryStatusEvent</tt> by specifying the source + * <tt>MetaContactQuery</tt> and the <tt>eventType</tt> indicating why + * initially this event occurred. + * @param source the initiator of the event + * @param eventType the type of the event. One of the QUERY_XXX constants + * defined in this class + */ + public MetaContactQueryStatusEvent( MetaContactQuery source, + int eventType) + { + super(source); + + this.eventType = eventType; + } + + /** + * Returns the <tt>ContactQuery</tt> that triggered this event. + * @return the <tt>ContactQuery</tt> that triggered this event + */ + public MetaContactQuery getQuerySource() + { + return (MetaContactQuery) source; + } + + /** + * Returns the type of this event. + * @return the type of this event + */ + public int getEventType() + { + return eventType; + } +} |