OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 41 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
9
 * language governing permissions and limitations under the License.
Line 13... Line 13...
13
 
13
 
14
 package org.openconcerto.erp.config;
14
 package org.openconcerto.erp.config;
15
 
15
 
16
import org.openconcerto.ui.ReloadPanel;
16
import org.openconcerto.ui.ReloadPanel;
17
 
17
 
-
 
18
import java.awt.Color;
18
import java.awt.FlowLayout;
19
import java.awt.FlowLayout;
-
 
20
import java.awt.Font;
-
 
21
import java.awt.Graphics2D;
-
 
22
import java.awt.RenderingHints;
-
 
23
import java.awt.SplashScreen;
19
 
24
 
20
import javax.swing.JDialog;
25
import javax.swing.JDialog;
21
import javax.swing.JLabel;
26
import javax.swing.JLabel;
22
import javax.swing.JPanel;
27
import javax.swing.JPanel;
23
 
28
 
Line 25... Line 30...
25
    public InProgressFrame() {
30
    public InProgressFrame() {
26
 
31
 
27
    }
32
    }
28
 
33
 
29
    public void show(String title) {
34
    public void show(String title) {
-
 
35
        try {
-
 
36
            final SplashScreen splash = SplashScreen.getSplashScreen();
-
 
37
            if (splash != null) {
-
 
38
                Graphics2D g = splash.createGraphics();
-
 
39
                g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
-
 
40
                g.setColor(Color.WHITE);
-
 
41
                g.fillRect(0, (int) splash.getSize().getHeight() - 24, (int) splash.getSize().getWidth(), 24);
-
 
42
                g.setFont(g.getFont().deriveFont(Font.BOLD).deriveFont(11f));
-
 
43
                g.setColor(Color.DARK_GRAY);
-
 
44
                g.drawString(title, 20, ((int) splash.getSize().getHeight()) - 8);
-
 
45
 
-
 
46
                splash.update();
-
 
47
                return;
-
 
48
            }
-
 
49
        } catch (Throwable e) {
-
 
50
            // OpenJDK bug on linux
-
 
51
            e.printStackTrace();
-
 
52
        }
-
 
53
 
30
        setTitle("Veuillez patienter");
54
        setTitle("Veuillez patienter");
31
        JPanel p = new JPanel();
55
        JPanel p = new JPanel();
32
        p.setLayout(new FlowLayout(FlowLayout.LEADING, 5, 5));
56
        p.setLayout(new FlowLayout(FlowLayout.LEADING, 5, 5));
33
        final ReloadPanel rlPanel = new ReloadPanel();
57
        final ReloadPanel rlPanel = new ReloadPanel();
34
        rlPanel.setMode(ReloadPanel.MODE_ROTATE);
58
        rlPanel.setMode(ReloadPanel.MODE_ROTATE);