当前位置: 首页>>代码示例>>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;未经允许,请勿转载。