當前位置: 首頁>>代碼示例>>Java>>正文


Java ChannelInfo類代碼示例

本文整理匯總了Java中chatty.util.api.ChannelInfo的典型用法代碼示例。如果您正苦於以下問題:Java ChannelInfo類的具體用法?Java ChannelInfo怎麽用?Java ChannelInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ChannelInfo類屬於chatty.util.api包,在下文中一共展示了ChannelInfo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onBan

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
@Override
        public void onBan(User user, long duration, String reason, String targetMsgId) {
            User localUser = c.getLocalUser(user.getChannel());
//            Matcher m = findId.matcher(reason);
//            String id = null;
//            if (m.find()) {
//                id = m.group();
//                reason = reason.replace(id, "").trim();
//            }
            if (localUser != user && !localUser.hasModeratorRights()) {
                // Remove reason if not the affected user and not a mod, to be
                // consistent with other applications
                reason = "";
            }
            g.userBanned(user, duration, reason, targetMsgId);
            ChannelInfo channelInfo = api.getOnlyCachedChannelInfo(user.getName());
            chatLog.userBanned(user.getChannel(), user.getRegularDisplayNick(),
                    duration, reason, channelInfo);
        }
 
開發者ID:chatty,項目名稱:chatty,代碼行數:20,代碼來源:TwitchClient.java

示例2: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
/**
 * Channel Info received, which happens when Channel Info is requested
 * or when a new status was successfully set.
 * 
 * @param stream Then stream the info is for
 * @param info The channel info
 */
public void setChannelInfo(String stream, ChannelInfo info, TwitchApi.RequestResultCode result) {
    if (stream.equals(this.currentChannel)) {
        if (result == TwitchApi.RequestResultCode.SUCCESS) {
            status.setText(info.getStatus());
            game.setText(info.getGame());
        } else {
            infoLastLoaded = -1;
            if (result == TwitchApi.RequestResultCode.NOT_FOUND) {
                statusLoadError = "Channel not found";
            } else {
                statusLoadError = "";
            }
        }
        loadingStatus = false;
        checkLoadingDone();
    }
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:25,代碼來源:StatusPanel.java

示例3: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
/**
 * Channel Info received, which happens when Channel Info is requested
 * or when a new status was successfully set.
 * 
 * @param stream Then stream the info is for
 * @param info The channel info
 */
public void setChannelInfo(String stream, ChannelInfo info, int result) {
    if (stream.equals(this.currentChannel)) {
        if (result == TwitchApi.SUCCESS) {
            status.setText(info.getStatus());
            game.setText(info.getGame());
            updated.setText("Info last loaded: just now");
            infoLastLoaded = System.currentTimeMillis();
            statusEdited = false;
        } else {
            infoLastLoaded = -1;
            if (result == TwitchApi.NOT_FOUND) {
                updated.setText("Error loading info: Channel not found.");
            } else {
                updated.setText("Error loading info.");
            }
        }
    }
    setLoading(false);
    //finishDialog();
}
 
開發者ID:partouf,項目名稱:Chatty-Twitch-Client,代碼行數:28,代碼來源:AdminDialog.java

示例4: userBanned

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void userBanned(String channel, String nick, long duration,
        String reason, ChannelInfo info) {
    String text = nick;
    if (duration > 0) {
        text += " ("+duration+"s)";
    }
    if (reason != null && !reason.isEmpty()) {
        text += " ["+reason+"]";
    }
    if (info != null) {
        text += " {"+DateTime.formatAccountAge(info.createdAt, Formatting.COMPACT)+"}";
    }
    compact(channel, "BAN", text);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:15,代碼來源:ChatLog.java

示例5: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void setChannelInfo(final String channel, final ChannelInfo info, final RequestResultCode result) {
    SwingUtilities.invokeLater(new Runnable() {

        @Override
        public void run() {
            adminDialog.setChannelInfo(channel, info, result);
            userInfoDialog.setChannelInfo(info);
        }
    });
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:11,代碼來源:MainGui.java

示例6: showInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
private void showInfo() {
    ChannelInfo requestedInfo = owner.getChannelInfo();
    if (requestedInfo == null) {
        addInfo();
        createdAt.setText("Loading..");
        createdAt.setToolTipText(null);
        followers.setText(null);
    } else {
        addInfo();
        setChannelInfo(requestedInfo);
    }
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:13,代碼來源:InfoPanel.java

示例7: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void setChannelInfo(ChannelInfo info) {
    if (infoAdded) {
        createdAt.setText("Registered: "+DateTime.formatAccountAge(info.createdAt, DateTime.Formatting.VERBOSE)+" ago");
        createdAt.setToolTipText("Account created: "+DateTime.formatFullDatetime(info.createdAt));
        followers.setText(" Followers: "+Helper.formatViewerCount(info.followers));
    }
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:8,代碼來源:InfoPanel.java

示例8: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void setChannelInfo(final String channel, final ChannelInfo info, final int result) {
    SwingUtilities.invokeLater(new Runnable() {

        @Override
        public void run() {
            adminDialog.setChannelInfo(channel, info, result);
        }
    });
}
 
開發者ID:partouf,項目名稱:Chatty-Twitch-Client,代碼行數:10,代碼來源:MainGui.java

示例9: receivedChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
@Override
public void receivedChannelInfo(String channel, ChannelInfo info, RequestResultCode result) {
    g.setChannelInfo(channel, info, result);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:5,代碼來源:TwitchClient.java

示例10: putChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void putChannelInfo(ChannelInfo info) {
    client.api.putChannelInfo(info);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:4,代碼來源:MainGui.java

示例11: getCachedChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public ChannelInfo getCachedChannelInfo(String channel, String id) {
    return client.api.getCachedChannelInfo(channel, id);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:4,代碼來源:MainGui.java

示例12: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void setChannelInfo(String channel, ChannelInfo info, RequestResultCode result) {
    statusPanel.setChannelInfo(channel, info, result);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:4,代碼來源:AdminDialog.java

示例13: setChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
public void setChannelInfo(ChannelInfo info) {
    if (info == null || currentUser == null || !currentUser.getName().equals(info.name)) {
        return;
    }
    infoPanel.setChannelInfo(info);
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:7,代碼來源:UserInfo.java

示例14: getChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
protected ChannelInfo getChannelInfo() {
    return owner.getCachedChannelInfo(currentUser.getName(), currentUser.getId());
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:4,代碼來源:UserInfo.java

示例15: receivedChannelInfo

import chatty.util.api.ChannelInfo; //導入依賴的package包/類
@Override
public void receivedChannelInfo(String channel, ChannelInfo info, int result) {
    g.setChannelInfo(channel, info, result);
}
 
開發者ID:partouf,項目名稱:Chatty-Twitch-Client,代碼行數:5,代碼來源:TwitchClient.java


注:本文中的chatty.util.api.ChannelInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。