當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。