Search in sources :

Example 11 with User

use of chatty.User in project chatty by chatty.

the class ChannelTextPane method getUserElementFromLine.

private Element getUserElementFromLine(Element line) {
    for (int i = 0; i < 20; i++) {
        if (i > line.getElementCount()) {
            break;
        }
        Element element = line.getElement(i);
        User elementUser = getUserFromElement(element);
        // If there is a User object, we're done
        if (elementUser != null) {
            return element;
        }
    }
    // No User object was found, so it's probably not a chat message
    return null;
}
Also used : EmoticonUser(chatty.util.api.Emoticon.EmoticonUser) User(chatty.User)

Aggregations

User (chatty.User)11 EmoticonUser (chatty.util.api.Emoticon.EmoticonUser)4 UserContextMenu (chatty.gui.components.menus.UserContextMenu)2 EmoticonImage (chatty.util.api.Emoticon.EmoticonImage)2 Usericon (chatty.util.api.usericons.Usericon)2 UserListener (chatty.gui.UserListener)1 Channel (chatty.gui.components.Channel)1 ChannelContextMenu (chatty.gui.components.menus.ChannelContextMenu)1 EmoteContextMenu (chatty.gui.components.menus.EmoteContextMenu)1 UrlContextMenu (chatty.gui.components.menus.UrlContextMenu)1 UsericonContextMenu (chatty.gui.components.menus.UsericonContextMenu)1 UserMessage (chatty.gui.components.textpane.UserMessage)1 TagEmotes (chatty.util.api.Emoticons.TagEmotes)1 JPopupMenu (javax.swing.JPopupMenu)1 Test (org.junit.Test)1