mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-21 17:15:35 +00:00
Errors logging fix
This commit is contained in:
@@ -43,6 +43,7 @@ import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -88,7 +89,7 @@ public class ErrorLogFrame extends AppFrame {
|
||||
}
|
||||
|
||||
private void log(final Level level, final String msg, final String detail) {
|
||||
View.execInEventDispatch(new Runnable() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
JPanel pan = new JPanel();
|
||||
@@ -197,6 +198,7 @@ public class ErrorLogFrame extends AppFrame {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void log(Level level, String msg) {
|
||||
|
||||
@@ -1401,30 +1401,42 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
|
||||
private int pos = 0;
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
if (record.getLevel() == Level.SEVERE) {
|
||||
errorNotificationButton.setIcon(View.getIcon("error16"));
|
||||
errorNotificationButton.setToolTipText(translate("errors.present"));
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
}
|
||||
timer = new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
pos++;
|
||||
if ((pos % 2) == 0) {
|
||||
errorNotificationButton.setIcon(View.getIcon("error16"));
|
||||
} else {
|
||||
errorNotificationButton.setIcon(null);
|
||||
errorNotificationButton.setSize(16, 16);
|
||||
}
|
||||
if (pos >= 4) {
|
||||
cancel();
|
||||
public void publish(final LogRecord record) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (record.getLevel() == Level.SEVERE) {
|
||||
errorNotificationButton.setIcon(View.getIcon("error16"));
|
||||
errorNotificationButton.setToolTipText(translate("errors.present"));
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
}
|
||||
timer = new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
View.execInEventDispatch(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
pos++;
|
||||
if ((pos % 2) == 0 || (pos>=4)) {
|
||||
errorNotificationButton.setIcon(View.getIcon("error16"));
|
||||
} else {
|
||||
errorNotificationButton.setIcon(null);
|
||||
errorNotificationButton.setSize(16, 16);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (pos >= 4) {
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
}, 500, 500);
|
||||
}
|
||||
}, 500, 500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user