Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface ProtocolIcon

All Known Implementing Classes:
ProtocolIconAimImpl, ProtocolIconDictImpl, ProtocolIconGibberishImpl, ProtocolIconIcqImpl, ProtocolIconIrcImpl, ProtocolIconJabberImpl, ProtocolIconMsnImpl, ProtocolIconRssImpl, ProtocolIconSipImpl, ProtocolIconSSHImpl, ProtocolIconYahooImpl, ProtocolIconZeroconfImpl

public interface ProtocolIcon

The ProtocolIcon interface is meant to be implemented by protocol implementations in order to export their icon. The Protocolicon could support different sizes: 16x16, 32x32, etc. The ICON_SIZE_XXX constats are meant to be used to specify the size of the icon, in order to enable other bundles to obtain the exact image they need.

Author:
Yana Stamcheva

Field Summary
static String ICON_SIZE_16x16
          Defines a 16x16 icon size.
static String ICON_SIZE_32x32
          Defines a 32x32 icon size.
static String ICON_SIZE_48x48
          Defines a 48x48 icon size.
static String ICON_SIZE_64x64
          logo Defines a 64x64 icon size.
 
Method Summary
 byte[] getConnectingIcon()
          Returns the icon that should be used when the protocol provider is in a connecting state.
 byte[] getIcon(String iconSize)
          Returns the protocol icon image in the desired size.
 String getIconPath(String iconSize)
          Returns a path to the icon with the given size.
 Iterator<String> getSupportedSizes()
          Returns an iterator over a set, containing different predefined icon sizes.
 boolean isSizeSupported(String iconSize)
          Checks if the given icon size is supported by the current protocol implementation.
 

Field Detail

ICON_SIZE_16x16

static final String ICON_SIZE_16x16
Defines a 16x16 icon size.

See Also:
Constant Field Values

ICON_SIZE_32x32

static final String ICON_SIZE_32x32
Defines a 32x32 icon size.

See Also:
Constant Field Values

ICON_SIZE_48x48

static final String ICON_SIZE_48x48
Defines a 48x48 icon size.

See Also:
Constant Field Values

ICON_SIZE_64x64

static final String ICON_SIZE_64x64
logo Defines a 64x64 icon size.

See Also:
Constant Field Values
Method Detail

getSupportedSizes

Iterator<String> getSupportedSizes()
Returns an iterator over a set, containing different predefined icon sizes. Each icon size in the set is one of the ICON_SIZE_XXX constants. The method is meant to be implemented by a protocol implementation in order to allow other bundles to obtain information about the number of sizes in which this icon is exported.

Returns:
Iterator an iterator over a set containing different predefined icon sizes. Each icon size in the set is one of the ICON_SIZE_XXX constants.

isSizeSupported

boolean isSizeSupported(String iconSize)
Checks if the given icon size is supported by the current protocol implementation. If the given iconSize is contained in the list of supported sizes - returns TRUE, otherwise - FALSE.

Parameters:
iconSize - the size of the protocol icon; one of the ICON_SIZE_XXX constants
Returns:
TRUE - if the given icon size is supported by the current implementation, FALSE - otherwise.

getIcon

byte[] getIcon(String iconSize)
Returns the protocol icon image in the desired size.

Parameters:
iconSize - the size of the protocol icon; one of the ICON_SIZE_XXX constants
Returns:
the protocol icon image in the desired size

getIconPath

String getIconPath(String iconSize)
Returns a path to the icon with the given size.

Parameters:
iconSize - the size of the icon we're looking for
Returns:
the path to the icon with the given size

getConnectingIcon

byte[] getConnectingIcon()
Returns the icon that should be used when the protocol provider is in a connecting state.

Returns:
the icon that should be used when the protocol provider is in a connecting state

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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