mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 15:14:49 +00:00
Base class for DefineXTags, getting the images, fonts, text from the characterMap instead of iterating over all tags
This commit is contained in:
@@ -960,28 +960,30 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
synchronized (ImagePanel.class) {
|
||||
if (timer != thisTimer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isSingleFrame) {
|
||||
drawFrame(thisTimer);
|
||||
while (true) {
|
||||
try {
|
||||
synchronized (ImagePanel.class) {
|
||||
thisTimer.cancel();
|
||||
if (timer == thisTimer) {
|
||||
timer = null;
|
||||
if (timer != thisTimer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fireMediaDisplayStateChanged();
|
||||
} else {
|
||||
nextFrame(thisTimer);
|
||||
if (isSingleFrame) {
|
||||
drawFrame(thisTimer);
|
||||
synchronized (ImagePanel.class) {
|
||||
thisTimer.cancel();
|
||||
if (timer == thisTimer) {
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
fireMediaDisplayStateChanged();
|
||||
} else {
|
||||
nextFrame(thisTimer);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ImagePanel.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ImagePanel.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -989,7 +991,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
if (singleFrame) {
|
||||
timer.schedule(task, 0);
|
||||
} else {
|
||||
timer.schedule(task, 0, msPerFrame);
|
||||
timer.schedule(task, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user