Package com.valhalla.jbother.groupchat

Examples of com.valhalla.jbother.groupchat.ChatRoomPanel


     */
    public void setStatus(Presence.Mode mode, String status) {
        for (int i = 0; i < tabPane.getTabCount(); i++) {
            TabFramePanel panel = (TabFramePanel) tabPane.getTabAt(i).getContentComponent();
            if (panel instanceof ChatRoomPanel) {
                ChatRoomPanel window = (ChatRoomPanel) panel;
                MultiUserChat chat = window.getChat();
                if( chat == null || !chat.isJoined() ) continue;

                //set up a packet to be sent to my user in every groupchat
                Presence presence = new Presence(Presence.Type.AVAILABLE,
                        status, 0, mode);
                presence.setTo(window.getRoomName() + '/'
                        + window.getNickname());

                if (!BuddyList.getInstance().checkConnection()) {
                    BuddyList.getInstance().connectionError();
                    return;
                }
View Full Code Here


     */
    public boolean isRoomOpen(String server) {
        for (int i = 0; i < tabPane.getTabCount(); i++) {
            TabFramePanel panel = (TabFramePanel) tabPane.getTabAt(i).getContentComponent();
            if (panel instanceof ChatRoomPanel) {
                ChatRoomPanel window = (ChatRoomPanel) panel;
                if (server.toLowerCase().equals(
                        window.getRoomName().toLowerCase()))
                    return true;
            }
        }

        return false;
View Full Code Here

     */
    public ChatRoomPanel getChatPanel(String server) {
        for (int i = 0; i < tabPane.getTabCount(); i++) {
            TabFramePanel panel = (TabFramePanel) tabPane.getTabAt(i).getContentComponent();
            if (panel instanceof ChatRoomPanel) {
                ChatRoomPanel window = (ChatRoomPanel) panel;
                if (server.toLowerCase().equals(
                        window.getRoomName().toLowerCase()))
                    return window;
            }
        }

        return null;
View Full Code Here

        int tabCount = tabPane.getTabCount();
        for (int i = 0; i < tabCount; i++) {
            TabFramePanel panel = (TabFramePanel) tabPane.getTabAt(0).getContentComponent();

            if (panel instanceof ChatRoomPanel) {
                ChatRoomPanel window = (ChatRoomPanel) panel;
                //if this frame is closed as a result of connection loss and we
                // try to leave
                //the channel, it will not work, so we need to catch it.
    window.removed();
                try {
                    window.leave();
       
                } catch (IllegalStateException e) {
                    com.valhalla.Logger
                            .debug("Caught Illegal State Exception when leaving window: "
                                    + window.toString());
                }

                BuddyList.getInstance().removeTabPanel(panel);
            } else {
                ((ConversationPanel) panel).checkCloseHandler();
View Full Code Here

                //check to see if it's a private message
                if (BuddyList.getInstance().getTabFrame() != null
                        && BuddyList.getInstance().getTabFrame().isRoomOpen(
                                from.replaceAll("\\/.*", ""))) {
                    ChatRoomPanel window = BuddyList.getInstance()
                            .getTabFrame().getChatPanel(
                                    from.replaceAll("\\/.*", ""));
                    if (window != null)
                        initiatePMSession(window, packet);
                    return;
View Full Code Here

TOP

Related Classes of com.valhalla.jbother.groupchat.ChatRoomPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.