public class ChatUser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected javax.swing.Icon |
avatar
The avatar image.
|
protected boolean |
away
The away flag.
|
protected jadex.bridge.IComponentIdentifier |
cid
The chat user.
|
protected static javax.swing.UIDefaults |
icons
The icons.
|
protected long |
lastupdate
The time of the last update for checking when user becomes offline.
|
protected java.util.Set<java.lang.Integer> |
messages
The open message ids.
|
protected java.lang.String |
nick
The cached nickname.
|
protected boolean |
typing
The typing flag.
|
Constructor and Description |
---|
ChatUser(jadex.bridge.IComponentIdentifier cid)
Create a new chat user object.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessage(int id)
Add a message that is currently being sent.
|
jadex.bridge.IComponentIdentifier |
getComponentIdentifier()
Get the cid.
|
javax.swing.Icon |
getIcon()
Get an icon for the user.
|
java.lang.String |
getNick()
Get the nick.
|
boolean |
isAvatarUnknown()
Test if image is unknown.
|
boolean |
isAway()
Get the away state.
|
boolean |
isNickUnknown()
Test if nickname is unknown.
|
boolean |
isTyping()
Get the typing state.
|
void |
removeMessage(int id)
Remove a message when sending is finished.
|
void |
setAvatar(javax.swing.Icon avatar)
Set the image.
|
void |
setAway(boolean away)
Set the away state.
|
void |
setNick(java.lang.String nick)
Set the nick.
|
boolean |
setOnline(java.lang.Boolean online)
Called when the user has been detected offline or online
|
void |
setTyping(boolean typing)
Set the typing state.
|
protected static final javax.swing.UIDefaults icons
protected jadex.bridge.IComponentIdentifier cid
protected boolean typing
protected boolean away
protected java.util.Set<java.lang.Integer> messages
protected java.lang.String nick
protected javax.swing.Icon avatar
protected long lastupdate
public ChatUser(jadex.bridge.IComponentIdentifier cid)
public javax.swing.Icon getIcon()
public void setTyping(boolean typing)
public boolean isTyping()
public void setAway(boolean away)
public boolean isAway()
public java.lang.String getNick()
public void setNick(java.lang.String nick)
nick
- The nick to set.public boolean isNickUnknown()
public boolean isAvatarUnknown()
public void setAvatar(javax.swing.Icon avatar)
image
- The image to set.public jadex.bridge.IComponentIdentifier getComponentIdentifier()
public void addMessage(int id)
public void removeMessage(int id)
public boolean setOnline(java.lang.Boolean online)