mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 02:55:39 +00:00
Fix for nonGUI run
This commit is contained in:
@@ -728,8 +728,23 @@ public class View {
|
||||
return table;
|
||||
}
|
||||
|
||||
public static GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
public static GraphicsConfiguration conf = env.getDefaultScreenDevice().getDefaultConfiguration();
|
||||
private static GraphicsEnvironment env;
|
||||
|
||||
public static GraphicsEnvironment getEnv() {
|
||||
if (env == null) {
|
||||
env = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
}
|
||||
return env;
|
||||
}
|
||||
|
||||
private static GraphicsConfiguration conf;
|
||||
|
||||
public static GraphicsConfiguration getDefaultConfiguration() {
|
||||
if (conf == null) {
|
||||
conf = getEnv().getDefaultScreenDevice().getDefaultConfiguration();
|
||||
}
|
||||
return conf;
|
||||
}
|
||||
|
||||
public static BufferedImage toCompatibleImage(BufferedImage image) {
|
||||
if (image.getColorModel().equals(conf.getColorModel())) {
|
||||
|
||||
Reference in New Issue
Block a user