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);
}
}
Aggregations