Search in sources :

Example 1 with TabPulse

use of thread.TabPulse in project Botnak by Gocnak.

the class GUIMain method pulseTab.

public synchronized void pulseTab(ChatPane cp) {
    if (shutDown)
        return;
    if (cp.isPulsing())
        return;
    TabPulse tp = new TabPulse(cp);
    tp.start();
    tabPulses.add(tp);
}
Also used : TabPulse(thread.TabPulse)

Example 2 with TabPulse

use of thread.TabPulse in project Botnak by Gocnak.

the class GUIMain method exitButtonActionPerformed.

public void exitButtonActionPerformed() {
    shutDown = true;
    if (viewer != null) {
        viewer.close(false);
    }
    if (bot != null) {
        bot.close(false);
    }
    if (!tabPulses.isEmpty()) {
        tabPulses.forEach(TabPulse::interrupt);
        tabPulses.clear();
    }
    if (systemTrayIcon != null)
        systemTrayIcon.close();
    SoundEngine.getEngine().close();
    Settings.save();
    heartbeat.interrupt();
    ThreadEngine.close();
    Set<Map.Entry<String, ChatPane>> entries = chatPanes.entrySet();
    for (Map.Entry<String, ChatPane> entry : entries) {
        String channel = entry.getKey();
        ChatPane pane = entry.getValue();
        if (Settings.logChat.getValue()) {
            Utils.logChat(pane.getText().split("\\n"), channel, 2);
        }
    }
    System.gc();
    dispose();
    System.exit(0);
}
Also used : CombinedChatPane(gui.CombinedChatPane) ChatPane(gui.ChatPane) TabPulse(thread.TabPulse) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Aggregations

TabPulse (thread.TabPulse)2 ChatPane (gui.ChatPane)1 CombinedChatPane (gui.CombinedChatPane)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1