|
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
java.awt.Window
java.awt.Frame
javax.swing.JFrame
net.java.sip.communicator.util.swing.SIPCommFrame
net.java.sip.communicator.impl.gui.main.chat.ChatWindow
public class ChatWindow
The chat window is the place, where users can write and send messages, view received messages. The ChatWindow supports two modes of use: "Group all messages in one window" and "Open messages in new window". In the first case a JTabbedPane is added in the window, where each tab contains a ChatPanel. In the second case the ChatPanel is added like a "write message area", "send" button, etc. It corresponds to a MetaContact or to a conference.
Note that the conference case is not yet implemented.
| Nested Class Summary | |
|---|---|
class |
ChatWindow.ChatWindowAdapter
Before closing the chat window saves the current size and position through the ConfigurationService. |
| Nested classes/interfaces inherited from class net.java.sip.communicator.util.swing.SIPCommFrame |
|---|
SIPCommFrame.MainContentPane |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface net.java.sip.communicator.service.gui.ExportedWindow |
|---|
ABOUT_WINDOW, ADD_CONTACT_WINDOW, CHAT_WINDOW, MAIN_WINDOW |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ChatWindow()
Creates an instance of ChatWindow by passing to it an instance of the main application window. |
|
| Method Summary | |
|---|---|
void |
addChat(ChatPanel chatPanel)
Adds a given ChatPanel to this chat window. |
void |
addChatChangeListener(ChatChangeListener listener)
Adds the given ChatChangeListener. |
void |
bringToFront()
Implements the ExportedWindow.bringToFront() method. |
protected void |
close(boolean isEscaped)
Implements the SIPCommFrame close method. |
void |
directoryDropped(File dir,
Point point)
Sends all files from the given directory when it's dropped in the chat window. |
void |
dispose()
Overwrites the dispose method in order to save the size and the position of this window before closing it. |
void |
fileDropped(File file,
Point point)
Sends the given file when dropped to the chat window. |
int |
getChatCount()
Returns the number of all open chats. |
List<ChatPanel> |
getChats()
Returns the currently available chat panels. |
ChatPanel |
getCurrentChat()
Returns the currently selected chat panel. |
Frame |
getFrame()
Returns the frame to which this container belongs. |
WindowID |
getIdentifier()
Implements the ExportedWindow.getIdentifier() method. |
MainToolBar |
getMainToolBar()
Returns the main toolbar in this chat window. |
Object |
getSource()
The source of the window |
boolean |
isFrameActive()
Indicates if the parent frame is currently the active window. |
void |
maximize()
Implements the ExportedWindow.maximize() method. |
void |
minimize()
Implements the ExportedWindow.minimize() method. |
void |
openChat(ChatPanel chatPanel,
boolean setSelected)
Opens the specified ChatPanel and optionally brings it to the front. |
void |
pluginComponentAdded(PluginComponentEvent event)
Adds a plugin component to this container. |
void |
pluginComponentRemoved(PluginComponentEvent event)
Removes a plugin component from this container. |
void |
removeAllChats()
Removes all tabs in the chat tabbed pane. |
void |
removeChat(ChatPanel chatPanel)
Removes a given ChatPanel from this chat window. |
void |
removeChatChangeListener(ChatChangeListener listener)
Removes the given ChatChangeListener. |
void |
setChatIcon(ChatPanel chatPanel,
Icon icon)
Sets the icon for the given chat. |
void |
setChatTitle(ChatPanel chatPanel,
String title)
Sets the title of this chat container. |
void |
setCurrentChat(ChatPanel chatPanel)
Selects the chat tab which corresponds to the given MetaContact. |
void |
setCurrentChatTab(int index)
Selects the tab given by the index. |
void |
setParams(Object[] windowParams)
Implementation of ExportedWindow.setParams(Object[]). |
void |
setTabIcon(ChatPanel chatPanel,
Icon icon)
Sets the given icon to the tab opened for the given chat panel. |
void |
setTabTitle(ChatPanel chatPanel,
String title)
Sets the given title to the tab opened for the given chat panel. |
void |
setToolbarVisible(boolean b)
Shows or hides the Toolbar depending on the value of parameter b. |
void |
updateHistoryButtonState(ChatPanel chatPanel)
Updates history buttons state. |
void |
windowGainedFocus(WindowEvent evt)
Handles WindowEvents triggered when the window has gained focus. |
void |
windowLostFocus(WindowEvent arg0)
|
| Methods inherited from class net.java.sip.communicator.util.swing.SIPCommFrame |
|---|
addKeybindingAction, setKeybindingInput, setSizeAndLocation, setVisible, setVisible, update, validate, windowClosing |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.impl.gui.main.chat.ChatContainer |
|---|
setTitle |
| Methods inherited from interface net.java.sip.communicator.service.gui.ExportedWindow |
|---|
isFocused, isVisible, setLocation, setSize, setVisible |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Constructor Detail |
|---|
public ChatWindow()
| Method Detail |
|---|
public void setToolbarVisible(boolean b)
setToolbarVisible in interface ChatContainerb - if true, makes the Toolbar visible, otherwise hides the Toolbarpublic void dispose()
SIPCommFrame
dispose in class SIPCommFrameSIPCommFrame.dispose()public MainToolBar getMainToolBar()
public void addChat(ChatPanel chatPanel)
addChat in interface ChatContainerchatPanel - The ChatPanel to add.public void removeChat(ChatPanel chatPanel)
removeChat in interface ChatContainerchatPanel - The ChatPanel to remove.public void removeAllChats()
removeAllChats in interface ChatContainerpublic void setCurrentChat(ChatPanel chatPanel)
setCurrentChat in interface ChatContainerchatPanel - The ChatPanel to select.public void setCurrentChatTab(int index)
index - the index to selectpublic ChatPanel getCurrentChat()
getCurrentChat in interface ChatContainerpublic List<ChatPanel> getChats()
getChats in interface ChatContainer
public void setTabIcon(ChatPanel chatPanel,
Icon icon)
chatPanel - the chat panel, which corresponds the tabicon - the icon to be set
public void setTabTitle(ChatPanel chatPanel,
String title)
chatPanel - the chat paneltitle - the new title of the tabprotected void close(boolean isEscaped)
close in class SIPCommFrameisEscaped - indicates if this window was closed by pressing the esc
buttonpublic WindowID getIdentifier()
getIdentifier in interface ExportedWindowpublic void minimize()
minimize in interface ExportedWindowpublic void maximize()
maximize in interface ExportedWindowpublic void bringToFront()
bringToFront in interface ExportedWindowpublic void pluginComponentAdded(PluginComponentEvent event)
pluginComponentAdded in interface PluginComponentListenerevent - the PluginComponentEvent that notified us of the
addpublic void pluginComponentRemoved(PluginComponentEvent event)
pluginComponentRemoved in interface PluginComponentListenerevent - the PluginComponentEvent that notified us of the
removepublic Object getSource()
getSource in interface ExportedWindowpublic int getChatCount()
getChatCount in interface ChatContainerpublic void addChatChangeListener(ChatChangeListener listener)
addChatChangeListener in interface ChatContainerlistener - the listener to addpublic void removeChatChangeListener(ChatChangeListener listener)
removeChatChangeListener in interface ChatContainerlistener - the listener to removepublic void setParams(Object[] windowParams)
ExportedWindow.setParams(Object[]).
setParams in interface ExportedWindowwindowParams - the parameters to pass.public void windowGainedFocus(WindowEvent evt)
windowGainedFocus in interface WindowFocusListenerevt - the WindowEventpublic void windowLostFocus(WindowEvent arg0)
windowLostFocus in interface WindowFocusListener
public void directoryDropped(File dir,
Point point)
dir - the directory to sendpoint - the point, where the directory was dropped
public void fileDropped(File file,
Point point)
file - the file to sendpoint - the point, where the file was dropped
public void openChat(ChatPanel chatPanel,
boolean setSelected)
openChat in interface ChatContainerchatPanel - the ChatPanel to be openedsetSelected - true if chatPanel (and respectively
this ChatContainer) should be brought to the front; otherwise,
falsepublic Frame getFrame()
getFrame in interface ChatContainer
public void setChatTitle(ChatPanel chatPanel,
String title)
setChatTitle in interface ChatContainerchatPanel - the chat, for which we set the titletitle - the title to set
public void setChatIcon(ChatPanel chatPanel,
Icon icon)
ChatContainer
setChatIcon in interface ChatContainerchatPanel - the chat, for which we want to set an iconicon - the icon to setpublic boolean isFrameActive()
public void updateHistoryButtonState(ChatPanel chatPanel)
updateHistoryButtonState in interface ChatContainerchatPanel - the chat panel for which we should update button states
|
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 | |||||||||