public class GroupChatRoom extends ChatRoom
ChatRoom.ChatToolBar
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
Constructor and Description |
---|
GroupChatRoom(org.jivesoftware.smackx.muc.MultiUserChat chat)
Creates a GroupChatRoom from a
MultiUserChat . |
Modifier and Type | Method and Description |
---|---|
void |
addBlockedUser(java.lang.String usersJID)
Adds a user to the blocked user list.
|
void |
authenticated(org.jivesoftware.smack.XMPPConnection xmppConnection,
boolean b) |
void |
closeChatRoom()
Have the user leave this chat room and then close it.
|
void |
connected(org.jivesoftware.smack.XMPPConnection xmppConnection) |
void |
connectionClosed() |
void |
connectionClosedOnError(java.lang.Exception ex) |
org.jivesoftware.smack.packet.Message.Type |
getChatType()
Return the type of chat we are in.
|
java.awt.Color |
getColor(java.lang.String nickname)
Returns the Color to use.
|
GroupChatParticipantList |
getConferenceRoomInfo()
Returns the GroupChatParticipantList which displays all users within a conference room.
|
long |
getLastActivity()
Implementation of this method should return the last time this chat room
sent or recieved a message.
|
org.jivesoftware.smack.packet.Message |
getLastMessage() |
org.jivesoftware.smackx.muc.MultiUserChat |
getMultiUserChat()
Returns a MultiUserChat object associated with this room.
|
java.lang.String |
getNickname()
Retrieve the nickname of the user in this groupchat.
|
java.util.Collection<java.lang.String> |
getParticipants()
Returns the user format (e.g.
|
java.lang.String |
getRoomname()
Return name of the room specified when the room was created.
|
java.lang.String |
getRoomTitle()
Return the title of this room.
|
javax.swing.Icon |
getTabIcon()
Return the Icon that should be used in the tab of this GroupChat Pane.
|
java.lang.String |
getTabTitle()
Return the title that should be used in the tab.
|
void |
insertText(java.lang.String text)
Inserts a notification message within the TranscriptWindow.
|
void |
inviteUser(java.lang.String jid,
java.lang.String message)
Invite a user to this conference room.
|
boolean |
isActive()
Returns whether or not this ChatRoom is active.
|
boolean |
isBlocked(java.lang.String usersJID)
Returns true if the user is in the blocked user list.
|
boolean |
isChatStatEnabled() |
void |
leaveChatRoom()
Implementation of leaveChatRoom.
|
void |
notifySettingsAccessRight() |
void |
processPacket(org.jivesoftware.smack.packet.Stanza stanza)
Implementation of processPacket to handle muc related packets.
|
void |
reconnectionSuccessful()
Part of ConnectionListener.
|
void |
removeBlockedUser(java.lang.String usersJID)
Removes a user from the blocked user list.
|
protected void |
sendChatState(org.jivesoftware.smackx.chatstates.ChatState state)
Sends a chat state to all peers.
|
void |
sendMessage()
Sends the message that is currently in the send field.
|
void |
sendMessage(org.jivesoftware.smack.packet.Message message)
Sends a message.
|
void |
sendMessage(java.lang.String text)
Creates a Message object from the given text and delegates to the room
for sending.
|
void |
setChatStatEnabled(boolean chatStatEnabled) |
void |
setPassword(java.lang.String password)
Sets the Password for this GroupChat if available, to rejoin the chat after a reconnection without prompting the user
|
void |
setRoomLabel(java.lang.String label)
Changes the label that is displayed for this room.
|
void |
setTabIcon(javax.swing.ImageIcon tabIcon)
Sets the icon that should be used in the tab of this GroupChat Pane.
|
void |
setTabTitle(java.lang.String tabTitle)
Sets the title to use on the tab describing the Conference room.
|
actionPerformed, addChatRoomButton, addChatRoomButton, addChatRoomComponent, addClosingListener, addControllerButton, addEditorComponent, addFileDropListener, addMessageListener, addPacketID, addToolbar, addToTranscript, addToTranscript, changedUpdate, checkForText, clearUnreadMessageCount, createChatStateTimerTask, disableToolbar, enableToolbar, fireFileDropListeners, fireMessageSent, focusGained, focusLost, getBottomPanel, getChatAreaInsets, getChatInputEditor, getChatPanel, getChatPanelInsets, getChatRoom, getChatWindowPanel, getEditorBar, getEditorBarLeft, getEditorBarRight, getEditorWrapperBar, getEditorWrapperInsets, getNotificationLabel, getRoomControllerBar, getScrollPaneForTranscriptWindow, getSendButton, getSplitPane, getTextScroller, getToolBar, getTranscripts, getTranscriptWindow, getUnreadMessageCount, getVerticalSlipPane, handleDefaultAction, hideToolbar, increaseUnreadMessageCount, insertMessage, insertUpdate, packetIDExists, poppingDown, poppingUp, positionCursor, reconnectingIn, reconnectionFailed, registeredToFrame, removeClosingListener, removeEditorComponent, removeFileDropListener, removeMessageListener, removeUpdate, saveTranscript, scrollToBottom, setChatState, showToolbar, updateStatus
paintComponent
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, 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 GroupChatRoom(org.jivesoftware.smackx.muc.MultiUserChat chat)
MultiUserChat
.chat
- the MultiUserChat to create a GroupChatRoom from.public org.jivesoftware.smack.packet.Message getLastMessage()
public void closeChatRoom()
closeChatRoom
in class ChatRoom
public void sendMessage(org.jivesoftware.smack.packet.Message message)
sendMessage
in class ChatRoom
message
- - the message to send.public java.lang.String getRoomname()
getRoomname
in class ChatRoom
public java.lang.String getNickname()
getNickname
in class ChatRoom
public javax.swing.Icon getTabIcon()
getTabIcon
in class ChatRoom
public void setTabIcon(javax.swing.ImageIcon tabIcon)
tabIcon
- the Icon to use in tab.public java.lang.String getTabTitle()
getTabTitle
in class ChatRoom
public void setTabTitle(java.lang.String tabTitle)
tabTitle
- the title to use on the tab.public java.lang.String getRoomTitle()
getRoomTitle
in class ChatRoom
public org.jivesoftware.smack.packet.Message.Type getChatType()
getChatType
in class ChatRoom
public void leaveChatRoom()
leaveChatRoom
in class ChatRoom
public boolean isActive()
public void processPacket(org.jivesoftware.smack.packet.Stanza stanza)
processPacket
in interface org.jivesoftware.smack.StanzaListener
processPacket
in class ChatRoom
stanza
- the packet.public void setRoomLabel(java.lang.String label)
label
- The new label.public void insertText(java.lang.String text)
text
- the text to insert.public java.util.Collection<java.lang.String> getParticipants()
public void sendMessage()
sendMessage
in class ChatRoom
public void sendMessage(java.lang.String text)
ChatRoom
sendMessage
in class ChatRoom
text
- the text to send.public org.jivesoftware.smackx.muc.MultiUserChat getMultiUserChat()
MultiUserChat
object associated with this room.public void addBlockedUser(java.lang.String usersJID)
usersJID
- the room jid of the user (ex.spark@conference.jivesoftware.com/Dan)public void removeBlockedUser(java.lang.String usersJID)
usersJID
- the jid of the user (ex. spark@conference.jivesoftware.com/Dan)public boolean isBlocked(java.lang.String usersJID)
usersJID
- the jid of the user (ex. spark@conference.jivesoftware.com/Dan)public void inviteUser(java.lang.String jid, java.lang.String message)
jid
- the jid of the user to invite.message
- the message to send with the invitation.public GroupChatParticipantList getConferenceRoomInfo()
public long getLastActivity()
ChatRoom
getLastActivity
in class ChatRoom
public void connected(org.jivesoftware.smack.XMPPConnection xmppConnection)
public void authenticated(org.jivesoftware.smack.XMPPConnection xmppConnection, boolean b)
public void connectionClosed()
connectionClosed
in interface org.jivesoftware.smack.ConnectionListener
connectionClosed
in class ChatRoom
public void connectionClosedOnError(java.lang.Exception ex)
connectionClosedOnError
in interface org.jivesoftware.smack.ConnectionListener
connectionClosedOnError
in class ChatRoom
public void setPassword(java.lang.String password)
public void reconnectionSuccessful()
reconnectionSuccessful
in interface org.jivesoftware.smack.ConnectionListener
reconnectionSuccessful
in class ChatRoom
public java.awt.Color getColor(java.lang.String nickname)
public void notifySettingsAccessRight()
public boolean isChatStatEnabled()
public void setChatStatEnabled(boolean chatStatEnabled)
protected void sendChatState(org.jivesoftware.smackx.chatstates.ChatState state) throws org.jivesoftware.smack.SmackException.NotConnectedException
ChatRoom
sendChatState
in class ChatRoom
state
- the chat state.org.jivesoftware.smack.SmackException.NotConnectedException