public class ChatWindow extends SIPCommFrame implements ChatContainer, ExportedWindow, PluginComponentListener, java.awt.event.WindowFocusListener
Note that the conference case is not yet implemented.
Modifier and Type | Class and Description |
---|---|
class |
ChatWindow.ChatWindowAdapter
Before closing the chat window saves the current size and position
through the ConfigurationService.
|
SIPCommFrame.MainContentPane
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABOUT_WINDOW, ADD_CONTACT_WINDOW, CHAT_WINDOW, MAIN_WINDOW
Constructor and Description |
---|
ChatWindow()
Creates an instance of ChatWindow by passing to it an instance
of the main application window.
|
Modifier and Type | Method and Description |
---|---|
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(java.io.File dir,
java.awt.Point point)
Sends all files from the given directory when it's dropped in the chat
window.
|
void |
dispose()
Overwrites the super's dispose method in order to save the size
and the position of this Window before closing it.
|
void |
fileDropped(java.io.File file,
java.awt.Point point)
Sends the given file when dropped to the chat window.
|
int |
getChatCount()
Returns the number of all open chats.
|
java.util.List<ChatPanel> |
getChats()
Returns the currently available chat panels.
|
ChatPanel |
getCurrentChat()
Returns the currently selected chat panel.
|
java.awt.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.
|
java.lang.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,
javax.swing.Icon icon)
Sets the icon for the given chat.
|
void |
setChatTitle(ChatPanel chatPanel,
java.lang.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(java.lang.Object[] windowParams)
Implementation of
ExportedWindow.setParams(Object[]) . |
void |
setTabIcon(ChatPanel chatPanel,
javax.swing.Icon icon)
Sets the given icon to the tab opened for the given chat panel.
|
void |
setTabTitle(ChatPanel chatPanel,
java.lang.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(java.awt.event.WindowEvent evt)
Handles WindowEvents triggered when the window has gained focus.
|
void |
windowLostFocus(java.awt.event.WindowEvent arg0) |
addKeybindingAction, setKeybindingInput, setSizeAndLocation, setVisible, setVisible, update, updateIconImages, windowClosing, windowDispose
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setTitle
isFocused, isVisible, setLocation, setSize, setVisible
public ChatWindow()
public void setToolbarVisible(boolean b)
setToolbarVisible
in interface ChatContainer
b
- if true, makes the Toolbar visible, otherwise hides the Toolbarpublic void dispose()
SIPCommFrame
dispose
in class SIPCommFrame
SIPCommFrame.dispose()
public MainToolBar getMainToolBar()
public void addChat(ChatPanel chatPanel)
addChat
in interface ChatContainer
chatPanel
- The ChatPanel to add.public void removeChat(ChatPanel chatPanel)
removeChat
in interface ChatContainer
chatPanel
- The ChatPanel to remove.public void removeAllChats()
removeAllChats
in interface ChatContainer
public void setCurrentChat(ChatPanel chatPanel)
setCurrentChat
in interface ChatContainer
chatPanel
- The ChatPanel to select.public void setCurrentChatTab(int index)
index
- the index to selectpublic ChatPanel getCurrentChat()
getCurrentChat
in interface ChatContainer
public java.util.List<ChatPanel> getChats()
getChats
in interface ChatContainer
public void setTabIcon(ChatPanel chatPanel, javax.swing.Icon icon)
chatPanel
- the chat panel, which corresponds the tabicon
- the icon to be setpublic void setTabTitle(ChatPanel chatPanel, java.lang.String title)
chatPanel
- the chat paneltitle
- the new title of the tabprotected void close(boolean isEscaped)
close
in class SIPCommFrame
isEscaped
- indicates if this window was closed by pressing the esc
buttonpublic WindowID getIdentifier()
getIdentifier
in interface ExportedWindow
public void minimize()
minimize
in interface ExportedWindow
public void maximize()
maximize
in interface ExportedWindow
public void bringToFront()
bringToFront
in interface ExportedWindow
public void pluginComponentAdded(PluginComponentEvent event)
pluginComponentAdded
in interface PluginComponentListener
event
- the PluginComponentEvent that notified us of the
addpublic void pluginComponentRemoved(PluginComponentEvent event)
pluginComponentRemoved
in interface PluginComponentListener
event
- the PluginComponentEvent that notified us of the
removepublic java.lang.Object getSource()
getSource
in interface ExportedWindow
public int getChatCount()
getChatCount
in interface ChatContainer
public void addChatChangeListener(ChatChangeListener listener)
addChatChangeListener
in interface ChatContainer
listener
- the listener to addpublic void removeChatChangeListener(ChatChangeListener listener)
removeChatChangeListener
in interface ChatContainer
listener
- the listener to removepublic void setParams(java.lang.Object[] windowParams)
ExportedWindow.setParams(Object[])
.setParams
in interface ExportedWindow
windowParams
- the parameters to pass.public void windowGainedFocus(java.awt.event.WindowEvent evt)
windowGainedFocus
in interface java.awt.event.WindowFocusListener
evt
- the WindowEventpublic void windowLostFocus(java.awt.event.WindowEvent arg0)
windowLostFocus
in interface java.awt.event.WindowFocusListener
public void directoryDropped(java.io.File dir, java.awt.Point point)
dir
- the directory to sendpoint
- the point, where the directory was droppedpublic void fileDropped(java.io.File file, java.awt.Point point)
file
- the file to sendpoint
- the point, where the file was droppedpublic void openChat(ChatPanel chatPanel, boolean setSelected)
openChat
in interface ChatContainer
chatPanel
- the ChatPanel to be openedsetSelected
- true if chatPanel (and respectively
this ChatContainer) should be brought to the front; otherwise,
falsepublic java.awt.Frame getFrame()
getFrame
in interface ChatContainer
public void setChatTitle(ChatPanel chatPanel, java.lang.String title)
setChatTitle
in interface ChatContainer
chatPanel
- the chat, for which we set the titletitle
- the title to setpublic void setChatIcon(ChatPanel chatPanel, javax.swing.Icon icon)
ChatContainer
setChatIcon
in interface ChatContainer
chatPanel
- the chat, for which we want to set an iconicon
- the icon to setpublic boolean isFrameActive()
public void updateHistoryButtonState(ChatPanel chatPanel)
updateHistoryButtonState
in interface ChatContainer
chatPanel
- the chat panel for which we should update button states
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.