当前位置: 首页>>代码示例>>Java>>正文


Java FavoritesDialog类代码示例

本文整理汇总了Java中chatty.gui.components.FavoritesDialog的典型用法代码示例。如果您正苦于以下问题:Java FavoritesDialog类的具体用法?Java FavoritesDialog怎么用?Java FavoritesDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FavoritesDialog类属于chatty.gui.components包,在下文中一共展示了FavoritesDialog类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: chooseFavorites

import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
public Set<String> chooseFavorites(Component owner, String channel) {
    updateFavoritesDialog();
    favoritesDialog.setLocationRelativeTo(owner);
    int result = favoritesDialog.showDialog(channel, "Use chosen channels",
            "Use chosen channel");
    if (result == FavoritesDialog.ACTION_DONE) {
        return favoritesDialog.getChannels();
    }
    return new HashSet<>();
}
 
开发者ID:chatty,项目名称:chatty,代码行数:11,代码来源:MainGui.java

示例2: openFavoritesDialogToJoin

import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
private void openFavoritesDialogToJoin(String channel) {
    updateFavoritesDialog();
    favoritesDialog.setLocationRelativeTo(this);
    int result = favoritesDialog.showDialog(channel, "Join chosen channels",
            "Join chosen channel");
    if (result == FavoritesDialog.ACTION_DONE) {
        Set<String> selectedChannels = favoritesDialog.getChannels();
        client.joinChannels(selectedChannels);
    }
}
 
开发者ID:chatty,项目名称:chatty,代码行数:11,代码来源:MainGui.java

示例3: createGui

import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
/**
 * Creates the gui, run in the EDT.
 */
private void createGui() {

    setWindowIcons();
    
    actionListener = new MyActionListener();
    
    debugWindow = new DebugWindow(new DebugCheckboxListener());
    connectionDialog = new ConnectionDialog(this);
    tokenDialog = new TokenDialog(this);
    tokenGetDialog = new TokenGetDialog(this);
    userInfoDialog = new UserInfo(this, contextMenuListener);
    aboutDialog = new About();
    setHelpWindowIcons();
    channelInfoDialog = new ChannelInfoDialog(this);
    channelInfoDialog.addContextMenuListener(contextMenuListener);
    settingsDialog = new SettingsDialog(this,client.settings);
    adminDialog = new AdminDialog(this);
    favoritesDialog = new FavoritesDialog(this);
    joinDialog = new JoinDialog(this);
    searchDialog = new SearchDialog(this);
    GuiUtil.installEscapeCloseOperation(searchDialog);
    liveStreamsDialog = new LiveStreamsDialog(contextMenuListener);
    setLiveStreamsWindowIcons();
    //GuiUtil.installEscapeCloseOperation(liveStreamsDialog);
    errorMessage = new ErrorMessage(this, linkLabelListener);
    
    trayIcon = new TrayIconManager(createImage("app_16.png"));
    trayIcon.addActionListener(new TrayMenuListener());
    notificationManager = new NotificationManager<>(this);
    notificationManager.setNotificationActionListener(new MyNotificationActionListener());

    styleManager = new StyleManager(client.settings);
    
    highlightedMessages = new HighlightedMessages(this, styleManager);
    highlightedMessages.setContextMenuListener(contextMenuListener);
    
    channels = new Channels(this,styleManager, contextMenuListener);
    channels.getComponent().setPreferredSize(new Dimension(600,300));
    add(channels.getComponent(), BorderLayout.CENTER);
    channels.addTabChangeListener(new TabChangeListener());
    
    addressbookDialog = new AddressbookDialog(this, client.addressbook);

    //dialogs = new DialogManager(this, channels);
    
    client.settings.setSettingChangeListener(new MySettingChangeListener());
    
    this.getContentPane().setBackground(new Color(0,0,0,0));

    MenuListener menuListener = new MenuListener();
    menu = new MainMenu(menuListener,menuListener);
    setJMenuBar(menu);

    state.update();
    
    addListeners();
    
    
    pack();
    setLocationByPlatform(true);
    
    
    client.api.requestEmoticons();
    
    windowStateManager = new WindowStateManager(this, client.settings);
    windowStateManager.addWindow(this, "main", true, true);
    windowStateManager.setPrimaryWindow(this);
    windowStateManager.addWindow(highlightedMessages, "highlights", true, true);
    windowStateManager.addWindow(channelInfoDialog, "channelInfo", true, true);
    windowStateManager.addWindow(liveStreamsDialog, "liveStreams", true, true);
    windowStateManager.addWindow(adminDialog, "admin", true, true);
    windowStateManager.addWindow(addressbookDialog, "addressbook", true, true);
}
 
开发者ID:pokemane,项目名称:TwitchChatClient,代码行数:77,代码来源:MainGui.java


注:本文中的chatty.gui.components.FavoritesDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。