Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.spellcheck
Class CheckerToggleButton

java.lang.Object
  extended by net.java.sip.communicator.plugin.spellcheck.CheckerToggleButton
All Implemented Interfaces:
PluginComponent

public class CheckerToggleButton
extends Object
implements PluginComponent

Toggle-able button that sets the spell checker to be either enabled or disabled.

Author:
Damian Johnson

Constructor Summary
CheckerToggleButton(SpellChecker checker)
           
 
Method Summary
 Object getComponent()
          Returns the component that should be added.
 String getConstraints()
          Returns the constraints, which will indicate to the container, where this component should be added.
 Container getContainer()
          Returns the identifier of the container, where we would like to add our control.
 String getName()
          Returns the name of this plugin component.
 int getPositionIndex()
          Returns the index position of this component in the container, where it will be added.
 boolean isNativeComponent()
          Returns true to indicate that this component is a native component and false otherwise.
 void setCurrentContact(Contact contact)
          Sets the current contact.
 void setCurrentContact(MetaContact metaContact)
          Sets the current meta contact.
 void setCurrentContactGroup(MetaContactGroup metaGroup)
          Sets the current meta group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckerToggleButton

CheckerToggleButton(SpellChecker checker)
Method Detail

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.

Specified by:
getComponent in interface PluginComponent
Returns:
the component that should be added.

getConstraints

public String getConstraints()
Description copied from interface: PluginComponent
Returns the constraints, which will indicate to the container, where this component should be added. All constraints are defined in the Container class and are as follows: START, END, TOP, BOTTOM, LEFT, RIGHT.

Specified by:
getConstraints in interface PluginComponent
Returns:
the constraints, which will indicate to the container, where this component should be added.

getContainer

public Container getContainer()
Description copied from interface: PluginComponent
Returns the identifier of the container, where we would like to add our control. All possible container identifiers are defined in the Container class. If the Container returned by this method is not supported by the current UI implementation the plugin won't be added.

Specified by:
getContainer in interface PluginComponent
Returns:
the container, where we would like to add our control.

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.

Specified by:
getName in interface PluginComponent
Returns:
the name of this plugin component

getPositionIndex

public int getPositionIndex()
Description copied from interface: PluginComponent
Returns the index position of this component in the container, where it will be added. An index of 0 would mean that this component should be added before all other components. An index of -1 would mean that the position of this component is not important.

Specified by:
getPositionIndex in interface PluginComponent
Returns:
the index position of this component in the container, where it will be added.

isNativeComponent

public boolean isNativeComponent()
Description copied from interface: PluginComponent
Returns true to indicate that this component is a native component and false otherwise. This method is meant to be used by containers if a special treatment is needed for native components.

Specified by:
isNativeComponent in interface PluginComponent
Returns:
true to indicate that this component is a native component and false otherwise.

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
Parameters:
metaContact - the current meta contact

setCurrentContactGroup

public void setCurrentContactGroup(MetaContactGroup metaGroup)
Description copied from interface: PluginComponent
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.

Specified by:
setCurrentContactGroup in interface PluginComponent
Parameters:
metaGroup - the current meta contact group

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
Parameters:
contact - the current contact

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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