|
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 | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
net.java.sip.communicator.impl.gui.customcontrols.SCScrollPane
net.java.sip.communicator.impl.gui.main.chat.ChatConversationPanel
public class ChatConversationPanel
The ChatConversationPanel is the panel, where all sent and received messages appear. All data is stored in an HTML document. An external CSS file is applied to the document to provide the look&feel. All smileys and link strings are processed and finally replaced by corresponding images and HTML links.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JScrollPane |
|---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
HTML_CONTENT_TYPE
The html text content type. |
static String |
TEXT_CONTENT_TYPE
The plain text content type. |
| Fields inherited from class javax.swing.JScrollPane |
|---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ChatConversationPanel(ChatConversationContainer chatContainer)
Creates an instance of ChatConversationPanel. |
|
| Method Summary | |
|---|---|
void |
addComponent(ChatConversationComponent component)
Adds a custom component at the end of the conversation. |
void |
appendMessageToEnd(String chatString,
String contentType)
Appends the given string at the end of the contained in this panel document. |
void |
clear()
Creates new document and all the messages that will be processed in the future will be appended in it. |
void |
copyConversation()
Copies the selected conversation panel content to the clipboard. |
ChatConversationContainer |
getChatContainer()
Returns the chat container. |
JTextPane |
getChatTextPane()
Returns the text pane of this conversation panel. |
HTMLDocument |
getContent()
Returns the document contained in this panel. |
static String |
getDateString(long date)
Returns the date string to show for the given date. |
long |
getLastIncomingMsgTimestamp()
Returns the time of the last received message. |
Date |
getPageFirstMsgTimestamp()
Returns the date of the first message in the current page. |
Date |
getPageLastMsgTimestamp()
Returns the date of the last message in the current page. |
ChatRightButtonMenu |
getRightButtonMenu()
Returns the right button popup menu. |
void |
hyperlinkUpdate(HyperlinkEvent e)
Opens a link in the default browser when clicked and shows link url in a popup on mouseover. |
void |
loadSkin()
Reloads images. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
|
void |
mouseClicked(MouseEvent e)
When a right button click is performed in the editor pane, a popup menu is opened. |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
String |
processChatRoomHighlight(String message,
String contentType,
String keyWord)
Highlights the string in multi user chat. |
String |
processMeCommand(ChatMessage chatMessage)
|
String |
processMessage(ChatMessage chatMessage)
Processes the message given by the parameters. |
String |
processMessage(ChatMessage chatMessage,
String keyword)
Processes the message given by the parameters. |
void |
setBounds(int x,
int y,
int width,
int height)
Overrides Component#setBounds(int, int, int, int) in order to determine whether an automatic scroll of #chatTextPane to its bottom will be necessary at a later time in order to keep its vertical scroll bar to its bottom after the realization of the resize if it is at its bottom before the resize. |
void |
setContent(HTMLDocument document)
Sets the given document to the editor pane in this panel. |
void |
setDefaultContent()
Sets the default document contained in this panel, created on init or when clear is invoked. |
| Methods inherited from class net.java.sip.communicator.impl.gui.customcontrols.SCScrollPane |
|---|
setViewportView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String HTML_CONTENT_TYPE
public static final String TEXT_CONTENT_TYPE
| Constructor Detail |
|---|
public ChatConversationPanel(ChatConversationContainer chatContainer)
chatContainer - The parent ChatConversationContainer.| Method Detail |
|---|
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class Component
public String processMessage(ChatMessage chatMessage,
String keyword)
chatMessage - the messagekeyword - a substring of chatMessage to be highlighted upon
display of chatMessage in the UI
public String processMessage(ChatMessage chatMessage)
chatMessage - the message.
public void appendMessageToEnd(String chatString,
String contentType)
chatString - the string to appendpublic void hyperlinkUpdate(HyperlinkEvent e)
hyperlinkUpdate in interface HyperlinkListenere - The HyperlinkEvent.public JTextPane getChatTextPane()
public long getLastIncomingMsgTimestamp()
public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - The MouseEvent.public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListener
public void lostOwnership(Clipboard clipboard,
Transferable contents)
lostOwnership in interface ClipboardOwnerpublic ChatConversationContainer getChatContainer()
public void copyConversation()
public void clear()
public void setContent(HTMLDocument document)
document - the document to setpublic void setDefaultContent()
public HTMLDocument getContent()
public ChatRightButtonMenu getRightButtonMenu()
public Date getPageFirstMsgTimestamp()
public Date getPageLastMsgTimestamp()
public void addComponent(ChatConversationComponent component)
component - the component to add at the end of the conversation.public static String getDateString(long date)
date - the date to format
public void loadSkin()
loadSkin in interface SkinnableloadSkin in class SCScrollPane
public String processChatRoomHighlight(String message,
String contentType,
String keyWord)
message - the message to processcontentType - the content type of the messagekeyWord - the keyword to highlight
public String processMeCommand(ChatMessage chatMessage)
|
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 | |||||||||