Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.otr
Class OtrMetaContactButton

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AbstractPluginComponent
      extended by net.java.sip.communicator.plugin.otr.OtrMetaContactButton
All Implemented Interfaces:
PluginComponent

public class OtrMetaContactButton
extends AbstractPluginComponent

A AbstractPluginComponent that registers the Off-the-Record button in the main chat toolbar.

Author:
George Politis

Constructor Summary
OtrMetaContactButton(Container container)
           
 
Method Summary
(package private)  void dispose()
           
 Object getComponent()
          Returns the component that should be added.
 String getName()
          Returns the name of this plugin component.
 void setCurrentContact(Contact contact)
          Sets the current contact.
 void setCurrentContact(MetaContact metaContact)
          Sets the current meta contact.
 
Methods inherited from class net.java.sip.communicator.service.gui.AbstractPluginComponent
getConstraints, getContainer, getPositionIndex, isNativeComponent, setCurrentContactGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OtrMetaContactButton

public OtrMetaContactButton(Container container)
Method Detail

dispose

void dispose()

getComponent

public Object getComponent()
Description copied from interface: PluginComponent
Returns the component that should be added. This method should return a valid AWT, SWT or Swing object in order to appear properly in the user interface.

Returns:
the component that should be added.

getName

public String getName()
Description copied from interface: PluginComponent
Returns the name of this plugin component. This name could be used as a label when the component is added to a container, which requires a title. A container that could request a name is for example a tabbed pane.

Returns:
the name of this plugin component

setCurrentContact

public void setCurrentContact(Contact contact)
Description copied from interface: PluginComponent
Sets the current contact. Meant to be used by plugin components that are interested of the current contact. The current contact is the contact for the currently selected chat transport.

Specified by:
setCurrentContact in interface PluginComponent
Overrides:
setCurrentContact in class AbstractPluginComponent
Parameters:
contact - the current contact

setCurrentContact

public void setCurrentContact(MetaContact metaContact)
Description copied from interface: PluginComponent
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.

Specified by:
setCurrentContact in interface PluginComponent
Overrides:
setCurrentContact in class AbstractPluginComponent
Parameters:
metaContact - the current meta contact

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.