public class ChatPanel extends TransparentPanel implements ChatSessionRenderer, ChatSessionChangeListener, Chat, ChatConversationContainer, ChatRoomMemberRoleListener, ChatRoomLocalUserRoleListener, ChatRoomMemberPropertyChangeListener, FileTransferStatusListener, Skinnable
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected ChatConferenceCallDialog |
chatConferencesDialog
Dialog used to join or create chat conference call.
|
protected static int |
MESSAGES_PER_PAGE
The number of messages shown per page.
|
static int |
TYPING_NOTIFICATION_SEND_FAILED
Indicates that sending a typing notification event has failed.
|
static int |
TYPING_NOTIFICATION_SUCCESSFULLY_SENT
Indicates that a typing notification event is successfully sent.
|
int |
unreadMessageNumber |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ICON_UPDATED
ACTION_MESSAGE, CHAT_BUFFER_SIZE, ERROR_MESSAGE, HISTORY_INCOMING_MESSAGE, HISTORY_OUTGOING_MESSAGE, INCOMING_MESSAGE, OUTGOING_MESSAGE, SMS_MESSAGE, STATUS_MESSAGE, SYSTEM_MESSAGE
Constructor and Description |
---|
ChatPanel(ChatContainer chatContainer)
Creates a ChatPanel which is added to the given chat window.
|
Modifier and Type | Method and Description |
---|---|
void |
addActiveFileTransfer(java.lang.String id,
java.lang.Object descriptor)
Adds the given file transfer id to the list of active file
transfers.
|
void |
addChatConferenceCall(ConferenceDescription conferenceDescription)
Adds the given conferenceDescription to the list of chat
conferences in this chat panel chat.
|
void |
addChatContact(ChatContact<?> chatContact)
Adds the given chatContact to the list of chat contacts
participating in the corresponding to this chat panel chat.
|
void |
addChatEditorCaretListener(javax.swing.event.CaretListener l)
Adds the given
CaretListener to this Chat. |
void |
addChatEditorDocumentListener(javax.swing.event.DocumentListener l)
Adds the given
DocumentListener to this Chat. |
void |
addChatEditorKeyListener(java.awt.event.KeyListener l)
Adds the given
KeyListener to this Chat. |
void |
addChatEditorMenuListener(ChatMenuListener l)
Adds the given
ChatMenuListener to this Chat. |
void |
addChatFocusListener(ChatFocusListener listener)
Implements Chat.addChatFocusListener method.
|
void |
addChatHistoryListener(ChatHistoryListener l)
Adds the given ChatHistoryListener to the list of listeners
notified when a change occurs in the history shown in this chat panel.
|
void |
addChatLinkClickedListener(ChatLinkClickedListener listener)
Add a new ChatLinkClickedListener
|
void |
addChatTransport(ChatTransport chatTransport)
Adds the given chatTransport to the given send via selector box.
|
void |
addErrorMessage(java.lang.String contactName,
java.lang.String message)
Adds the given error message to the chat window conversation area.
|
void |
addErrorMessage(java.lang.String contactName,
java.lang.String title,
java.lang.String message)
Adds the given error message to the chat window conversation area.
|
void |
addErrorSendingTypingNotification(java.lang.String typingNotification)
Adds a typing notification message to the conversation panel,
saying that typin notifications has not been delivered.
|
void |
addIncomingFileTransferRequest(OperationSetFileTransfer fileTransferOpSet,
IncomingFileTransferRequest request,
java.util.Date date)
Adds the given IncomingFileTransferRequest to the conversation
panel in order to notify the user of the incoming file.
|
void |
addMessage(java.lang.String contactName,
java.util.Date date,
java.lang.String messageType,
java.lang.String message,
java.lang.String contentType)
Passes the message to the contained
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document. |
void |
addMessage(java.lang.String contactName,
java.util.Date date,
java.lang.String messageType,
java.lang.String title,
java.lang.String message,
java.lang.String contentType)
Passes the message to the contained
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document. |
void |
addMessage(java.lang.String contactName,
java.lang.String displayName,
java.util.Date date,
java.lang.String messageType,
java.lang.String message,
java.lang.String contentType,
java.lang.String messageUID,
java.lang.String correctedMessageUID)
Passes the message to the contained
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document. |
void |
addTextInWriteArea(java.lang.String text)
Adds text to the write area editor.
|
void |
addTypingNotification(java.lang.String typingNotification)
Adds a typing notification message to the conversation panel.
|
void |
cancelActiveFileTransfers()
Cancels all active file transfers.
|
void |
chatConferenceDescriptionSent(ConferenceDescription conferenceDescription)
Changes the chat conference dialog layout.
|
void |
chatRoomPropertyChanged(ChatRoomMemberPropertyChangeEvent event)
Notifies the user if any member of the chatroom changes nickname.
|
boolean |
containsActiveFileTransfers()
Returns
true if there are active file transfers, otherwise
returns false . |
void |
copy()
Copies either the selected write area content or the selected
conversation panel content to the clipboard.
|
void |
copyWriteArea()
Copies the selected write panel content to the clipboard.
|
void |
currentChatTransportChanged(ChatSession chatSession)
Called when the current
ChatTransport has
changed. |
void |
currentChatTransportUpdated(int eventID)
When a property of the chatTransport has changed.
|
void |
cut()
Cuts the write area selected content to the clipboard.
|
void |
dispose()
Runs clean-up for associated resources which need explicit disposal (e.g.
|
ChatTransport |
findFileTransferChatTransport()
Returns the first chat transport for the current chat session that
supports file transfer.
|
ChatTransport |
findInviteChatTransport()
Returns the first chat transport for the current chat session that
supports group chat.
|
void |
fireChatFocusEvent(int eventID)
Informs all ChatFocusListeners that a ChatFocusEvent
has been triggered.
|
int |
getCaretPosition()
Gets the caret position in the chat editor.
|
ChatContainer |
getChatContainer()
Returns the chat window, where this chat panel is added.
|
ChatConversationPanel |
getChatConversationPanel()
Returns the conversation panel, contained in this chat panel.
|
ChatSession |
getChatSession()
Returns the chat session associated with this chat panel.
|
ChatWritePanel |
getChatWritePanel()
Returns the write area panel, contained in this chat panel.
|
java.awt.Window |
getConversationContainerWindow()
Returns the chat window, where this chat panel
is located.
|
int |
getDividerLocation()
Returns the contained divider location.
|
int |
getDividerSize()
Returns the contained divider size.
|
java.util.Date |
getFirstHistoryMsgTimestamp()
Returns the date of the first message in history for this chat.
|
javax.swing.text.Highlighter |
getHighlighter()
Provides the
Highlighter used in rendering the chat editor. |
java.util.Date |
getLastHistoryMsgTimestamp()
Returns the date of the last message in history for this chat.
|
java.lang.String |
getLastSentMessageUID()
Returns the ID of the last message sent in this chat, or null
if no messages have been sent yet.
|
java.lang.String |
getMessage()
Returns the message written by user in the chat write area.
|
java.lang.String |
getRoleDescription(ChatRoomMemberRole role)
Returns the corresponding role description to the given role index.
|
java.lang.String |
getTextFromWriteArea(java.lang.String mimeType)
Returns the text contained in the write area editor.
|
void |
inviteContacts(ChatTransport inviteChatTransport,
java.util.Collection<java.lang.String> chatContacts,
java.lang.String reason)
Invites the given chatContacts to this chat.
|
boolean |
isChatFocused()
Implements the Chat.isChatFocused method.
|
boolean |
isMessageCorrectionActive()
Returns whether a message is currently being edited.
|
boolean |
isPrivateMessagingChat()
Returns true if the chat is private messaging chat and
false if not.
|
boolean |
isShown()
Returns TRUE if this chat panel is added to a container (window or
tabbed pane), which is shown on the screen, FALSE - otherwise.
|
boolean |
isWriteAreaEmpty()
Checks if the editor contains text.
|
void |
loadHistory()
Loads history for the chat meta contact in a separate thread.
|
void |
loadHistory(java.lang.String escapedMessageID)
Loads history messages ignoring the message with the specified id.
|
void |
loadNextPageFromHistory()
Implements ChatPanel.loadNextFromHistory.
|
void |
loadPreviousPageFromHistory()
Implements ChatPanel.loadPreviousFromHistory.
|
void |
loadSkin()
Reloads chat messages.
|
void |
localUserRoleChanged(ChatRoomLocalUserRoleChangeEvent evt)
Implements the localUserRoleChanged() method.
|
void |
memberRoleChanged(ChatRoomMemberRoleChangeEvent evt)
Implements the memberRoleChanged() method.
|
void |
paste()
Pastes the content of the clipboard to the write area.
|
void |
promptRepaint()
Causes the chat to validate its appearance (suggests a repaint operation
may be necessary).
|
void |
refreshWriteArea()
Refreshes write area editor pane.
|
void |
removeActiveFileTransfer(java.lang.String id)
Removes the given file transfer id from the list of active
file transfers.
|
void |
removeAllChatContacts()
Removes all chat contacts from the contact list of the chat.
|
void |
removeChatConferenceCall(ConferenceDescription conferenceDescription)
Removes the given conferenceDescription from the list of chat
conferences in this chat panel chat.
|
void |
removeChatContact(ChatContact<?> chatContact)
Removes the given chatContact from the list of chat contacts
participating in the corresponding to this chat panel chat.
|
void |
removeChatEditorCaretListener(javax.swing.event.CaretListener l)
Removes the given
CaretListener from this Chat. |
void |
removeChatEditorDocumentListener(javax.swing.event.DocumentListener l)
Removes the given
DocumentListener from this Chat. |
void |
removeChatEditorKeyListener(java.awt.event.KeyListener l)
Removes the given
KeyListener from this Chat. |
void |
removeChatEditorMenuListener(ChatMenuListener l)
Removes the given
ChatMenuListener to this Chat. |
void |
removeChatFocusListener(ChatFocusListener listener)
Implements Chat.removeChatFocusListener method.
|
void |
removeChatHistoryListener(ChatHistoryListener l)
Removes the given ChatHistoryListener from the list of listeners
notified when a change occurs in the history shown in this chat panel.
|
void |
removeChatLinkClickedListener(ChatLinkClickedListener listener)
Remove existing ChatLinkClickedListener
|
void |
removeChatTransport(ChatTransport chatTransport)
Removes the given chat status state from the send via selector box.
|
void |
removeTypingNotification()
Removes the typing notification message from the conversation panel.
|
void |
requestFocusInWriteArea()
Requests the focus in the write message area.
|
void |
sendButtonDoClick()
Sends current write area content.
|
void |
sendFile(java.io.File file)
Sends the given file through the currently selected chat transport.
|
void |
sendFile(java.io.File file,
SendFileConversationComponent fileComponent)
Sends the given file through the currently selected chat transport by
using the given fileComponent to visualize the transfer process in the
chat conversation panel.
|
protected void |
sendInstantMessage()
Implements the ChatPanel.sendMessage method.
|
protected void |
sendMessage()
Sends the text contained in the write area as an SMS message or an
instance message depending on the "send SMS" check box.
|
void |
sendSmsMessage()
Sends the text contained in the write area as an SMS message.
|
void |
setChatIcon(javax.swing.Icon icon)
Sets the chat icon.
|
void |
setChatSession(ChatSession chatSession)
Sets the chat session to associate to this chat panel.
|
void |
setChatSubject(java.lang.String subject)
Sets the given subject to this chat.
|
void |
setChatVisible(boolean isVisible)
Brings the ChatWindow containing this ChatPanel to the
front if isVisble is true; hides it, otherwise.
|
void |
setConferencesPanelVisible(boolean isVisible)
Sets the visibility of conferences panel to true or
false
|
void |
setContactName(ChatContact<?> chatContact,
java.lang.String name)
Renames all occurrences of the given chatContact in this chat
panel.
|
void |
setDividerLocation(int location)
Sets the location of the split pane divider.
|
void |
setMessage(java.lang.String message)
Sets the given message as a message in the chat write area.
|
void |
setPrivateMessagingChat(boolean isPrivateMessagingChat)
Sets the property which identifies whether the chat is private messaging
chat or not.
|
void |
setSelectedChatTransport(ChatTransport chatTransport,
boolean isMessageOrFileTransferReceived)
Selects the given chat transport in the send via box.
|
void |
setShown(boolean isShown)
Marks this chat panel as shown or hidden.
|
void |
setSmsSelected(boolean isSmsSelected)
Changes the "Send as SMS" check box state.
|
void |
showChatConferenceDialog() |
void |
showFontChooserDialog()
Shows the font chooser dialog
|
boolean |
showLastMessageInWriteArea()
Shows the last sent message in the write area, either in order to
correct it or to send it again.
|
boolean |
showMessageInWriteArea(java.lang.String messageUID)
Shows the message with the specified ID in the write area, either
in order to correct it or to send it again.
|
void |
startLastMessageCorrection()
Enters editing mode for the last sent message in this chat.
|
void |
startMessageCorrection(java.lang.String correctedMessageUID)
Enters editing mode for the message with the specified id - puts the
message contents in the write panel and changes the background.
|
void |
statusChanged(FileTransferStatusChangeEvent event)
Handles file transfer status changed in order to remove completed file
transfers from the list of active transfers.
|
void |
stopMessageCorrection()
Exits editing mode, clears the write panel and the background.
|
void |
updateChatContactStatus(ChatContact<?> chatContact,
java.lang.String statusMessage)
Updates the contact status.
|
void |
updateChatTransportStatus(ChatTransport chatTransport)
Updates the status of the given chat transport in the send via selector
box and notifies the user for the status change.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public int unreadMessageNumber
public static final int TYPING_NOTIFICATION_SUCCESSFULLY_SENT
public static final int TYPING_NOTIFICATION_SEND_FAILED
protected static final int MESSAGES_PER_PAGE
protected ChatConferenceCallDialog chatConferencesDialog
public ChatPanel(ChatContainer chatContainer)
chatContainer
- The parent window of this chat panel.public void setChatSession(ChatSession chatSession)
chatSession
- the chat session to associate to this chat panelpublic void showChatConferenceDialog()
public ChatSession getChatSession()
public void dispose()
public ChatContainer getChatContainer()
public java.awt.Window getConversationContainerWindow()
getConversationContainerWindow
in interface ChatConversationContainer
public void addTypingNotification(java.lang.String typingNotification)
addTypingNotification
in interface ChatConversationContainer
typingNotification
- the typing notification to showpublic void addErrorSendingTypingNotification(java.lang.String typingNotification)
typingNotification
- the typing notification to showpublic void removeTypingNotification()
public ChatConversationPanel getChatConversationPanel()
public ChatWritePanel getChatWritePanel()
public java.lang.String getRoleDescription(ChatRoomMemberRole role)
role
- to role index to analysepublic void memberRoleChanged(ChatRoomMemberRoleChangeEvent evt)
memberRoleChanged
in interface ChatRoomMemberRoleListener
evt
- public void localUserRoleChanged(ChatRoomLocalUserRoleChangeEvent evt)
localUserRoleChanged
in interface ChatRoomLocalUserRoleListener
evt
- public java.lang.String getLastSentMessageUID()
public void currentChatTransportChanged(ChatSession chatSession)
ChatTransport
has
changed. We will change current iconcurrentChatTransportChanged
in interface ChatSessionChangeListener
chatSession
- the ChatSession
it's current
ChatTransport
has changedpublic void currentChatTransportUpdated(int eventID)
currentChatTransportUpdated
in interface ChatSessionChangeListener
eventID
- the event id representing the property of the transport
that has changed.public void requestFocusInWriteArea()
public boolean isWriteAreaEmpty()
public boolean isPrivateMessagingChat()
public void addMessage(java.lang.String contactName, java.util.Date date, java.lang.String messageType, java.lang.String message, java.lang.String contentType)
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document.addMessage
in interface Chat
contactName
- the name of the contact sending the messagedate
- the time at which the message is sent or receivedmessageType
- the type of the message. One of OUTGOING_MESSAGE
or INCOMING_MESSAGEmessage
- the message textcontentType
- the content typepublic void addMessage(java.lang.String contactName, java.lang.String displayName, java.util.Date date, java.lang.String messageType, java.lang.String message, java.lang.String contentType, java.lang.String messageUID, java.lang.String correctedMessageUID)
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document.contactName
- the name of the contact sending the messagedisplayName
- the display name of the contactdate
- the time at which the message is sent or receivedmessageType
- the type of the message. One of OUTGOING_MESSAGE
or INCOMING_MESSAGEmessage
- the message textcontentType
- the content typepublic void addMessage(java.lang.String contactName, java.util.Date date, java.lang.String messageType, java.lang.String title, java.lang.String message, java.lang.String contentType)
ChatConversationPanel
for processing and appends it at the end of the conversationPanel
document.contactName
- the name of the contact sending the messagedate
- the time at which the message is sent or receivedmessageType
- the type of the message. One of OUTGOING_MESSAGE
or INCOMING_MESSAGEtitle
- the title of the messagemessage
- the message textcontentType
- the content typepublic void addErrorMessage(java.lang.String contactName, java.lang.String message)
contactName
- the name of the contact, for which the error occuredmessage
- the error messagepublic void addErrorMessage(java.lang.String contactName, java.lang.String title, java.lang.String message)
contactName
- the name of the contact, for which the error occurredtitle
- the title of the errormessage
- the error messagepublic void refreshWriteArea()
public void addTextInWriteArea(java.lang.String text)
text
- The text to add.public java.lang.String getTextFromWriteArea(java.lang.String mimeType)
mimeType
- the mime typepublic void cut()
public void copy()
public void copyWriteArea()
public void paste()
public void sendButtonDoClick()
public boolean isShown()
public void setShown(boolean isShown)
isShown
- TRUE to mark this chat panel as shown, FALSE - otherwisepublic void setChatVisible(boolean isVisible)
setChatVisible
in interface Chat
isVisible
- true to bring the ChatWindow of this
ChatPanel to the front; false to close this
ChatPanelpublic void setConferencesPanelVisible(boolean isVisible)
setConferencesPanelVisible
in interface ChatSessionRenderer
isVisible
- if true the panel is visible.public boolean isChatFocused()
isChatFocused
in interface Chat
public void addChatEditorKeyListener(java.awt.event.KeyListener l)
KeyListener
to this Chat.
The KeyListener is used to inform other bundles when a user has
typed in the chat editor area.addChatEditorKeyListener
in interface Chat
l
- the KeyListener to addpublic void removeChatEditorKeyListener(java.awt.event.KeyListener l)
KeyListener
from this Chat.
The KeyListener is used to inform other bundles when a user has
typed in the chat editor area.removeChatEditorKeyListener
in interface Chat
l
- the ChatFocusListener to removepublic java.lang.String getMessage()
getMessage
in interface Chat
public void setMessage(java.lang.String message)
setMessage
in interface Chat
message
- the text that would be set to the chat write areapublic void sendFile(java.io.File file, SendFileConversationComponent fileComponent)
file
- the file to sendfileComponent
- the file component to use for visualizationpublic void sendFile(java.io.File file)
file
- the file to sendprotected void sendMessage()
public void sendSmsMessage()
protected void sendInstantMessage()
public void setPrivateMessagingChat(boolean isPrivateMessagingChat)
isPrivateMessagingChat
- if true the chat panel will be
private messaging chat panel.public void startLastMessageCorrection()
public void startMessageCorrection(java.lang.String correctedMessageUID)
correctedMessageUID
- The ID of the message being corrected.public boolean showLastMessageInWriteArea()
public boolean showMessageInWriteArea(java.lang.String messageUID)
messageUID
- The ID of the message to show.public void stopMessageCorrection()
public boolean isMessageCorrectionActive()
public java.util.Date getFirstHistoryMsgTimestamp()
public java.util.Date getLastHistoryMsgTimestamp()
public void loadHistory(java.lang.String escapedMessageID)
escapedMessageID
- the id of the message to be ignored;
null if no message is to be ignoredpublic void loadHistory()
loadHistory(String)
with null for
escapedMessageID.public void setSmsSelected(boolean isSmsSelected)
isSmsSelected
- true
to set the "Send as SMS" check box
selected, false
- otherwise.public void setContactName(ChatContact<?> chatContact, java.lang.String name)
setContactName
in interface ChatSessionRenderer
chatContact
- the contact to renamename
- the new namepublic void addChatTransport(ChatTransport chatTransport)
addChatTransport
in interface ChatSessionRenderer
chatTransport
- the transport to addpublic void removeChatTransport(ChatTransport chatTransport)
removeChatTransport
in interface ChatSessionRenderer
chatTransport
- the transport to removepublic void setSelectedChatTransport(ChatTransport chatTransport, boolean isMessageOrFileTransferReceived)
setSelectedChatTransport
in interface ChatSessionRenderer
chatTransport
- the chat transport to be selectedisMessageOrFileTransferReceived
- Boolean telling us if this change
of the chat transport correspond to an effective switch to this new
transform (a message received from this transport, or a file transfer
request received, or if the resource timeouted), or just a status update
telling us a new chatTransport is now available (i.e. another device has
startup).public void updateChatTransportStatus(ChatTransport chatTransport)
updateChatTransportStatus
in interface ChatSessionRenderer
chatTransport
- the chatTransport to updatepublic void setChatIcon(javax.swing.Icon icon)
setChatIcon
in interface ChatSessionRenderer
icon
- the chat icon to setpublic void loadPreviousPageFromHistory()
public void loadNextPageFromHistory()
public void addChatContact(ChatContact<?> chatContact)
addChatContact
in interface ChatSessionRenderer
chatContact
- the contact to addpublic void removeChatContact(ChatContact<?> chatContact)
removeChatContact
in interface ChatSessionRenderer
chatContact
- the contact to removepublic void addChatConferenceCall(ConferenceDescription conferenceDescription)
addChatConferenceCall
in interface ChatSessionRenderer
conferenceDescription
- the conference to add.public void removeChatConferenceCall(ConferenceDescription conferenceDescription)
removeChatConferenceCall
in interface ChatSessionRenderer
conferenceDescription
- the conference to remove.public void removeAllChatContacts()
removeAllChatContacts
in interface ChatSessionRenderer
public void updateChatContactStatus(ChatContact<?> chatContact, java.lang.String statusMessage)
updateChatContactStatus
in interface ChatSessionRenderer
chatContact
- the chat contact to updatestatusMessage
- the status message to showpublic void setChatSubject(java.lang.String subject)
setChatSubject
in interface ChatSessionRenderer
subject
- the subject to setpublic void addIncomingFileTransferRequest(OperationSetFileTransfer fileTransferOpSet, IncomingFileTransferRequest request, java.util.Date date)
fileTransferOpSet
- the file transfer operation setrequest
- the request to display in the conversation paneldate
- the date on which the request has been receivedpublic void addChatFocusListener(ChatFocusListener listener)
addChatFocusListener
in interface Chat
listener
- the listener that we'll be adding.public void removeChatFocusListener(ChatFocusListener listener)
removeChatFocusListener
in interface Chat
listener
- the listener to remove.public ChatTransport findFileTransferChatTransport()
public ChatTransport findInviteChatTransport()
public void inviteContacts(ChatTransport inviteChatTransport, java.util.Collection<java.lang.String> chatContacts, java.lang.String reason)
inviteChatTransport
- the chat transport to use to send the invitechatContacts
- the contacts to invitereason
- the reason of the invitationpublic void fireChatFocusEvent(int eventID)
eventID
- the type of the ChatFocusEventpublic void statusChanged(FileTransferStatusChangeEvent event)
statusChanged
in interface FileTransferStatusListener
event
- the file transfer status change event the notified us for
the changepublic boolean containsActiveFileTransfers()
true
if there are active file transfers, otherwise
returns false
.true
if there are active file transfers, otherwise
returns false
public void cancelActiveFileTransfers()
public void setDividerLocation(int location)
location
- the location of the divider given by the pixel count
between the left bottom corner and the left bottom divider locationpublic int getDividerLocation()
public int getDividerSize()
public void addActiveFileTransfer(java.lang.String id, java.lang.Object descriptor)
id
- the identifier of the file transfer to adddescriptor
- the descriptor of the file transferpublic void removeActiveFileTransfer(java.lang.String id)
id
- the identifier of the file transfer to removepublic void addChatEditorMenuListener(ChatMenuListener l)
ChatMenuListener
to this Chat.
The ChatMenuListener is used to determine menu elements
that should be added on right clicks.addChatEditorMenuListener
in interface Chat
l
- the ChatMenuListener to addpublic void addChatEditorCaretListener(javax.swing.event.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.addChatEditorCaretListener
in interface Chat
l
- the CaretListener to addpublic void addChatEditorDocumentListener(javax.swing.event.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.addChatEditorDocumentListener
in interface Chat
l
- the DocumentListener to addpublic void removeChatEditorCaretListener(javax.swing.event.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.removeChatEditorCaretListener
in interface Chat
l
- the CaretListener to removepublic void removeChatEditorMenuListener(ChatMenuListener l)
ChatMenuListener
to this Chat.
The ChatMenuListener is used to determine menu elements
that should be added on right clicks.removeChatEditorMenuListener
in interface Chat
l
- the ChatMenuListener to addpublic void removeChatEditorDocumentListener(javax.swing.event.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.removeChatEditorDocumentListener
in interface Chat
l
- the DocumentListener to removepublic void addChatHistoryListener(ChatHistoryListener l)
l
- the ChatHistoryListener to addpublic void removeChatHistoryListener(ChatHistoryListener l)
l
- the ChatHistoryListener to removepublic javax.swing.text.Highlighter getHighlighter()
Highlighter
used in rendering the chat editor.getHighlighter
in interface Chat
public int getCaretPosition()
getCaretPosition
in interface Chat
public void promptRepaint()
promptRepaint
in interface Chat
public void showFontChooserDialog()
public void loadSkin()
public void chatRoomPropertyChanged(ChatRoomMemberPropertyChangeEvent event)
chatRoomPropertyChanged
in interface ChatRoomMemberPropertyChangeListener
event
- a ChatRoomMemberPropertyChangeEvent which carries
the specific of the changepublic void addChatLinkClickedListener(ChatLinkClickedListener listener)
addChatLinkClickedListener
in interface Chat
listener
- ChatLinkClickedListenerpublic void removeChatLinkClickedListener(ChatLinkClickedListener listener)
removeChatLinkClickedListener
in interface Chat
listener
- ChatLinkClickedListenerpublic void chatConferenceDescriptionSent(ConferenceDescription conferenceDescription)
chatConferenceDescriptionSent
in interface ChatSessionRenderer
conferenceDescription
- the ConferenceDescription instance
associated with the conference.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.