|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Chat
The Chat interface is meant to be implemented by the GUI component class representing a chat. Through the isChatFocused method the other bundles could check the visibility of the chat component. The ChatFocusListener is used to inform other bundles when a chat has changed its focus state.
| Field Summary | |
|---|---|
static String |
ACTION_MESSAGE
The message type representing action messages. |
static int |
CHAT_BUFFER_SIZE
The size of the buffer that indicates how many messages will be stored in the conversation area in the chat window. |
static String |
ERROR_MESSAGE
The message type representing error messages. |
static String |
HISTORY_INCOMING_MESSAGE
The history incoming message type. |
static String |
HISTORY_OUTGOING_MESSAGE
The history outgoing message type. |
static String |
INCOMING_MESSAGE
The message type representing incoming messages. |
static String |
OUTGOING_MESSAGE
The message type representing outgoing messages. |
static String |
SMS_MESSAGE
The message type representing sms messages. |
static String |
STATUS_MESSAGE
The message type representing status messages. |
static String |
SYSTEM_MESSAGE
The message type representing system messages. |
| Method Summary | |
|---|---|
void |
addChatEditorCaretListener(CaretListener l)
Adds the given CaretListener to this Chat. |
void |
addChatEditorDocumentListener(DocumentListener l)
Adds the given DocumentListener to this Chat. |
void |
addChatEditorKeyListener(KeyListener l)
Adds the given KeyListener to this Chat. |
void |
addChatEditorMenuListener(ChatMenuListener l)
Adds the given ChatMenuListener to this Chat. |
void |
addChatFocusListener(ChatFocusListener l)
Adds the given ChatFocusListener to this Chat. |
void |
addChatLinkClickedListener(ChatLinkClickedListener listener)
Adds a new ChatLinkClickedListener. |
void |
addMessage(String contactName,
long date,
String messageType,
String message,
String contentType)
Adds a message to this Chat. |
int |
getCaretPosition()
Gets the caret position in the chat editor. |
Highlighter |
getHighlighter()
Provides the Highlighter used in rendering the chat editor. |
String |
getMessage()
Returns the message written by user in the chat write area. |
boolean |
isChatFocused()
Checks if this Chat is currently focused. |
void |
promptRepaint()
Causes the chat to validate its appearance (suggests a repaint operation may be necessary). |
void |
removeChatEditorCaretListener(CaretListener l)
Removes the given CaretListener from this Chat. |
void |
removeChatEditorDocumentListener(DocumentListener l)
Removes the given DocumentListener from this Chat. |
void |
removeChatEditorKeyListener(KeyListener l)
Removes the given KeyListener from this Chat. |
void |
removeChatEditorMenuListener(ChatMenuListener l)
Removes the given ChatMenuListener to this Chat. |
void |
removeChatFocusListener(ChatFocusListener l)
Removes the given ChatFocusListener from this Chat. |
void |
removeChatLinkClickedListener(ChatLinkClickedListener listener)
Removes an existing ChatLinkClickedListener |
void |
setChatVisible(boolean isVisible)
Bring this chat to front if b is true, hide it otherwise. |
void |
setMessage(String message)
Sets the given message as a message in the chat write area. |
| Field Detail |
|---|
static final String OUTGOING_MESSAGE
static final String INCOMING_MESSAGE
static final String STATUS_MESSAGE
static final String ACTION_MESSAGE
static final String SYSTEM_MESSAGE
static final String SMS_MESSAGE
static final String ERROR_MESSAGE
static final String HISTORY_INCOMING_MESSAGE
static final String HISTORY_OUTGOING_MESSAGE
static final int CHAT_BUFFER_SIZE
| Method Detail |
|---|
boolean isChatFocused()
String getMessage()
void setChatVisible(boolean isVisible)
isVisible - tells if the chat will be made visible or not.void setMessage(String message)
message - the text that would be set to the chat write areavoid addChatFocusListener(ChatFocusListener l)
l - the ChatFocusListener to addvoid removeChatFocusListener(ChatFocusListener l)
l - the ChatFocusListener to removevoid addChatEditorKeyListener(KeyListener l)
KeyListener to this Chat.
The KeyListener is used to inform other bundles when a user has
typed in the chat editor area.
l - the KeyListener to addvoid removeChatEditorKeyListener(KeyListener l)
KeyListener from this Chat.
The KeyListener is used to inform other bundles when a user has
typed in the chat editor area.
l - the ChatFocusListener to removevoid addChatEditorMenuListener(ChatMenuListener l)
ChatMenuListener to this Chat.
The ChatMenuListener is used to determine menu elements
that should be added on right clicks.
l - the ChatMenuListener to addvoid addChatEditorCaretListener(CaretListener l)
CaretListener to this Chat.
The CaretListener is used to inform other bundles when a user has
moved the caret in the chat editor area.
l - the CaretListener to addvoid addChatEditorDocumentListener(DocumentListener l)
DocumentListener to this Chat.
The DocumentListener is used to inform other bundles when a user has
modified the document in the chat editor area.
l - the DocumentListener to addvoid removeChatEditorMenuListener(ChatMenuListener l)
ChatMenuListener to this Chat.
The ChatMenuListener is used to determine menu elements
that should be added on right clicks.
l - the ChatMenuListener to addvoid removeChatEditorCaretListener(CaretListener l)
CaretListener from this Chat.
The CaretListener is used to inform other bundles when a user has
moved the caret in the chat editor area.
l - the CaretListener to removevoid removeChatEditorDocumentListener(DocumentListener l)
DocumentListener from this Chat.
The DocumentListener is used to inform other bundles when a user has
modified the document in the chat editor area.
l - the DocumentListener to remove
void addMessage(String contactName,
long date,
String messageType,
String message,
String contentType)
contactName - the name of the contact sending the messagedate - the time at which the message is sent or receivedmessageType - the type of the messagemessage - the message textcontentType - the content typevoid addChatLinkClickedListener(ChatLinkClickedListener listener)
listener - callback that is notified when a link was clicked.void removeChatLinkClickedListener(ChatLinkClickedListener listener)
listener - the already registered listener to remove.Highlighter getHighlighter()
Highlighter used in rendering the chat editor.
int getCaretPosition()
void promptRepaint()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||