T
- the type of the descriptorpublic abstract class ChatContact<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AVATAR_ICON_HEIGHT
The height of the avatar icon.
|
static int |
AVATAR_ICON_WIDTH
The width of the avatar icon.
|
protected T |
descriptor
The descriptor being adapted by this instance.
|
Modifier | Constructor and Description |
---|---|
protected |
ChatContact(T descriptor)
Initializes a new ChatContact instance with a specific
descriptor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines whether a specific Object represents the same value
as this ChatContact.
|
javax.swing.ImageIcon |
getAvatar()
Returns the avatar image corresponding to the source contact.
|
protected abstract byte[] |
getAvatarBytes()
Gets the avatar image corresponding to the source contact in the form of
an array of bytes.
|
T |
getDescriptor()
Returns the descriptor object corresponding to this chat contact.
|
abstract java.lang.String |
getName()
Returns the contact name.
|
abstract java.lang.String |
getUID()
Gets the implementation-specific identifier which uniquely specifies this
contact.
|
int |
hashCode()
Gets a hash code value for this object for the benefit of hashtables.
|
boolean |
isSelected()
Returns
true if this is the currently selected contact in
the list of contacts for the chat, otherwise returns false . |
void |
setSelected(boolean selected)
Sets this isSelected property of this chat contact.
|
public static final int AVATAR_ICON_HEIGHT
public static final int AVATAR_ICON_WIDTH
protected final T descriptor
protected ChatContact(T descriptor)
descriptor
- the descriptor to be adapted by the new instancepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the Object to be checked for value equality with this
ChatContactpublic javax.swing.ImageIcon getAvatar()
protected abstract byte[] getAvatarBytes()
public T getDescriptor()
public abstract java.lang.String getName()
public abstract java.lang.String getUID()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isSelected()
true
if this is the currently selected contact in
the list of contacts for the chat, otherwise returns false
.true
if this is the currently selected contact in
the list of contacts for the chat, otherwise returns false
.public void setSelected(boolean selected)
selected
- true
to indicate that this contact would be
the selected contact in the list of chat window contacts; otherwise,
false
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.