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


Java NotificationManager类代码示例

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


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

示例1: createGui

import chatty.gui.notifications.NotificationManager; //导入依赖的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.notifications.NotificationManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。