2020-12-18 22:54:42 +01:00
|
|
|
import javax.imageio.ImageIO;
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Ecran de démarrage du logiciel
|
|
|
|
|
*/
|
|
|
|
|
public class AppThinkerSplashscreen extends JFrame {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructeur - Crée la fenêtre de démarrage
|
|
|
|
|
*/
|
|
|
|
|
public AppThinkerSplashscreen(){
|
|
|
|
|
this.setTitle("AppThinker - Starting");
|
2021-03-11 18:44:34 +01:00
|
|
|
this.setMinimumSize(new Dimension(600, 300));
|
2020-12-18 22:54:42 +01:00
|
|
|
Image img = null;
|
|
|
|
|
try { img = ImageIO.read(AppThinker.class.getResource("img/logoAppThinker.png")); } catch (Exception ex) { }
|
|
|
|
|
this.setIconImage(img);
|
|
|
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
|
this.setLocationRelativeTo(null);
|
|
|
|
|
this.setUndecorated(true);
|
|
|
|
|
|
|
|
|
|
JPanel panel = new JPanel(){
|
|
|
|
|
@Override
|
|
|
|
|
protected void paintComponent(Graphics g) {
|
|
|
|
|
super.paintComponent(g);
|
|
|
|
|
Graphics2D g2 = (Graphics2D) g;
|
2020-12-22 21:07:52 +01:00
|
|
|
RenderingHints rh = new RenderingHints(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
|
|
|
|
g2.setRenderingHints(rh);
|
2020-12-18 22:54:42 +01:00
|
|
|
Image img = null;
|
|
|
|
|
try { img = ImageIO.read(AppThinker.class.getResource("img/splashscreen.png")); } catch (Exception ex) { }
|
2021-03-11 18:44:34 +01:00
|
|
|
g2.drawImage(img, 0, 0, 600, 300, this);
|
2020-12-18 22:54:42 +01:00
|
|
|
/*Informations du logiciel*/
|
|
|
|
|
g2.setColor(new Color(63, 169, 245));
|
|
|
|
|
g2.setFont(new Font("Arial", Font.BOLD, 40));
|
|
|
|
|
g2.drawString("AppThinker", 305, 45);
|
|
|
|
|
g2.setFont(new Font("Arial", Font.PLAIN, 20));
|
|
|
|
|
g2.drawString("Make your ideas come true", 285, 280);
|
|
|
|
|
g2.setFont(new Font("Arial", Font.BOLD, 10));
|
|
|
|
|
g2.drawString("We're getting things ready...", 5, 295);
|
2020-12-23 11:54:31 +01:00
|
|
|
g2.drawString(AppThinker.developer + " © 2020 - Version " + AppThinker.version, 305, 295);
|
2020-12-18 22:54:42 +01:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getContentPane().add(panel);
|
|
|
|
|
this.setVisible(true);
|
|
|
|
|
}
|
|
|
|
|
}
|