|
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.JPanel
net.java.sip.communicator.util.swing.TransparentPanel
net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel
public class ChatWritePanel
The ChatWritePanel is the panel, where user writes her messages. It is located at the bottom of the split in the ChatPanel and it contains an editor, where user writes the text.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 |
|---|
| 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 | |
|---|---|
ChatWritePanel(ChatPanel panel)
Creates an instance of ChatWritePanel. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Performs actions when typing timer has expired. |
void |
addChatEditorMenuListener(ChatMenuListener l)
Adds the given ChatMenuListener to this Chat. |
void |
addChatTransport(ChatTransport chatTransport)
Adds the given chatTransport to the given send via selector box. |
void |
appendText(String text)
Appends the given text to the end of the contained HTML document. |
void |
changedUpdate(DocumentEvent documentevent)
|
void |
changeSendCommand(boolean isEnter)
Replaces the Ctrl+Enter send command with simple Enter. |
void |
clearWriteArea()
Clears write message area. |
void |
dispose()
Runs clean-up for associated resources which need explicit disposal (e.g. |
JEditorPane |
getEditorPane()
Returns the editor panel, contained in this ChatWritePanel. |
WritePanelRightButtonMenu |
getRightButtonMenu()
Returns the WritePanelRightButtonMenu opened in this panel. |
String |
getText()
Returns the write area text as a plain text without any formatting. |
String |
getTextAsHtml()
Returns the write area text as an html text. |
void |
insertUpdate(DocumentEvent event)
Updates write panel size and adjusts sms properties if the sms menu is visible. |
boolean |
isSmsSelected()
Returns true if the sms mode is enabled, otherwise returns false. |
void |
keyPressed(KeyEvent e)
When CTRL+Z is pressed invokes the ChatWritePanel.undo()
method, when CTRL+R is pressed invokes the
ChatWritePanel.redo() method. |
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
Sends typing notifications when user types. |
void |
loadSkin()
Reloads menu. |
void |
mouseClicked(MouseEvent e)
Opens the WritePanelRightButtonMenu when user clicks with the right mouse button on the editor area. |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
openChatTransportSelectorBox()
Opens the selector box containing the protocol contact icons. |
void |
removeChatEditorMenuListener(ChatMenuListener l)
Removes the given ChatMenuListener to this Chat. |
void |
removeChatTransport(ChatTransport chatTransport)
Removes the given chat status state from the send via selector box. |
void |
removeUpdate(DocumentEvent event)
Updates write panel size and adjusts sms properties if the sms menu is visible. |
void |
saveDefaultFontConfiguration(String fontFamily,
int fontSize,
boolean isBold,
boolean isItalic,
boolean isUnderline,
Color color)
Saves the given font configuration as default, thus making it the default configuration for all chats. |
void |
setBoldStyleEnable(boolean b)
Enables the bold style |
void |
setFontColor(Color color)
Sets the font color |
void |
setFontFamilyAndSize(String family,
int size)
Sets the font family and size |
void |
setItalicStyleEnable(boolean b)
Enables the italic style |
void |
setSelectedChatTransport(ChatTransport chatTransport)
Selects the given chat transport in the send via box. |
void |
setSmsLabelVisible(boolean isVisible)
Show the sms menu. |
void |
setSmsSelected(boolean selected)
Enables/disables the sms mode. |
void |
setTransportSelectorBoxVisible(boolean isVisible)
|
void |
setUnderlineStyleEnable(boolean b)
Enables the underline style |
void |
stopTypingTimer()
Stops the timer and sends a notification message. |
void |
undoableEditHappened(UndoableEditEvent e)
Handles the UndoableEditEvent, by adding the content edit to the UndoManager. |
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. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChatWritePanel(ChatPanel panel)
panel - The parent ChatPanel.| Method Detail |
|---|
public void dispose()
public JEditorPane getEditorPane()
public void changeSendCommand(boolean isEnter)
isEnter - indicates if the new send command is enter or cmd-enterpublic void setSmsSelected(boolean selected)
selected - true to enable sms mode, false -
otherwisepublic boolean isSmsSelected()
public void undoableEditHappened(UndoableEditEvent e)
undoableEditHappened in interface UndoableEditListenere - The UndoableEditEvent.public void keyTyped(KeyEvent e)
keyTyped in interface KeyListenere - the event.public void keyPressed(KeyEvent e)
ChatWritePanel.undo()
method, when CTRL+R is pressed invokes the
ChatWritePanel.redo() method.
keyPressed in interface KeyListenere - the KeyEvent that notified uspublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - the ActionEvent that notified uspublic void stopTypingTimer()
public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEvent that notified uspublic 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 MouseListenerpublic WritePanelRightButtonMenu getRightButtonMenu()
public String getTextAsHtml()
public String getText()
public void clearWriteArea()
public void appendText(String text)
text - the text to append.public void setTransportSelectorBoxVisible(boolean isVisible)
isVisible - public void setSelectedChatTransport(ChatTransport chatTransport)
chatTransport - the chat transport to be selectedpublic void addChatTransport(ChatTransport chatTransport)
chatTransport - the transport to addpublic void updateChatTransportStatus(ChatTransport chatTransport)
chatTransport - the chatTransport to updatepublic void openChatTransportSelectorBox()
public void removeChatTransport(ChatTransport chatTransport)
chatTransport - the transport to removepublic void setSmsLabelVisible(boolean isVisible)
isVisible - true to show the sms menu, false -
otherwise
public void saveDefaultFontConfiguration(String fontFamily,
int fontSize,
boolean isBold,
boolean isItalic,
boolean isUnderline,
Color color)
fontFamily - the font familyfontSize - the font sizeisBold - indicates if the font is boldisItalic - indicates if the font is italicisUnderline - indicates if the font is underline
public void setFontFamilyAndSize(String family,
int size)
family - the family namesize - the sizepublic void setBoldStyleEnable(boolean b)
b - TRUE enable - FALSE disablepublic void setItalicStyleEnable(boolean b)
b - TRUE enable - FALSE disablepublic void setUnderlineStyleEnable(boolean b)
b - TRUE enable - FALSE disablepublic void setFontColor(Color color)
color - the colorpublic void 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 addpublic void 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 addpublic void loadSkin()
loadSkin in interface Skinnablepublic void changedUpdate(DocumentEvent documentevent)
changedUpdate in interface DocumentListenerpublic void insertUpdate(DocumentEvent event)
insertUpdate in interface DocumentListenerevent - the DocumentEvent that notified uspublic void removeUpdate(DocumentEvent event)
removeUpdate in interface DocumentListenerevent - the DocumentEvent that notified us
|
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 | |||||||||