|
||||||||||
| 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
org.jivesoftware.spark.component.tabbedPane.SparkTabbedPane
org.jivesoftware.spark.ui.ChatContainer
public class ChatContainer
Contains all ChatRoom objects within Spark.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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 | |
|---|---|
ChatContainer()
Creates the ChatRooms to hold all ChatRooms. |
|
| Method Summary | |
|---|---|
void |
activateChatRoom(ChatRoom room)
Activates the specified ChatRoom. |
void |
activateComponent(java.awt.Component component)
Activates the component in tabbed pane. |
void |
addChatRoom(ChatRoom room)
Adds a new ChatRoom to Spark. |
void |
addChatRoomListener(ChatRoomListener listener)
Adds a ChatRoom listener to ChatRooms. |
void |
blinkFrameIfNecessary(javax.swing.JFrame frame)
|
void |
closeActiveRoom()
|
void |
closeAllChatRooms()
Close all chat rooms. |
void |
closeTab(java.awt.Component component)
Closes a tab of a room. |
protected void |
fireChatRoomActivated(ChatRoom room)
Notifies users that a ChatRoom has been activated. |
protected void |
fireChatRoomClosed(ChatRoom room)
Notifies users that a ChatRoom has been closed. |
protected void |
fireChatRoomLeft(ChatRoom room)
Notifies users that a ChatRoom has been left. |
protected void |
fireChatRoomOpened(ChatRoom room)
Notifies users that a ChatRoom has been opened. |
void |
fireNotifyOnMessage(ChatRoom chatRoom)
|
protected void |
fireUserHasJoined(ChatRoom room,
java.lang.String userid)
Notifies users that a user has joined a ChatRoom. |
protected void |
fireUserHasLeft(ChatRoom room,
java.lang.String userid)
Notifies users that a user has left a ChatRoom. |
void |
flashWindow(ChatRoom room)
|
void |
focusChat()
|
ChatRoom |
getActiveChatRoom()
Returns the Active ChatRoom. |
java.util.Iterator |
getAllChatRooms()
Returns all the ChatRooms found in the UI. |
ChatFrame |
getChatFrame()
|
ChatRoom |
getChatRoom(int location)
Returns a ChatRoom in the specified tab location. |
ChatRoom |
getChatRoom(java.lang.String roomName)
Returns a ChatRoom by name. |
java.util.Collection<ChatRoom> |
getChatRooms()
|
java.util.Collection<ChatRoom> |
getStaleChatRooms()
Returns a Collection of stale chat rooms. |
boolean |
hasRooms()
Returns true if there are any Rooms present. |
void |
leaveChatRoom(ChatRoom room)
Leaves a ChatRoom. |
void |
makeTabRed(ChatRoom room)
|
void |
messageReceived(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
Used for Tray Notifications. |
void |
messageSent(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
Invoked by the ChatRoom when a new message has
been sent. |
void |
removeChatRoomListener(ChatRoomListener listener)
Removes the specified ChatRoomListener. |
void |
setChatRoomTitle(ChatRoom room,
java.lang.String title)
|
void |
startFlashing(ChatRoom room)
Starts flashing of MainWindow. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Notification that the tab pane has been modified. |
void |
stopFlashing(ChatRoom room)
Checks to see if the MainWindow should stop flashing. |
java.lang.String |
toString()
|
void |
useTabDefault(ChatRoom room)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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 |
| Methods inherited from class java.awt.Container |
|---|
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
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, hide, 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, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChatContainer()
| Method Detail |
|---|
public void addChatRoom(ChatRoom room)
room - the ChatRoom to add.public void closeAllChatRooms()
public void leaveChatRoom(ChatRoom room)
room - the room to leave.
public ChatRoom getChatRoom(java.lang.String roomName)
throws ChatRoomNotFoundException
roomName - the name of the ChatRoom.
ChatRoomNotFoundException
public ChatRoom getChatRoom(int location)
throws ChatRoomNotFoundException
location - the tab location.
ChatRoomNotFoundException
public ChatRoom getActiveChatRoom()
throws ChatRoomNotFoundException
ChatRoomNotFoundException - is thrown if no chat room is found.public java.util.Iterator getAllChatRooms()
public void activateChatRoom(ChatRoom room)
room - the ChatRoom to activate.public void activateComponent(java.awt.Component component)
component - the component contained within the tab to activate.
public void messageReceived(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
messageReceived in interface MessageListenerroom - the ChatRoom where the message was received.message - the message received.ChatRoompublic void fireNotifyOnMessage(ChatRoom chatRoom)
public void messageSent(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
MessageListenerChatRoom when a new message has
been sent.
messageSent in interface MessageListenerroom - the ChatRoom that sent the message.message - the message sent.ChatRoompublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenere - the ChangeEvent.public void closeTab(java.awt.Component component)
component - the component inside of the tab to close.public void closeActiveRoom()
public java.lang.String toString()
toString in class java.awt.Componentpublic boolean hasRooms()
public void addChatRoomListener(ChatRoomListener listener)
listener - the ChatRoomListener to registerpublic void removeChatRoomListener(ChatRoomListener listener)
ChatRoomListener.
listener - the ChatRoomListener to removeprotected void fireChatRoomOpened(ChatRoom room)
ChatRoom has been opened.
room - - the ChatRoom that has been opened.protected void fireChatRoomLeft(ChatRoom room)
ChatRoom has been left.
room - - the ChatRoom that has been leftprotected void fireChatRoomClosed(ChatRoom room)
ChatRoom has been closed.
room - - the ChatRoom that has been closed.protected void fireChatRoomActivated(ChatRoom room)
ChatRoom has been activated.
room - - the ChatRoom that has been activated.
protected void fireUserHasJoined(ChatRoom room,
java.lang.String userid)
ChatRoom.
room - - the ChatRoom that a user has joined.userid - - the userid of the person.
protected void fireUserHasLeft(ChatRoom room,
java.lang.String userid)
ChatRoom.
room - - the ChatRoom that a user has left.userid - - the userid of the person.public void startFlashing(ChatRoom room)
room - the ChatRoom to check if a message has been inserted
but the room is not the selected room.public void flashWindow(ChatRoom room)
public void makeTabRed(ChatRoom room)
public void useTabDefault(ChatRoom room)
public void stopFlashing(ChatRoom room)
room - the ChatRoom to check.
public void setChatRoomTitle(ChatRoom room,
java.lang.String title)
public void focusChat()
public java.util.Collection<ChatRoom> getChatRooms()
public ChatFrame getChatFrame()
public void blinkFrameIfNecessary(javax.swing.JFrame frame)
public java.util.Collection<ChatRoom> getStaleChatRooms()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||