From fc271d129b4ff2d141bb49112364b7019997e041 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Tue, 12 Dec 2006 16:52:55 +0000 Subject: [PATCH] all plugin components that are interested of the contact in use should implement this interface --- .../service/gui/ContactAwareComponent.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/net/java/sip/communicator/service/gui/ContactAwareComponent.java diff --git a/src/net/java/sip/communicator/service/gui/ContactAwareComponent.java b/src/net/java/sip/communicator/service/gui/ContactAwareComponent.java new file mode 100644 index 000000000..7cd9cf6d5 --- /dev/null +++ b/src/net/java/sip/communicator/service/gui/ContactAwareComponent.java @@ -0,0 +1,40 @@ +/* + * 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.service.gui; + +import net.java.sip.communicator.service.contactlist.*; + +/** + * The ContactAwareComponent is an interface meant to be implemented by + * all plugin components that are interested of the current contact that they're + * dealing with. + * + * @author Yana Stamcheva + */ +public interface ContactAwareComponent +{ + /** + * Sets the current meta contact. Meant to be used by plugin components that + * are interested of the current contact. The current contact could be the + * contact currently selected in the contact list or the contact for the + * currently selected chat, etc. It depends on the container, where this + * component is meant to be added. + * + * @param metaContact the current meta contact + */ + public void setCurrentContact(MetaContact metaContact); + + /** + * Sets the current meta group. Meant to be used by plugin components that + * are interested of the current meta group. The current group is always + * the currently selected group in the contact list. If the group passed + * here is null, this means that no group is selected. + * + * @param metaGroup the current meta contact group + */ + public void setCurrentContactGroup(MetaContactGroup metaGroup); +}