Statistics
| Revision:

root / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / ui / raster / ProgressSaveRasterPanel.java @ 2669

History | View | Annotate | Download (3.46 KB)

1
/*
2
 * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
3
 *
4
 * Copyright (C) 2004-5.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 * cresques@gmail.com
23
 */
24
package org.cresques.ui.raster;
25

    
26
import java.awt.BorderLayout;
27

    
28
import javax.swing.JLabel;
29
import javax.swing.JPanel;
30
import javax.swing.JProgressBar;
31

    
32

    
33
/**
34
 * Panel que contiene la barra de progreso para salvar a raster
35
 * @author Nacho Brodin <brodin_ign@gva.es>
36
 */
37
public class ProgressSaveRasterPanel extends JPanel {
38
    final private static long serialVersionUID = -3370601314380922368L;
39
    private JPanel jPanel = null;
40
    private JProgressBar jProgressBar = null;
41

    
42
    /**
43
     * Label p?blico accesible para su traducci?n
44
     */
45
    public JLabel wait = null;
46
    private JPanel jPanel2 = null;
47
    private JPanel jPanel1 = null;
48

    
49
    /**
50
     * This method initializes
51
     *
52
     */
53
    public ProgressSaveRasterPanel() {
54
        super();
55
        initialize();
56
    }
57

    
58
    /**
59
     * This method initializes this
60
     *
61
     * @return void
62
     */
63
    private void initialize() {
64
        this.setSize(369, 106);
65
        this.add(getJPanel(), null);
66
    }
67

    
68
    /**
69
     * This method initializes jPanel
70
     *
71
     * @return javax.swing.JPanel
72
     */
73
    private JPanel getJPanel() {
74
        if (jPanel == null) {
75
            wait = new JLabel();
76
            jPanel = new JPanel();
77
            jPanel.setLayout(new BorderLayout());
78
            jPanel.setPreferredSize(new java.awt.Dimension(354, 70));
79
            wait.setText("Por favor, espere ...");
80
            jPanel.add(wait, java.awt.BorderLayout.NORTH);
81
            jPanel.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
82
            jPanel.add(getJPanel1(), java.awt.BorderLayout.CENTER);
83
        }
84

    
85
        return jPanel;
86
    }
87

    
88
    /**
89
     * This method initializes jProgressBar
90
     *
91
     * @return javax.swing.JProgressBar
92
     */
93
    public JProgressBar getJProgressBar() {
94
        if (jProgressBar == null) {
95
            jProgressBar = new JProgressBar();
96
            jProgressBar.setVisible(true);
97
            jProgressBar.show();
98
            jProgressBar.setValue(0);
99
            jProgressBar.setPreferredSize(new java.awt.Dimension(350, 25));
100
        }
101

    
102
        return jProgressBar;
103
    }
104

    
105
    /**
106
     * This method initializes jPanel2
107
     *
108
     * @return javax.swing.JPanel
109
     */
110
    private JPanel getJPanel2() {
111
        if (jPanel2 == null) {
112
            jPanel2 = new JPanel();
113
            jPanel2.add(getJProgressBar(), null);
114
        }
115

    
116
        return jPanel2;
117
    }
118

    
119
    /**
120
     * This method initializes jPanel1
121
     *
122
     * @return javax.swing.JPanel
123
     */
124
    private JPanel getJPanel1() {
125
        if (jPanel1 == null) {
126
            jPanel1 = new JPanel();
127
        }
128

    
129
        return jPanel1;
130
    }
131
} //  @jve:decl-index=0:visual-constraint="10,10"