root / trunk / applications / appCatalogYNomenclatorClient / src / es / gva / cit / catalogClient / ui / SearchUpperPanel.java @ 3099
History | View | Annotate | Download (7.43 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package es.gva.cit.catalogClient.ui; |
42 |
|
43 |
|
44 |
import java.awt.FlowLayout; |
45 |
import java.awt.GridLayout; |
46 |
|
47 |
import javax.swing.BoxLayout; |
48 |
import javax.swing.JLabel; |
49 |
import javax.swing.JPanel; |
50 |
import javax.swing.JTextField; |
51 |
|
52 |
|
53 |
import javax.swing.JCheckBox; |
54 |
import javax.swing.JButton; |
55 |
import javax.swing.ImageIcon; |
56 |
/**
|
57 |
* @author Jorge Piera Llodra (piera_jor@gva.es)
|
58 |
*/
|
59 |
public class SearchUpperPanel extends JPanel{ |
60 |
private JTextField tituloText = null; |
61 |
private JPanel panelLabTitulo = null; |
62 |
private JLabel tituloLabel = null; |
63 |
private JPanel panelCheckBox = null; |
64 |
private JPanel panelTextTitulo = null; |
65 |
private JCheckBox coordinatesCheckBox = null; |
66 |
private JPanel upperPanel = null; |
67 |
private JPanel upperLeftPanel = null; |
68 |
private JPanel upperRightPanel = null; |
69 |
private JPanel jPanel1 = null; |
70 |
private JButton sizeButton = null; |
71 |
private JPanel jPanel4 = null; |
72 |
/**
|
73 |
* This method initializes
|
74 |
*
|
75 |
*/
|
76 |
public SearchUpperPanel() {
|
77 |
super();
|
78 |
initialize(); |
79 |
} |
80 |
|
81 |
/**
|
82 |
* This method initializes this
|
83 |
*
|
84 |
* @return void
|
85 |
*/
|
86 |
private void initialize() { |
87 |
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
88 |
this.setLocation(0, 0); |
89 |
this.setSize(675, 50); |
90 |
this.add(getUpperPanel(), null); |
91 |
} |
92 |
|
93 |
/**
|
94 |
* This method initializes jTextField
|
95 |
*
|
96 |
* @return javax.swing.JTextField
|
97 |
*/
|
98 |
private JTextField getTituloText() { |
99 |
if (tituloText == null) { |
100 |
tituloText = new JTextField(); |
101 |
tituloText.setPreferredSize(new java.awt.Dimension(300, 20)); |
102 |
} |
103 |
|
104 |
return tituloText;
|
105 |
} |
106 |
|
107 |
/**
|
108 |
* This method initializes jPanel
|
109 |
*
|
110 |
* @return javax.swing.JPanel
|
111 |
*/
|
112 |
private JPanel getPanelLabTitulo() { |
113 |
if (panelLabTitulo == null) { |
114 |
GridLayout gridLayout10 = new GridLayout(); |
115 |
tituloLabel = new JLabel(); |
116 |
panelLabTitulo = new JPanel(); |
117 |
panelLabTitulo.setLayout(gridLayout10); |
118 |
tituloLabel.setText("T?tulo");
|
119 |
gridLayout10.setRows(1);
|
120 |
panelLabTitulo.add(tituloLabel, null);
|
121 |
} |
122 |
|
123 |
return panelLabTitulo;
|
124 |
} |
125 |
|
126 |
/**
|
127 |
* This method initializes jPanel1
|
128 |
*
|
129 |
* @return javax.swing.JPanel
|
130 |
*/
|
131 |
private JPanel getPanelCheckBox() { |
132 |
if (panelCheckBox == null) { |
133 |
panelCheckBox = new JPanel(); |
134 |
panelCheckBox.setLayout(new BoxLayout(panelCheckBox, BoxLayout.X_AXIS)); |
135 |
panelCheckBox.setPreferredSize(new java.awt.Dimension(310,30)); |
136 |
panelCheckBox.add(getCoordinatesCheckBox(), null);
|
137 |
panelCheckBox.add(getJPanel4(), null);
|
138 |
} |
139 |
|
140 |
return panelCheckBox;
|
141 |
} |
142 |
|
143 |
/**
|
144 |
* This method initializes jPanel9
|
145 |
*
|
146 |
* @return javax.swing.JPanel
|
147 |
*/
|
148 |
private JPanel getPanelTextTitulo() { |
149 |
if (panelTextTitulo == null) { |
150 |
panelTextTitulo = new JPanel(); |
151 |
panelTextTitulo.add(getTituloText(), null);
|
152 |
} |
153 |
|
154 |
return panelTextTitulo;
|
155 |
} |
156 |
|
157 |
/* (non-Javadoc)
|
158 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getTitle()
|
159 |
*/
|
160 |
public String getTitle() { |
161 |
if (getTituloText().getText().equals("")) { |
162 |
return null; |
163 |
} |
164 |
|
165 |
return getTituloText().getText();
|
166 |
} |
167 |
|
168 |
/* (non-Javadoc)
|
169 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getRestrictAreaClicked()
|
170 |
*/
|
171 |
public boolean getRestrictAreaClicked() { |
172 |
// TODO Auto-generated method stub
|
173 |
return false; |
174 |
} |
175 |
|
176 |
/* (non-Javadoc)
|
177 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#setTitle(java.lang.String)
|
178 |
*/
|
179 |
public void setTitle(String title) { |
180 |
getTituloText().setText(title); |
181 |
|
182 |
} |
183 |
|
184 |
|
185 |
/**
|
186 |
* This method initializes jCheckBox
|
187 |
*
|
188 |
* @return javax.swing.JCheckBox
|
189 |
*/
|
190 |
public JCheckBox getCoordinatesCheckBox() { |
191 |
if (coordinatesCheckBox == null) { |
192 |
coordinatesCheckBox = new JCheckBox(); |
193 |
coordinatesCheckBox.setText("Restringir el area de B?squeda");
|
194 |
} |
195 |
return coordinatesCheckBox;
|
196 |
} |
197 |
/**
|
198 |
* This method initializes jPanel1
|
199 |
*
|
200 |
* @return javax.swing.JPanel
|
201 |
*/
|
202 |
private JPanel getUpperPanel() { |
203 |
if (upperPanel == null) { |
204 |
upperPanel = new JPanel(); |
205 |
upperPanel.setLayout(new FlowLayout()); |
206 |
upperPanel.setPreferredSize(new java.awt.Dimension(610,50)); |
207 |
upperPanel.add(getUpperLeftPanel(), null);
|
208 |
upperPanel.add(getUpperRightPanel(), null);
|
209 |
} |
210 |
return upperPanel;
|
211 |
} |
212 |
/**
|
213 |
* This method initializes jPanel1
|
214 |
*
|
215 |
* @return javax.swing.JPanel
|
216 |
*/
|
217 |
private JPanel getUpperLeftPanel() { |
218 |
if (upperLeftPanel == null) { |
219 |
upperLeftPanel = new JPanel(); |
220 |
upperLeftPanel.setLayout(new BoxLayout(upperLeftPanel, BoxLayout.Y_AXIS)); |
221 |
upperLeftPanel.setPreferredSize(new java.awt.Dimension(300,45)); |
222 |
upperLeftPanel.add(getPanelLabTitulo(), null);
|
223 |
upperLeftPanel.add(getPanelTextTitulo(), null);
|
224 |
} |
225 |
return upperLeftPanel;
|
226 |
} |
227 |
/**
|
228 |
* This method initializes jPanel4
|
229 |
*
|
230 |
* @return javax.swing.JPanel
|
231 |
*/
|
232 |
private JPanel getUpperRightPanel() { |
233 |
if (upperRightPanel == null) { |
234 |
upperRightPanel = new JPanel(); |
235 |
upperRightPanel.setLayout(new BoxLayout(upperRightPanel, BoxLayout.Y_AXIS)); |
236 |
upperRightPanel.setPreferredSize(new java.awt.Dimension(300,45)); |
237 |
upperRightPanel.add(getJPanel1(), null);
|
238 |
upperRightPanel.add(getPanelCheckBox(), null);
|
239 |
} |
240 |
return upperRightPanel;
|
241 |
} |
242 |
/**
|
243 |
* This method initializes jPanel1
|
244 |
*
|
245 |
* @return javax.swing.JPanel
|
246 |
*/
|
247 |
private JPanel getJPanel1() { |
248 |
if (jPanel1 == null) { |
249 |
jPanel1 = new JPanel(); |
250 |
jPanel1.setPreferredSize(new java.awt.Dimension(37,15)); |
251 |
} |
252 |
return jPanel1;
|
253 |
} |
254 |
/**
|
255 |
* This method initializes jButton
|
256 |
*
|
257 |
* @return javax.swing.JButton
|
258 |
*/
|
259 |
public JButton getSizeButton() { |
260 |
if (sizeButton == null) { |
261 |
sizeButton = new JButton(); |
262 |
sizeButton.setIcon(new ImageIcon("../CatalogClientPrototype/images/down.png")); |
263 |
sizeButton.setPreferredSize(new java.awt.Dimension(18,18)); |
264 |
|
265 |
} |
266 |
return sizeButton;
|
267 |
} |
268 |
/**
|
269 |
* This method initializes jPanel4
|
270 |
*
|
271 |
* @return javax.swing.JPanel
|
272 |
*/
|
273 |
private JPanel getJPanel4() { |
274 |
if (jPanel4 == null) { |
275 |
jPanel4 = new JPanel(); |
276 |
jPanel4.add(getSizeButton(), null);
|
277 |
} |
278 |
return jPanel4;
|
279 |
} |
280 |
public void setUpIcon(){ |
281 |
sizeButton.setIcon(new ImageIcon("../CatalogClientPrototype/images/up.png")); |
282 |
} |
283 |
|
284 |
} // @jve:decl-index=0:visual-constraint="10,10"
|