Search in sources :

Example 1 with EmojiWorker

use of com.glitchcog.fontificator.gui.emoji.EmojiWorker in project ChatGameFontificator by GlitchCog.

the class ControlPanelEmoji method loadEmojiWork.

/**
     * Queue the work of a specified operation (load or cache) on a specified type of emote (Twitch or FrankerFaceZ).
     * Call runEmoteWork to run the loaded work in series.
     * 
     * @param types
     * @param ops
     */
private void loadEmojiWork(Collection<EmojiJob> jobs) {
    for (EmojiJob job : jobs) {
        EmojiWorkerReport initialReport = new EmojiWorkerReport(job.toString(), 0);
        // A SwingWorkers can only be run once because... reasons. So each call to do work must be on a freshly
        // instantiated worker object.
        EmojiWorker worker = new EmojiWorker(chat.getEmojiManager(), progressPanel, job, logBox, initialReport);
        progressPanel.addWorkToQueue(worker);
    }
}
Also used : EmojiWorker(com.glitchcog.fontificator.gui.emoji.EmojiWorker) EmojiWorkerReport(com.glitchcog.fontificator.gui.emoji.EmojiWorkerReport) EmojiJob(com.glitchcog.fontificator.emoji.EmojiJob)

Aggregations

EmojiJob (com.glitchcog.fontificator.emoji.EmojiJob)1 EmojiWorker (com.glitchcog.fontificator.gui.emoji.EmojiWorker)1 EmojiWorkerReport (com.glitchcog.fontificator.gui.emoji.EmojiWorkerReport)1