public class SingleWindowContainer extends TransparentPanel implements ChatContainer, CallContainer, CallTitleListener, javax.swing.event.ChangeListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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
PROP_FULL_SCREEN
Constructor and Description |
---|
SingleWindowContainer()
Creates an instance of the SingleWindowContainer.
|
Modifier and Type | Method and Description |
---|---|
void |
addCallPanel(CallPanel callPanel)
Adds the given CallPanel to this call window.
|
void |
addChat(ChatPanel chatPanel)
Adds a given ChatPanel to this chat window.
|
void |
addChatChangeListener(ChatChangeListener listener)
Adds the given ChatChangeListener.
|
void |
callTitleChanged(CallPanel callPanel)
Called when the title of the given CallPanel changes.
|
void |
close(CallPanel callPanel,
boolean delay)
Closes a specific CallPanel.
|
boolean |
containsFocusOwner()
Indicates if one of the contained components is currently the owner of
the keyboard focus.
|
void |
ensureSize(java.awt.Component component,
int width,
int height)
Attempts to give a specific Component a visible rectangle with a
specific width and a specific height if possible and sane by resizing
the Window of this CallContainer.
|
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.
|
javax.swing.JFrame |
getFrame()
Returns the frame to which this container belongs.
|
boolean |
isFullScreen()
Determines whether the Window representation of this
CallContainer is displayed in full-screen mode.
|
void |
openChat(ChatPanel chatPanel,
boolean setSelected)
Opens the specified ChatPanel and optinally brings it to the
front.
|
void |
pack()
Packs the content of this call window.
|
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 |
setFullScreen(boolean fullScreen)
Sets the display of the Window representation of this
CallContainer to full-screen or windowed mode.
|
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 |
setTitle(java.lang.String title)
Sets the title of this chat container.
|
void |
setToolbarVisible(boolean isVisible)
Shows/hides the toolbar.
|
void |
stateChanged(javax.swing.event.ChangeEvent event)
Shows/hides the toolbar depending on the selected tab.
|
void |
updateHistoryButtonState(ChatPanel chatPanel)
Updates history buttons state.
|
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 SingleWindowContainer()
public void addCallPanel(CallPanel callPanel)
addCallPanel
in interface CallContainer
callPanel
- the CallPanel to addpublic void addChat(ChatPanel chatPanel)
addChat
in interface ChatContainer
chatPanel
- The ChatPanel to add.public void addChatChangeListener(ChatChangeListener listener)
addChatChangeListener
in interface ChatContainer
listener
- the listener to addpublic void callTitleChanged(CallPanel callPanel)
callTitleChanged
in interface CallTitleListener
callPanel
- the CallPanel, which title has changedpublic void close(CallPanel callPanel, boolean delay)
close
in interface CallContainer
callPanel
- the CallPanel to be closeddelay
- true to close the specified callPanel with
an implementation-specific delay or false to close it as soon as
possiblepublic boolean containsFocusOwner()
public void ensureSize(java.awt.Component component, int width, int height)
ensureSize
in interface CallContainer
component
- the Component which requests a visible
rectangle with the specified width and heightwidth
- the width of the visible rectangle requested by the
specified componentheight
- the height of the visible rectangle requested by the
specified componentpublic int getChatCount()
getChatCount
in interface ChatContainer
public java.util.List<ChatPanel> getChats()
getChats
in interface ChatContainer
public ChatPanel getCurrentChat()
getCurrentChat
in interface ChatContainer
public javax.swing.JFrame getFrame()
getFrame
in interface CallContainer
getFrame
in interface ChatContainer
public boolean isFullScreen()
isFullScreen
in interface CallContainer
CallDialog.isFullScreen(Window)
public 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 void pack()
pack
in interface CallContainer
public void removeAllChats()
removeAllChats
in interface ChatContainer
public void removeChat(ChatPanel chatPanel)
removeChat
in interface ChatContainer
chatPanel
- The ChatPanel to remove.public void removeChatChangeListener(ChatChangeListener listener)
removeChatChangeListener
in interface ChatContainer
listener
- the listener to removepublic 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 void setChatTitle(ChatPanel chatPanel, java.lang.String title)
ChatContainer
setChatTitle
in interface ChatContainer
chatPanel
- the chat, for which we set the titletitle
- the title to setpublic void setCurrentChat(ChatPanel chatPanel)
setCurrentChat
in interface ChatContainer
chatPanel
- The ChatPanel to select.public void setFullScreen(boolean fullScreen)
setFullScreen
in interface CallContainer
fullScreen
- true if the Window representation of
this CallContainer is to be displayed in full-screen mode or
false for windowed modepublic 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 tabpublic void setTitle(java.lang.String title)
ChatContainer
setTitle
in interface ChatContainer
title
- the title to setpublic void setToolbarVisible(boolean isVisible)
setToolbarVisible
in interface ChatContainer
isVisible
- public void stateChanged(javax.swing.event.ChangeEvent event)
stateChanged
in interface javax.swing.event.ChangeListener
event
- the ChangeEvent that notified us of the tab
selection changepublic 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.