From 1e2d226d36534b66b63d88304adec8d9f61a135e Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 1 May 2018 01:59:29 +0000 Subject: [PATCH] SplashScreen class improvements. --- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- .../java/com/l2jmobius/commons/util/SplashScreen.java | 10 +++++----- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/commons/util/SplashScreen.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/commons/util/SplashScreen.java index 353c081085..80992f1b4d 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/commons/util/SplashScreen.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/commons/util/SplashScreen.java @@ -49,14 +49,14 @@ public class SplashScreen extends JWindow ImageIcon imageIcon = new ImageIcon(image); setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight()); setLocationRelativeTo(null); + setAlwaysOnTop(true); setVisible(true); - // Schedule to dispose. - Executors.newScheduledThreadPool(1).schedule(this::dispose, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); + // Schedule to close. + Executors.newScheduledThreadPool(1).schedule(this::close, imageIcon.getIconWidth() > 0 ? time : 100, TimeUnit.MILLISECONDS); } - @Override - public void dispose() + public void close() { setVisible(false); if (parentFrame != null) @@ -65,9 +65,9 @@ public class SplashScreen extends JWindow parentFrame.setVisible(true); // Focus parent window. parentFrame.toFront(); + parentFrame.setState(Frame.ICONIFIED); parentFrame.setState(Frame.NORMAL); } - super.dispose(); } @Override