mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Tweaks to SplashScreen
This commit is contained in:
parent
dbb9e7feee
commit
66421c88f9
1 changed files with 18 additions and 3 deletions
|
@ -23,6 +23,8 @@ import javax.swing.*;
|
||||||
import javax.swing.border.BevelBorder;
|
import javax.swing.border.BevelBorder;
|
||||||
import javax.swing.border.CompoundBorder;
|
import javax.swing.border.CompoundBorder;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import generic.application.GenericApplicationLayout;
|
import generic.application.GenericApplicationLayout;
|
||||||
|
@ -318,8 +320,20 @@ public class SplashScreen extends JWindow {
|
||||||
updateStatus(status);
|
updateStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void clearStatus() {
|
||||||
|
updateSplashScreenStatus(null);
|
||||||
|
}
|
||||||
|
|
||||||
private static void updateStatus(String status) {
|
private static void updateStatus(String status) {
|
||||||
Swing.runIfSwingOrRunLater(() -> statusLabel.setText(status));
|
// empty strings causes label to lose its height
|
||||||
|
String message = StringUtils.isBlank(status) ? " " : status;
|
||||||
|
Swing.runIfSwingOrRunLater(() -> {
|
||||||
|
statusLabel.setText(message);
|
||||||
|
Rectangle bounds = statusLabel.getBounds();
|
||||||
|
bounds.x = 0;
|
||||||
|
bounds.y = 0;
|
||||||
|
statusLabel.paintImmediately(bounds);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private JPanel createMainPanel() {
|
private JPanel createMainPanel() {
|
||||||
|
@ -415,4 +429,5 @@ public class SplashScreen extends JWindow {
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue