svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.ui / src / test / java / org / gvsig / gui / beans / comboboxconfigurablelookup / usertests / JFrameUserTestOfJComboBoxConfigurableLookUp.java @ 40561
History | View | Annotate | Download (4.36 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.gui.beans.comboboxconfigurablelookup.usertests; |
25 |
|
26 |
import java.io.Serializable; |
27 |
|
28 |
import javax.swing.JFrame; |
29 |
|
30 |
import org.gvsig.gui.beans.Messages; |
31 |
import org.gvsig.gui.beans.comboboxconfigurablelookup.JComboBoxConfigurableLookUp; |
32 |
|
33 |
|
34 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
35 |
*
|
36 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
37 |
*
|
38 |
* This program is free software; you can redistribute it and/or
|
39 |
* modify it under the terms of the GNU General Public License
|
40 |
* as published by the Free Software Foundation; either version 2
|
41 |
* of the License, or (at your option) any later version.
|
42 |
*
|
43 |
* This program is distributed in the hope that it will be useful,
|
44 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
45 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
46 |
* GNU General Public License for more details.
|
47 |
*
|
48 |
* You should have received a copy of the GNU General Public License
|
49 |
* along with this program; if not, write to the Free Software
|
50 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
51 |
*
|
52 |
* For more information, contact:
|
53 |
*
|
54 |
* Generalitat Valenciana
|
55 |
* Conselleria d'Infraestructures i Transport
|
56 |
* Av. Blasco Ib??ez, 50
|
57 |
* 46010 VALENCIA
|
58 |
* SPAIN
|
59 |
*
|
60 |
* +34 963862235
|
61 |
* gvsig@gva.es
|
62 |
* www.gvsig.gva.es
|
63 |
*
|
64 |
* or
|
65 |
*
|
66 |
* IVER T.I. S.A
|
67 |
* Salamanca 50
|
68 |
* 46005 Valencia
|
69 |
* Spain
|
70 |
*
|
71 |
* +34 963163400
|
72 |
* dac@iver.es
|
73 |
*/
|
74 |
|
75 |
/**
|
76 |
* <p>Creates and launches an application for testing {@link JComboBoxConfigurableLookUp JComboBoxConfigurableLookUp}.</p>
|
77 |
*
|
78 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es)
|
79 |
* @version 07/02/2008
|
80 |
*/
|
81 |
public class JFrameUserTestOfJComboBoxConfigurableLookUp implements Serializable{ |
82 |
private static final long serialVersionUID = 5760643373469048220L; |
83 |
|
84 |
private JPanelUserTestOfJComboBoxConfigurableLookUp mainPanel = null; |
85 |
private JFrame frame; |
86 |
|
87 |
/**
|
88 |
* <p>Default constructor.</p>
|
89 |
*/
|
90 |
public JFrameUserTestOfJComboBoxConfigurableLookUp() {
|
91 |
createFrame(); |
92 |
} |
93 |
|
94 |
/**
|
95 |
* <p>Creates the main <code>JFrame</code> for execute the application, and adds to it the <code>JPanel</code> test application.</p>
|
96 |
*/
|
97 |
private void createFrame() { |
98 |
// Create: Configuration Frame
|
99 |
frame = new JFrame(); |
100 |
frame.setResizable(false);
|
101 |
frame.setTitle(Messages.getText("jComboBoxConfigurableLookUpByTheUser_frameTitle"));
|
102 |
frame.getContentPane().add(getJPanelUserTestOfJComboBoxConfigurableLookUp()); |
103 |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
104 |
frame.pack(); |
105 |
|
106 |
// Centers the frame in the middle of the screen
|
107 |
frame.setLocationRelativeTo(null);
|
108 |
} |
109 |
|
110 |
/**
|
111 |
* <p>Initializes <code>mainPanel</code>.</p>
|
112 |
*
|
113 |
* @return JPanelUserTestOfJComboBoxConfigurableLookUp
|
114 |
*/
|
115 |
private JPanelUserTestOfJComboBoxConfigurableLookUp getJPanelUserTestOfJComboBoxConfigurableLookUp() {
|
116 |
if (mainPanel == null) { |
117 |
mainPanel = new JPanelUserTestOfJComboBoxConfigurableLookUp();
|
118 |
} |
119 |
|
120 |
return mainPanel;
|
121 |
} |
122 |
|
123 |
/**
|
124 |
* <p>Method for launch the application.</p>
|
125 |
*
|
126 |
* @param args
|
127 |
*/
|
128 |
public static void main(String[] args) { |
129 |
JFrameUserTestOfJComboBoxConfigurableLookUp app = new JFrameUserTestOfJComboBoxConfigurableLookUp();
|
130 |
app.setVisible(true);
|
131 |
} |
132 |
|
133 |
/**
|
134 |
* <p>Sets visible the frame.</p>
|
135 |
*
|
136 |
* @param visible True or false
|
137 |
*/
|
138 |
public void setVisible(boolean visible) { |
139 |
frame.setVisible(visible); |
140 |
} |
141 |
} |