Revision 8962
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.busquedacatastral.swing</artifactId> |
|
6 |
<version>1.0.177</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.busquedacatastral.swing.impl</artifactId> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
|
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.busquedacatastral.swing.api</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
|
|
18 |
<dependency> |
|
19 |
<groupId>com.jgoodies</groupId> |
|
20 |
<artifactId>jgoodies-forms</artifactId> |
|
21 |
</dependency> |
|
22 |
</dependencies> |
|
23 |
</project> |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/DefaultBusquedaCatastralConsultaCatastralPanelView.java | ||
---|---|---|
1 |
package org.gvsig.busquedacatastral.swing.impl; |
|
2 |
|
|
3 |
import com.jgoodies.forms.layout.CellConstraints; |
|
4 |
import com.jgoodies.forms.layout.FormLayout; |
|
5 |
import java.awt.BorderLayout; |
|
6 |
import java.awt.ComponentOrientation; |
|
7 |
import java.awt.Container; |
|
8 |
import java.awt.Dimension; |
|
9 |
import javax.swing.Box; |
|
10 |
import javax.swing.ButtonGroup; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JButton; |
|
13 |
import javax.swing.JComboBox; |
|
14 |
import javax.swing.JFrame; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JList; |
|
17 |
import javax.swing.JPanel; |
|
18 |
import javax.swing.JRadioButton; |
|
19 |
import javax.swing.JScrollPane; |
|
20 |
import javax.swing.JTextField; |
|
21 |
|
|
22 |
|
|
23 |
public class DefaultBusquedaCatastralConsultaCatastralPanelView extends JPanel |
|
24 |
{ |
|
25 |
JList listReferenciasCatastrales = new JList(); |
|
26 |
JRadioButton rbtnReferenciaCatastral = new JRadioButton(); |
|
27 |
ButtonGroup buttongroup1 = new ButtonGroup(); |
|
28 |
JRadioButton rbtnLocalizacion = new JRadioButton(); |
|
29 |
JLabel lblReferenciaCatastral = new JLabel(); |
|
30 |
JLabel lblLocalizacion = new JLabel(); |
|
31 |
JTextField txtReferenciaCatastral = new JTextField(); |
|
32 |
JRadioButton rbtnUrbanos = new JRadioButton(); |
|
33 |
ButtonGroup buttongroup2 = new ButtonGroup(); |
|
34 |
JRadioButton rbtnRusticos = new JRadioButton(); |
|
35 |
JLabel lblUrbanos = new JLabel(); |
|
36 |
JLabel lblRusticos = new JLabel(); |
|
37 |
JLabel lblMunicipio = new JLabel(); |
|
38 |
JLabel lblProvincia = new JLabel(); |
|
39 |
JComboBox cmbProvincia = new JComboBox(); |
|
40 |
JTextField txtMunicipio = new JTextField(); |
|
41 |
JLabel lblVia = new JLabel(); |
|
42 |
JLabel lblNumero = new JLabel(); |
|
43 |
JLabel lblBloque = new JLabel(); |
|
44 |
JLabel lblPoligono = new JLabel(); |
|
45 |
JComboBox cmbTipoVia = new JComboBox(); |
|
46 |
JTextField txtNumero = new JTextField(); |
|
47 |
JTextField txtBloque = new JTextField(); |
|
48 |
JTextField txtPoligono = new JTextField(); |
|
49 |
JTextField txtEscalera = new JTextField(); |
|
50 |
JTextField txtParcela = new JTextField(); |
|
51 |
JTextField txtVia = new JTextField(); |
|
52 |
JButton btnMunicipios = new JButton(); |
|
53 |
JButton btnVias = new JButton(); |
|
54 |
JLabel lblPlanta = new JLabel(); |
|
55 |
JTextField txtPlanta = new JTextField(); |
|
56 |
JTextField txtPuerta = new JTextField(); |
|
57 |
JButton btnBuscar = new JButton(); |
|
58 |
JButton btnLocalizar = new JButton(); |
|
59 |
JButton btnCancelar = new JButton(); |
|
60 |
JButton btnVerDatos = new JButton(); |
|
61 |
JButton btnNumeros = new JButton(); |
|
62 |
JLabel lblEscalera = new JLabel(); |
|
63 |
JLabel lblParcela = new JLabel(); |
|
64 |
JButton btnBorrarPuntos = new JButton(); |
|
65 |
JButton btnBorrarCache = new JButton(); |
|
66 |
JLabel lblPuerta = new JLabel(); |
|
67 |
|
|
68 |
/** |
|
69 |
* Default constructor |
|
70 |
*/ |
|
71 |
public DefaultBusquedaCatastralConsultaCatastralPanelView() |
|
72 |
{ |
|
73 |
initializePanel(); |
|
74 |
} |
|
75 |
|
|
76 |
/** |
|
77 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
78 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
79 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
80 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
81 |
*/ |
|
82 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
83 |
{ |
|
84 |
Dimension filler = new Dimension(10,10); |
|
85 |
|
|
86 |
boolean filled_cell_11 = false; |
|
87 |
CellConstraints cc = new CellConstraints(); |
|
88 |
if ( cols.length > 0 && rows.length > 0 ) |
|
89 |
{ |
|
90 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
91 |
{ |
|
92 |
/** add a rigid area */ |
|
93 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
94 |
filled_cell_11 = true; |
|
95 |
} |
|
96 |
} |
|
97 |
|
|
98 |
for( int index = 0; index < cols.length; index++ ) |
|
99 |
{ |
|
100 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
101 |
{ |
|
102 |
continue; |
|
103 |
} |
|
104 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
105 |
} |
|
106 |
|
|
107 |
for( int index = 0; index < rows.length; index++ ) |
|
108 |
{ |
|
109 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
110 |
{ |
|
111 |
continue; |
|
112 |
} |
|
113 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
114 |
} |
|
115 |
|
|
116 |
} |
|
117 |
|
|
118 |
/** |
|
119 |
* Helper method to load an image file from the CLASSPATH |
|
120 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
121 |
* @return an ImageIcon instance with the specified image file |
|
122 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
123 |
*/ |
|
124 |
public ImageIcon loadImage( String imageName ) |
|
125 |
{ |
|
126 |
try |
|
127 |
{ |
|
128 |
ClassLoader classloader = getClass().getClassLoader(); |
|
129 |
java.net.URL url = classloader.getResource( imageName ); |
|
130 |
if ( url != null ) |
|
131 |
{ |
|
132 |
ImageIcon icon = new ImageIcon( url ); |
|
133 |
return icon; |
|
134 |
} |
|
135 |
} |
|
136 |
catch( Exception e ) |
|
137 |
{ |
|
138 |
e.printStackTrace(); |
|
139 |
} |
|
140 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* Method for recalculating the component orientation for |
|
145 |
* right-to-left Locales. |
|
146 |
* @param orientation the component orientation to be applied |
|
147 |
*/ |
|
148 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
149 |
{ |
|
150 |
// Not yet implemented... |
|
151 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
152 |
super.applyComponentOrientation(orientation); |
|
153 |
} |
|
154 |
|
|
155 |
public JPanel createPanel() |
|
156 |
{ |
|
157 |
JPanel jpanel1 = new JPanel(); |
|
158 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:69PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:54PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:65PX:NONE,FILL:4DLU:NONE,FILL:24PX:NONE,FILL:4DLU:NONE,FILL:11DLU:NONE,FILL:4DLU:NONE,FILL:30DLU:NONE,FILL:4DLU:NONE,FILL:31PX:NONE,FILL:4DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:12DLU:NONE,FILL:4DLU:NONE,FILL:45PX:NONE,FILL:4DLU:NONE,FILL:46PX:NONE,FILL:4DLU:NONE,FILL:43PX:NONE,FILL:4DLU:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
|
159 |
CellConstraints cc = new CellConstraints(); |
|
160 |
jpanel1.setLayout(formlayout1); |
|
161 |
|
|
162 |
listReferenciasCatastrales.setName("listReferenciasCatastrales"); |
|
163 |
JScrollPane jscrollpane1 = new JScrollPane(); |
|
164 |
jscrollpane1.setViewportView(listReferenciasCatastrales); |
|
165 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
|
166 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
167 |
jpanel1.add(jscrollpane1,cc.xywh(4,24,30,1)); |
|
168 |
|
|
169 |
rbtnReferenciaCatastral.setActionCommand("JRadioButton"); |
|
170 |
rbtnReferenciaCatastral.setName("rbtnReferenciaCatastral"); |
|
171 |
buttongroup1.add(rbtnReferenciaCatastral); |
|
172 |
jpanel1.add(rbtnReferenciaCatastral,cc.xy(2,2)); |
|
173 |
|
|
174 |
rbtnLocalizacion.setActionCommand("JRadioButton"); |
|
175 |
rbtnLocalizacion.setName("rbtnLocalizacion"); |
|
176 |
buttongroup1.add(rbtnLocalizacion); |
|
177 |
jpanel1.add(rbtnLocalizacion,cc.xy(2,4)); |
|
178 |
|
|
179 |
lblReferenciaCatastral.setName("lblReferenciaCatastral"); |
|
180 |
lblReferenciaCatastral.setText("_referencia_catastral"); |
|
181 |
jpanel1.add(lblReferenciaCatastral,cc.xywh(4,2,6,1)); |
|
182 |
|
|
183 |
lblLocalizacion.setName("lblLocalizacion"); |
|
184 |
lblLocalizacion.setText("_localizacion"); |
|
185 |
jpanel1.add(lblLocalizacion,cc.xywh(4,4,31,1)); |
|
186 |
|
|
187 |
txtReferenciaCatastral.setName("txtReferenciaCatastral"); |
|
188 |
jpanel1.add(txtReferenciaCatastral,cc.xywh(11,2,19,1)); |
|
189 |
|
|
190 |
rbtnUrbanos.setActionCommand("JRadioButton"); |
|
191 |
rbtnUrbanos.setName("rbtnUrbanos"); |
|
192 |
buttongroup2.add(rbtnUrbanos); |
|
193 |
jpanel1.add(rbtnUrbanos,cc.xy(5,10)); |
|
194 |
|
|
195 |
rbtnRusticos.setActionCommand("JRadioButton"); |
|
196 |
rbtnRusticos.setName("rbtnRusticos"); |
|
197 |
buttongroup2.add(rbtnRusticos); |
|
198 |
jpanel1.add(rbtnRusticos,cc.xy(5,18)); |
|
199 |
|
|
200 |
lblUrbanos.setName("lblUrbanos"); |
|
201 |
lblUrbanos.setText("_urbanos"); |
|
202 |
jpanel1.add(lblUrbanos,cc.xy(7,10)); |
|
203 |
|
|
204 |
lblRusticos.setName("lblRusticos"); |
|
205 |
lblRusticos.setText("_rusticos"); |
|
206 |
jpanel1.add(lblRusticos,cc.xy(7,18)); |
|
207 |
|
|
208 |
lblMunicipio.setName("lblMunicipio"); |
|
209 |
lblMunicipio.setText("_municipio"); |
|
210 |
jpanel1.add(lblMunicipio,cc.xywh(5,8,3,1)); |
|
211 |
|
|
212 |
lblProvincia.setName("lblProvincia"); |
|
213 |
lblProvincia.setText("_provincia"); |
|
214 |
jpanel1.add(lblProvincia,cc.xywh(5,6,3,1)); |
|
215 |
|
|
216 |
cmbProvincia.setName("cmbProvincia"); |
|
217 |
jpanel1.add(cmbProvincia,cc.xywh(9,6,6,1)); |
|
218 |
|
|
219 |
txtMunicipio.setName("txtMunicipio"); |
|
220 |
jpanel1.add(txtMunicipio,cc.xywh(9,8,10,1)); |
|
221 |
|
|
222 |
lblVia.setName("lblVia"); |
|
223 |
lblVia.setText("_via"); |
|
224 |
jpanel1.add(lblVia,cc.xy(9,12)); |
|
225 |
|
|
226 |
lblNumero.setName("lblNumero"); |
|
227 |
lblNumero.setText("_numero"); |
|
228 |
jpanel1.add(lblNumero,cc.xy(9,14)); |
|
229 |
|
|
230 |
lblBloque.setName("lblBloque"); |
|
231 |
lblBloque.setText("_bloque"); |
|
232 |
jpanel1.add(lblBloque,cc.xy(9,16)); |
|
233 |
|
|
234 |
lblPoligono.setName("lblPoligono"); |
|
235 |
lblPoligono.setText("_poligono"); |
|
236 |
jpanel1.add(lblPoligono,cc.xy(9,20)); |
|
237 |
|
|
238 |
cmbTipoVia.setName("cmbTipoVia"); |
|
239 |
jpanel1.add(cmbTipoVia,cc.xywh(11,12,7,1)); |
|
240 |
|
|
241 |
txtNumero.setName("txtNumero"); |
|
242 |
jpanel1.add(txtNumero,cc.xy(11,14)); |
|
243 |
|
|
244 |
txtBloque.setName("txtBloque"); |
|
245 |
jpanel1.add(txtBloque,cc.xy(11,16)); |
|
246 |
|
|
247 |
txtPoligono.setName("txtPoligono"); |
|
248 |
jpanel1.add(txtPoligono,cc.xy(11,20)); |
|
249 |
|
|
250 |
txtEscalera.setName("txtEscalera"); |
|
251 |
jpanel1.add(txtEscalera,cc.xywh(16,16,3,1)); |
|
252 |
|
|
253 |
txtParcela.setName("txtParcela"); |
|
254 |
jpanel1.add(txtParcela,cc.xywh(16,20,3,1)); |
|
255 |
|
|
256 |
txtVia.setName("txtVia"); |
|
257 |
jpanel1.add(txtVia,cc.xywh(19,12,11,1)); |
|
258 |
|
|
259 |
btnMunicipios.setActionCommand("JButton"); |
|
260 |
btnMunicipios.setName("btnMunicipios"); |
|
261 |
btnMunicipios.setText("_municipios"); |
|
262 |
jpanel1.add(btnMunicipios,cc.xywh(20,8,6,1)); |
|
263 |
|
|
264 |
btnVias.setActionCommand("JButton"); |
|
265 |
btnVias.setName("btnVias"); |
|
266 |
btnVias.setText("_vias"); |
|
267 |
jpanel1.add(btnVias,cc.xywh(31,12,3,1)); |
|
268 |
|
|
269 |
lblPlanta.setName("lblPlanta"); |
|
270 |
lblPlanta.setText("_planta"); |
|
271 |
jpanel1.add(lblPlanta,cc.xy(20,16)); |
|
272 |
|
|
273 |
txtPlanta.setName("txtPlanta"); |
|
274 |
jpanel1.add(txtPlanta,cc.xy(22,16)); |
|
275 |
|
|
276 |
txtPuerta.setName("txtPuerta"); |
|
277 |
jpanel1.add(txtPuerta,cc.xy(29,16)); |
|
278 |
|
|
279 |
btnBuscar.setActionCommand("JButton"); |
|
280 |
btnBuscar.setName("btnBuscar"); |
|
281 |
btnBuscar.setText("_buscar"); |
|
282 |
jpanel1.add(btnBuscar,cc.xywh(31,22,3,1)); |
|
283 |
|
|
284 |
btnLocalizar.setActionCommand("JButton"); |
|
285 |
btnLocalizar.setName("btnLocalizar"); |
|
286 |
btnLocalizar.setText("_localizar"); |
|
287 |
jpanel1.add(btnLocalizar,cc.xywh(25,26,5,1)); |
|
288 |
|
|
289 |
btnCancelar.setActionCommand("JButton"); |
|
290 |
btnCancelar.setName("btnCancelar"); |
|
291 |
btnCancelar.setText("_cancelar"); |
|
292 |
jpanel1.add(btnCancelar,cc.xywh(31,26,3,1)); |
|
293 |
|
|
294 |
btnVerDatos.setActionCommand("JButton"); |
|
295 |
btnVerDatos.setName("btnVerDatos"); |
|
296 |
btnVerDatos.setText("_ver_datos"); |
|
297 |
jpanel1.add(btnVerDatos,cc.xywh(14,26,3,1)); |
|
298 |
|
|
299 |
btnNumeros.setActionCommand("JButton"); |
|
300 |
btnNumeros.setName("btnNumeros"); |
|
301 |
btnNumeros.setText("_numeros"); |
|
302 |
jpanel1.add(btnNumeros,cc.xywh(13,14,4,1)); |
|
303 |
|
|
304 |
lblEscalera.setName("lblEscalera"); |
|
305 |
lblEscalera.setText("_escalera"); |
|
306 |
jpanel1.add(lblEscalera,cc.xywh(13,16,2,1)); |
|
307 |
|
|
308 |
lblParcela.setName("lblParcela"); |
|
309 |
lblParcela.setText("_parcela"); |
|
310 |
jpanel1.add(lblParcela,cc.xywh(13,20,2,1)); |
|
311 |
|
|
312 |
btnBorrarPuntos.setActionCommand("JButton"); |
|
313 |
btnBorrarPuntos.setName("btnBorrarPuntos"); |
|
314 |
btnBorrarPuntos.setText("_borrar_puntos"); |
|
315 |
jpanel1.add(btnBorrarPuntos,cc.xywh(18,26,6,1)); |
|
316 |
|
|
317 |
btnBorrarCache.setActionCommand("JButton"); |
|
318 |
btnBorrarCache.setName("btnBorrarCache"); |
|
319 |
btnBorrarCache.setText("_borrar_cache"); |
|
320 |
jpanel1.add(btnBorrarCache,cc.xywh(24,22,6,1)); |
|
321 |
|
|
322 |
lblPuerta.setName("lblPuerta"); |
|
323 |
lblPuerta.setText("_puerta"); |
|
324 |
jpanel1.add(lblPuerta,cc.xywh(24,16,4,1)); |
|
325 |
|
|
326 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 }); |
|
327 |
return jpanel1; |
|
328 |
} |
|
329 |
|
|
330 |
/** |
|
331 |
* Initializer |
|
332 |
*/ |
|
333 |
protected void initializePanel() |
|
334 |
{ |
|
335 |
setLayout(new BorderLayout()); |
|
336 |
add(createPanel(), BorderLayout.CENTER); |
|
337 |
} |
|
338 |
|
|
339 |
|
|
340 |
} |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/TipoViaCellRenderer.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2015 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.lrs.swing.impl |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.busquedacatastral.swing.impl; |
|
8 |
|
|
9 |
import java.awt.Component; |
|
10 |
|
|
11 |
import javax.swing.DefaultListCellRenderer; |
|
12 |
import javax.swing.JLabel; |
|
13 |
import javax.swing.JList; |
|
14 |
import javax.swing.ListCellRenderer; |
|
15 |
|
|
16 |
import org.gvsig.busquedacatastral.lib.api.TipoVia; |
|
17 |
|
|
18 |
public class TipoViaCellRenderer implements ListCellRenderer<TipoVia>{ |
|
19 |
|
|
20 |
|
|
21 |
protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer(); |
|
22 |
|
|
23 |
@Override |
|
24 |
public Component getListCellRendererComponent(JList<? extends TipoVia> list, |
|
25 |
TipoVia value, int index, boolean isSelected, boolean cellHasFocus) { |
|
26 |
JLabel renderer = |
|
27 |
(JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
28 |
if (value!=null){ |
|
29 |
renderer.setText(value.getLabel()); |
|
30 |
}else{ |
|
31 |
renderer.setText(""); |
|
32 |
} |
|
33 |
return renderer; |
|
34 |
} |
|
35 |
|
|
36 |
} |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/BusquedaMunicipiosPanelView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/daniel/projects/svn/desig-lote1-gvsig.desig-lote1_gvsig/fuentes/ENT-56322/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/BusquedaMunicipiosPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:136PX:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
|
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:216PX:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">4</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name">lblMunicipio</at> |
|
77 |
<at name="width">60</at> |
|
78 |
<at name="text">_municipio</at> |
|
79 |
<at name="fill"> |
|
80 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
81 |
<at name="name">fill</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
<at name="height">14</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">2</at> |
|
99 |
<at name="row">2</at> |
|
100 |
<at name="colspan">1</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="border"> |
|
117 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
118 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
119 |
<at name="name">border</at> |
|
120 |
</super> |
|
121 |
<at name="borders"> |
|
122 |
<object classname="java.util.LinkedList"> |
|
123 |
<item > |
|
124 |
<at name="value"> |
|
125 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
126 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
127 |
<at name="name">border</at> |
|
128 |
</super> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="name">lblProvincia</at> |
|
137 |
<at name="width">60</at> |
|
138 |
<at name="text">_provincia</at> |
|
139 |
<at name="fill"> |
|
140 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
141 |
<at name="name">fill</at> |
|
142 |
</object> |
|
143 |
</at> |
|
144 |
<at name="height">14</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</object> |
|
148 |
</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</item> |
|
152 |
<item > |
|
153 |
<at name="value"> |
|
154 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
156 |
<at name="cellconstraints"> |
|
157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
158 |
<at name="column">4</at> |
|
159 |
<at name="row">2</at> |
|
160 |
<at name="colspan">1</at> |
|
161 |
<at name="rowspan">1</at> |
|
162 |
<at name="halign">default</at> |
|
163 |
<at name="valign">default</at> |
|
164 |
<at name="insets" object="insets">0,0,0,0</at> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
168 |
</super> |
|
169 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
170 |
<at name="beanclass">javax.swing.JTextField</at> |
|
171 |
<at name="beanproperties"> |
|
172 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
173 |
<at name="classname">javax.swing.JTextField</at> |
|
174 |
<at name="properties"> |
|
175 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
176 |
<at name="border"> |
|
177 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
178 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
179 |
<at name="name">border</at> |
|
180 |
</super> |
|
181 |
<at name="borders"> |
|
182 |
<object classname="java.util.LinkedList"> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
186 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
187 |
<at name="name">border</at> |
|
188 |
</super> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</item> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
<at name="name">txtProvincia</at> |
|
197 |
<at name="width">212</at> |
|
198 |
<at name="height">20</at> |
|
199 |
</object> |
|
200 |
</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
</object> |
|
204 |
</at> |
|
205 |
</item> |
|
206 |
<item > |
|
207 |
<at name="value"> |
|
208 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
209 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
210 |
<at name="cellconstraints"> |
|
211 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
212 |
<at name="column">4</at> |
|
213 |
<at name="row">4</at> |
|
214 |
<at name="colspan">1</at> |
|
215 |
<at name="rowspan">1</at> |
|
216 |
<at name="halign">default</at> |
|
217 |
<at name="valign">default</at> |
|
218 |
<at name="insets" object="insets">0,0,0,0</at> |
|
219 |
</object> |
|
220 |
</at> |
|
221 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
222 |
</super> |
|
223 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
224 |
<at name="beanclass">javax.swing.JTextField</at> |
|
225 |
<at name="beanproperties"> |
|
226 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
227 |
<at name="classname">javax.swing.JTextField</at> |
|
228 |
<at name="properties"> |
|
229 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
230 |
<at name="border"> |
|
231 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
232 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
233 |
<at name="name">border</at> |
|
234 |
</super> |
|
235 |
<at name="borders"> |
|
236 |
<object classname="java.util.LinkedList"> |
|
237 |
<item > |
|
238 |
<at name="value"> |
|
239 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
240 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
241 |
<at name="name">border</at> |
|
242 |
</super> |
|
243 |
</object> |
|
244 |
</at> |
|
245 |
</item> |
|
246 |
</object> |
|
247 |
</at> |
|
248 |
</object> |
|
249 |
</at> |
|
250 |
<at name="name">txtMunicipio</at> |
|
251 |
<at name="width">212</at> |
|
252 |
<at name="height">20</at> |
|
253 |
</object> |
|
254 |
</at> |
|
255 |
</object> |
|
256 |
</at> |
|
257 |
</object> |
|
258 |
</at> |
|
259 |
</item> |
|
260 |
<item > |
|
261 |
<at name="value"> |
|
262 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
263 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
264 |
<at name="cellconstraints"> |
|
265 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
266 |
<at name="column">4</at> |
|
267 |
<at name="row">6</at> |
|
268 |
<at name="colspan">6</at> |
|
269 |
<at name="rowspan">1</at> |
|
270 |
<at name="halign">default</at> |
|
271 |
<at name="valign">default</at> |
|
272 |
<at name="insets" object="insets">0,0,0,0</at> |
|
273 |
</object> |
|
274 |
</at> |
|
275 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
276 |
</super> |
|
277 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
278 |
<at name="beanclass">javax.swing.JList</at> |
|
279 |
<at name="beanproperties"> |
|
280 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
281 |
<at name="classname">javax.swing.JList</at> |
|
282 |
<at name="properties"> |
|
283 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
284 |
<at name="border"> |
|
285 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
286 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
287 |
<at name="name">border</at> |
|
288 |
</super> |
|
289 |
<at name="borders"> |
|
290 |
<object classname="java.util.LinkedList"> |
|
291 |
<item > |
|
292 |
<at name="value"> |
|
293 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
294 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
295 |
<at name="name">border</at> |
|
296 |
</super> |
|
297 |
</object> |
|
298 |
</at> |
|
299 |
</item> |
|
300 |
</object> |
|
301 |
</at> |
|
302 |
</object> |
|
303 |
</at> |
|
304 |
<at name="scrollableTracksViewportHeight">true</at> |
|
305 |
<at name="scrollableTracksViewportWidth">true</at> |
|
306 |
<at name="name">listMunicipios</at> |
|
307 |
<at name="width">415</at> |
|
308 |
<at name="items"> |
|
309 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
310 |
<at name="name">items</at> |
|
311 |
</object> |
|
312 |
</at> |
|
313 |
<at name="scollBars"> |
|
314 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
315 |
<at name="name">scollBars</at> |
|
316 |
<at name="verticalpolicy">20</at> |
|
317 |
<at name="horizontalpolicy">30</at> |
|
318 |
</object> |
|
319 |
</at> |
|
320 |
<at name="height">78</at> |
|
321 |
</object> |
|
322 |
</at> |
|
323 |
</object> |
|
324 |
</at> |
|
325 |
</object> |
|
326 |
</at> |
|
327 |
</item> |
|
328 |
<item > |
|
329 |
<at name="value"> |
|
330 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
331 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
332 |
<at name="cellconstraints"> |
|
333 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
334 |
<at name="column">6</at> |
|
335 |
<at name="row">8</at> |
|
336 |
<at name="colspan">1</at> |
|
337 |
<at name="rowspan">1</at> |
|
338 |
<at name="halign">default</at> |
|
339 |
<at name="valign">default</at> |
|
340 |
<at name="insets" object="insets">0,0,0,0</at> |
|
341 |
</object> |
|
342 |
</at> |
|
343 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
344 |
</super> |
|
345 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
346 |
<at name="beanclass">javax.swing.JButton</at> |
|
347 |
<at name="beanproperties"> |
|
348 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
349 |
<at name="classname">javax.swing.JButton</at> |
|
350 |
<at name="properties"> |
|
351 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
352 |
<at name="border"> |
|
353 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
354 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
355 |
<at name="name">border</at> |
|
356 |
</super> |
|
357 |
<at name="borders"> |
|
358 |
<object classname="java.util.LinkedList"> |
|
359 |
<item > |
|
360 |
<at name="value"> |
|
361 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
362 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
363 |
<at name="name">border</at> |
|
364 |
</super> |
|
365 |
</object> |
|
366 |
</at> |
|
367 |
</item> |
|
368 |
</object> |
|
369 |
</at> |
|
370 |
</object> |
|
371 |
</at> |
|
372 |
<at name="actionCommand">JButton</at> |
|
373 |
<at name="name">btnAceptar</at> |
|
374 |
<at name="width">81</at> |
|
375 |
<at name="text">_aceptar</at> |
|
376 |
<at name="height">22</at> |
|
377 |
</object> |
|
378 |
</at> |
|
379 |
</object> |
|
380 |
</at> |
|
381 |
</object> |
|
382 |
</at> |
|
383 |
</item> |
|
384 |
<item > |
|
385 |
<at name="value"> |
|
386 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
387 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
388 |
<at name="cellconstraints"> |
|
389 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
390 |
<at name="column">8</at> |
|
391 |
<at name="row">8</at> |
|
392 |
<at name="colspan">1</at> |
|
393 |
<at name="rowspan">1</at> |
|
394 |
<at name="halign">default</at> |
|
395 |
<at name="valign">default</at> |
|
396 |
<at name="insets" object="insets">0,0,0,0</at> |
|
397 |
</object> |
|
398 |
</at> |
|
399 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
400 |
</super> |
|
401 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
402 |
<at name="beanclass">javax.swing.JButton</at> |
|
403 |
<at name="beanproperties"> |
|
404 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
405 |
<at name="classname">javax.swing.JButton</at> |
|
406 |
<at name="properties"> |
|
407 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
408 |
<at name="border"> |
|
409 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
410 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
411 |
<at name="name">border</at> |
|
412 |
</super> |
|
413 |
<at name="borders"> |
|
414 |
<object classname="java.util.LinkedList"> |
|
415 |
<item > |
|
416 |
<at name="value"> |
|
417 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
418 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
419 |
<at name="name">border</at> |
|
420 |
</super> |
|
421 |
</object> |
|
422 |
</at> |
|
423 |
</item> |
|
424 |
</object> |
|
425 |
</at> |
|
426 |
</object> |
|
427 |
</at> |
|
428 |
<at name="actionCommand">JButton</at> |
|
429 |
<at name="name">btnCancelar</at> |
|
430 |
<at name="width">86</at> |
|
431 |
<at name="text">_cancelar</at> |
|
432 |
<at name="height">22</at> |
|
433 |
</object> |
|
434 |
</at> |
|
435 |
</object> |
|
436 |
</at> |
|
437 |
</object> |
|
438 |
</at> |
|
439 |
</item> |
|
440 |
</object> |
|
441 |
</at> |
|
442 |
<at name="properties"> |
|
443 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
444 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
445 |
<at name="properties"> |
|
446 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
447 |
<at name="border"> |
|
448 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
449 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
450 |
<at name="name">border</at> |
|
451 |
</super> |
|
452 |
<at name="borders"> |
|
453 |
<object classname="java.util.LinkedList"/> |
|
454 |
</at> |
|
455 |
</object> |
|
456 |
</at> |
|
457 |
<at name="name"/> |
|
458 |
<at name="fill"> |
|
459 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
460 |
<at name="name">fill</at> |
|
461 |
</object> |
|
462 |
</at> |
|
463 |
<at name="scollBars"> |
|
464 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
465 |
<at name="name">scollBars</at> |
|
466 |
<at name="verticalpolicy">21</at> |
|
467 |
<at name="horizontalpolicy">31</at> |
|
468 |
<at name="border"> |
|
469 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
470 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
471 |
<at name="name">border</at> |
|
472 |
</super> |
|
473 |
<at name="borders"> |
|
474 |
<object classname="java.util.LinkedList"> |
|
475 |
<item > |
|
476 |
<at name="value"> |
|
477 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
478 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
479 |
<at name="name">border</at> |
|
480 |
</super> |
|
481 |
</object> |
|
482 |
</at> |
|
483 |
</item> |
|
484 |
</object> |
|
485 |
</at> |
|
486 |
</object> |
|
487 |
</at> |
|
488 |
</object> |
|
489 |
</at> |
|
490 |
</object> |
|
491 |
</at> |
|
492 |
</object> |
|
493 |
</at> |
|
494 |
<at name="cellpainters"> |
|
495 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
496 |
<at name="rows"> |
|
497 |
<object classname="[Ljava.lang.Object;" size="9"> |
|
498 |
<at name="item" index="0"> |
|
499 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
500 |
</at> |
|
501 |
<at name="item" index="1"> |
|
502 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
503 |
</at> |
|
504 |
<at name="item" index="2"> |
|
505 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
506 |
</at> |
|
507 |
<at name="item" index="3"> |
|
508 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
509 |
</at> |
|
510 |
<at name="item" index="4"> |
|
511 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
512 |
</at> |
|
513 |
<at name="item" index="5"> |
|
514 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
515 |
</at> |
|
516 |
<at name="item" index="6"> |
|
517 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
518 |
</at> |
|
519 |
<at name="item" index="7"> |
|
520 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
521 |
</at> |
|
522 |
<at name="item" index="8"> |
|
523 |
<object classname="[Ljava.lang.Object;" size="10"/> |
|
524 |
</at> |
|
525 |
</object> |
|
526 |
</at> |
|
527 |
</object> |
|
528 |
</at> |
|
529 |
<at name="rowgroups"> |
|
530 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
531 |
<at name="groups"> |
|
532 |
<object classname="java.util.HashMap"/> |
|
533 |
</at> |
|
534 |
</object> |
|
535 |
</at> |
|
536 |
<at name="colgroups"> |
|
537 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
538 |
<at name="groups"> |
|
539 |
<object classname="java.util.HashMap"/> |
|
540 |
</at> |
|
541 |
</object> |
|
542 |
</at> |
|
543 |
</object> |
|
544 |
</at> |
|
545 |
</object> |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/BusquedaNumerosPanelController.java | ||
---|---|---|
1 |
package org.gvsig.busquedacatastral.swing.impl; |
|
2 |
|
|
3 |
import java.awt.Dimension; |
|
4 |
import java.awt.Rectangle; |
|
5 |
import java.awt.event.ActionEvent; |
|
6 |
import java.awt.event.ActionListener; |
|
7 |
import java.awt.event.KeyEvent; |
|
8 |
import java.awt.event.KeyListener; |
|
9 |
import java.awt.event.MouseAdapter; |
|
10 |
import java.awt.event.MouseEvent; |
|
11 |
import java.util.List; |
|
12 |
import java.util.Locale; |
|
13 |
|
|
14 |
import javax.swing.ComboBoxModel; |
|
15 |
import javax.swing.DefaultComboBoxModel; |
|
16 |
import javax.swing.DefaultListCellRenderer; |
|
17 |
import javax.swing.JComponent; |
|
18 |
import javax.swing.JList; |
|
19 |
import javax.swing.JOptionPane; |
|
20 |
import javax.swing.ListSelectionModel; |
|
21 |
import javax.swing.event.ListSelectionEvent; |
|
22 |
import javax.swing.event.ListSelectionListener; |
|
23 |
|
|
24 |
import org.gvsig.busquedacatastral.lib.api.BusquedaCatastralLocator; |
|
25 |
import org.gvsig.busquedacatastral.lib.api.BusquedaCatastralManager; |
|
26 |
import org.gvsig.busquedacatastral.lib.api.QueryCatastral; |
|
27 |
import org.gvsig.busquedacatastral.lib.api.ReferenciaCatastral; |
|
28 |
import org.gvsig.busquedacatastral.lib.api.TipoVia; |
|
29 |
import org.gvsig.busquedacatastral.lib.api.exceptions.BusquedaCatastralException; |
|
30 |
import org.gvsig.busquedacatastral.lib.api.exceptions.BusquedaCatastralGettingParamsException; |
|
31 |
import org.gvsig.busquedacatastral.lib.api.exceptions.BusquedaCatastralRemoteServiceException; |
|
32 |
import org.gvsig.busquedacatastral.swing.api.BusquedaCatastralConsultaCatastralPanel.PanelAction; |
|
33 |
import org.gvsig.busquedacatastral.swing.api.exceptions.BusquedaCatastralCreatingPanelException; |
|
34 |
import org.gvsig.tools.ToolsLocator; |
|
35 |
import org.gvsig.tools.dynobject.DynObject; |
|
36 |
import org.gvsig.tools.i18n.I18nManager; |
|
37 |
import org.gvsig.tools.swing.api.ActionListenerSupport; |
|
38 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
39 |
|
|
40 |
import org.slf4j.Logger; |
|
41 |
import org.slf4j.LoggerFactory; |
|
42 |
|
|
43 |
public class BusquedaNumerosPanelController extends BusquedaNumerosPanelView{ |
|
44 |
|
|
45 |
|
|
46 |
private static final Logger logger = LoggerFactory.getLogger(BusquedaNumerosPanelController.class); |
|
47 |
|
|
48 |
private ActionListenerSupport listeners = ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport(); |
|
49 |
|
|
50 |
private String selectedNumero; |
|
51 |
|
|
52 |
private QueryCatastral query; |
|
53 |
|
|
54 |
private boolean isCanceled; |
|
55 |
|
|
56 |
public BusquedaNumerosPanelController(QueryCatastral query) throws BusquedaCatastralCreatingPanelException{ |
|
57 |
super(); |
|
58 |
this.query=query; |
|
59 |
initComponents(); |
|
60 |
translate(); |
|
61 |
} |
|
62 |
|
|
63 |
public void addActionListener(ActionListener listener) { |
|
64 |
listeners.addActionListener(listener); |
|
65 |
} |
|
66 |
|
|
67 |
public void removeActionListener(ActionListener listener) { |
|
68 |
listeners.removeActionListener(listener); |
|
69 |
} |
|
70 |
|
|
71 |
private void translate() { |
|
72 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
73 |
|
|
74 |
lblProvincia.setText(i18nManager.getTranslation(lblProvincia.getText())); |
|
75 |
lblMunicipio.setText(i18nManager.getTranslation(lblMunicipio.getText())); |
|
76 |
lblVia.setText(i18nManager.getTranslation(lblVia.getText())); |
|
77 |
lblDesde.setText(i18nManager.getTranslation(lblDesde.getText())); |
|
78 |
lblHasta.setText(i18nManager.getTranslation(lblHasta.getText())); |
|
79 |
btnAceptar.setText(i18nManager.getTranslation(btnAceptar.getText())); |
|
80 |
btnCancelar.setText(i18nManager.getTranslation(btnCancelar.getText())); |
|
81 |
btnBuscar.setText(i18nManager.getTranslation(btnBuscar.getText())); |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* |
|
86 |
*/ |
|
87 |
public void setLocate(Locale locale) { |
|
88 |
Locale l = super.getLocale(); |
|
89 |
if (!l.equals(locale)) { |
|
90 |
translate(); |
|
91 |
} |
|
92 |
super.setLocale(locale); |
|
93 |
} |
|
94 |
|
|
95 |
private void initComponents() throws BusquedaCatastralCreatingPanelException{ |
|
96 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
97 |
if (query==null || query.getProvincia()==null){ |
|
98 |
throw new BusquedaCatastralCreatingPanelException(i18nManager.getTranslation("_provincia_vacia_en_busqueda_numeros"), null); |
|
99 |
} |
|
100 |
if (query==null || query.getMunicipio()==null){ |
|
101 |
throw new BusquedaCatastralCreatingPanelException(i18nManager.getTranslation("_municipio_vacio_en_busqueda_numeros"), null); |
|
102 |
} |
|
103 |
if (query==null || query.getVia()==null){ |
|
104 |
throw new BusquedaCatastralCreatingPanelException(i18nManager.getTranslation("_via_vacia_en_busqueda_numeros"), null); |
|
105 |
} |
|
106 |
|
|
107 |
final DynObject provincia=query.getProvincia(); |
|
108 |
txtProvincia.setText((String)provincia.getDynValue(BusquedaCatastralManager.CAMPO_PROVINCIA_ETIQUETA)); |
|
109 |
txtProvincia.setEnabled(false); |
|
110 |
final DynObject municipio=query.getMunicipio(); |
|
111 |
txtMunicipio.setText((String)municipio.getDynValue(BusquedaCatastralManager.CAMPO_MUNICIPIO_ETIQUETA)); |
|
112 |
txtMunicipio.setEnabled(false); |
|
113 |
final DynObject via=query.getVia(); |
|
114 |
txtVia.setText((String)via.getDynValue(BusquedaCatastralManager.CAMPO_VIA_ETIQUETA)); |
|
115 |
txtVia.setEnabled(false); |
|
116 |
|
|
117 |
txtDesde.setText(""); |
|
118 |
txtHasta.setText(""); |
|
119 |
|
|
120 |
//List Numeros |
|
121 |
BusquedaCatastralManager busquedaCatastralManager = BusquedaCatastralLocator.getManager(); |
|
122 |
List<String> numeros; |
|
123 |
listNumeros.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
124 |
listNumeros.setCellRenderer(new DefaultListCellRenderer()); |
|
125 |
listNumeros.addListSelectionListener(new ListSelectionListener() { |
|
126 |
@Override |
|
127 |
public void valueChanged(ListSelectionEvent e) { |
|
128 |
if (e.getSource() instanceof JList){ |
|
129 |
selectedNumero=(String)listNumeros.getSelectedValue(); |
|
130 |
} |
|
131 |
} |
|
132 |
}); |
|
133 |
|
|
134 |
listNumeros.addMouseListener(new MouseAdapter() { |
|
135 |
public void mouseClicked(MouseEvent evt) { |
|
136 |
JList<String> list = (JList<String>)evt.getSource(); |
|
137 |
Rectangle r = list.getCellBounds(0, list.getLastVisibleIndex()); |
|
138 |
if (r != null && r.contains(evt.getPoint())) { |
|
139 |
int index=-1; |
|
140 |
if (evt.getClickCount() == 2) { |
|
141 |
// Double-click detected |
|
142 |
index = list.locationToIndex(evt.getPoint()); |
|
143 |
} else if (evt.getClickCount() == 3) { |
|
144 |
// Triple-click detected |
|
145 |
index = list.locationToIndex(evt.getPoint()); |
|
146 |
} |
|
147 |
if (list.getSelectedIndex()==index){ |
|
148 |
accept(); |
|
149 |
} |
|
150 |
} |
|
151 |
} |
|
152 |
}); |
|
153 |
|
|
154 |
if(query.getVia()!=null){ |
|
155 |
selectedNumero=query.getNumero(); |
|
156 |
listNumeros.setSelectedValue(selectedNumero, true); |
|
157 |
} |
|
158 |
|
|
159 |
this.btnAceptar.addActionListener(new ActionListener() { |
|
160 |
public void actionPerformed(ActionEvent e) { |
|
161 |
if (selectedNumero!=null){ |
|
162 |
accept(); |
|
163 |
}else{ |
|
164 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
165 |
JOptionPane.showMessageDialog( |
|
166 |
null, |
|
167 |
new StringBuilder().append(i18nManager.getTranslation("_no_hay_numero_seleccionado")), |
|
168 |
i18nManager.getTranslation("warn"), JOptionPane.WARNING_MESSAGE); |
|
169 |
} |
|
170 |
} |
|
171 |
}); |
|
172 |
|
|
173 |
this.btnCancelar.addActionListener(new ActionListener() { |
|
174 |
public void actionPerformed(ActionEvent e) { |
|
175 |
isCanceled=true; |
|
176 |
doClose(); |
|
177 |
listeners.fireActionEvent(new ActionEvent(this, 0, "cancel")); |
|
178 |
} |
|
179 |
}); |
|
180 |
|
|
181 |
this.btnBuscar.addActionListener(new ActionListener() { |
|
182 |
public void actionPerformed(ActionEvent e) { |
|
183 |
buscarNumeros(); |
|
184 |
} |
|
185 |
}); |
|
186 |
} |
|
187 |
|
|
188 |
private void accept(){ |
|
189 |
if (selectedNumero!=null){ |
|
190 |
isCanceled=false; |
|
191 |
listeners.fireActionEvent(new ActionEvent(this, 0, "accept")); |
|
192 |
doClose(); |
|
193 |
} |
|
194 |
} |
|
195 |
|
|
196 |
|
|
197 |
private void buscarNumeros(){ |
|
198 |
BusquedaCatastralManager busquedaCatastralManager = BusquedaCatastralLocator.getManager(); |
|
199 |
List<String> numeros; |
|
200 |
String inicio=txtDesde.getText(); |
|
201 |
String fin=txtHasta.getText(); |
|
202 |
try { |
|
203 |
numeros = busquedaCatastralManager.getNumeros(query, inicio, fin); |
|
204 |
if (numeros==null){ |
|
205 |
logger.warn("No se encontrado numeros"); |
|
206 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
207 |
JOptionPane.showMessageDialog( |
|
208 |
null, |
|
209 |
new StringBuilder().append(i18nManager.getTranslation("_no_se_han_encontrado_resultados_para_estos_datos")), |
|
210 |
i18nManager.getTranslation("info"), JOptionPane.INFORMATION_MESSAGE); |
|
211 |
} |
|
212 |
String[] numerosArray=numeros.toArray(new String[0]); |
|
213 |
ComboBoxModel<String> numerosModel = |
|
214 |
new DefaultComboBoxModel<String>(numerosArray); |
|
215 |
listNumeros.setModel(numerosModel); |
|
216 |
} catch (BusquedaCatastralRemoteServiceException e) { |
|
217 |
logger.error("Error getting numeros", e); |
|
218 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
219 |
JOptionPane.showMessageDialog( |
|
220 |
null, |
|
221 |
new StringBuilder().append(i18nManager.getTranslation("_error_accessing_catastrial_server")) |
|
222 |
.append(":").append(e.getLocalizedMessage()), |
|
223 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
224 |
} catch (BusquedaCatastralException e) { |
|
225 |
logger.error("Error getting numeros", e); |
|
226 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
227 |
JOptionPane.showMessageDialog( |
|
228 |
null, |
|
229 |
new StringBuilder().append(i18nManager.getTranslation("_error_getting_numeros")) |
|
230 |
.append(":").append(e.getLocalizedMessage()), |
|
231 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
232 |
} |
|
233 |
|
|
234 |
} |
|
235 |
|
|
236 |
@Override |
|
237 |
public Dimension getPreferredSize() { |
|
238 |
return new Dimension(550, 300); |
|
239 |
} |
|
240 |
|
|
241 |
private void doClose() { |
|
242 |
this.setVisible(false); |
|
243 |
} |
|
244 |
|
|
245 |
public boolean isCanceled(){ |
|
246 |
return isCanceled; |
|
247 |
} |
|
248 |
|
|
249 |
public String getSelected(){ |
|
250 |
return selectedNumero; |
|
251 |
} |
|
252 |
|
|
253 |
public JComponent asJComponent() { |
|
254 |
return this; |
|
255 |
} |
|
256 |
|
|
257 |
} |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/BusquedaViasPanelView.java | ||
---|---|---|
1 |
package org.gvsig.busquedacatastral.swing.impl; |
|
2 |
|
|
3 |
import com.jgoodies.forms.layout.CellConstraints; |
|
4 |
import com.jgoodies.forms.layout.FormLayout; |
|
5 |
import java.awt.BorderLayout; |
|
6 |
import java.awt.ComponentOrientation; |
|
7 |
import java.awt.Container; |
|
8 |
import java.awt.Dimension; |
|
9 |
import javax.swing.Box; |
|
10 |
import javax.swing.ImageIcon; |
|
11 |
import javax.swing.JButton; |
|
12 |
import javax.swing.JFrame; |
|
13 |
import javax.swing.JLabel; |
|
14 |
import javax.swing.JList; |
|
15 |
import javax.swing.JPanel; |
|
16 |
import javax.swing.JScrollPane; |
|
17 |
import javax.swing.JTextField; |
|
18 |
|
|
19 |
|
|
20 |
public class BusquedaViasPanelView extends JPanel |
|
21 |
{ |
|
22 |
JLabel lblMunicipio = new JLabel(); |
|
23 |
JLabel lblProvincia = new JLabel(); |
|
24 |
JTextField txtProvincia = new JTextField(); |
|
25 |
JTextField txtMunicipio = new JTextField(); |
|
26 |
JList listVias = new JList(); |
|
27 |
JButton btnAceptar = new JButton(); |
|
28 |
JButton btnCancelar = new JButton(); |
|
29 |
JLabel lblVia = new JLabel(); |
|
30 |
JTextField txtVia = new JTextField(); |
|
31 |
|
|
32 |
/** |
|
33 |
* Default constructor |
|
34 |
*/ |
|
35 |
public BusquedaViasPanelView() |
|
36 |
{ |
|
37 |
initializePanel(); |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
42 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
43 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
44 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
45 |
*/ |
|
46 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
47 |
{ |
|
48 |
Dimension filler = new Dimension(10,10); |
|
49 |
|
|
50 |
boolean filled_cell_11 = false; |
|
51 |
CellConstraints cc = new CellConstraints(); |
|
52 |
if ( cols.length > 0 && rows.length > 0 ) |
|
53 |
{ |
|
54 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
55 |
{ |
|
56 |
/** add a rigid area */ |
|
57 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
58 |
filled_cell_11 = true; |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
for( int index = 0; index < cols.length; index++ ) |
|
63 |
{ |
|
64 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
65 |
{ |
|
66 |
continue; |
|
67 |
} |
|
68 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
69 |
} |
|
70 |
|
|
71 |
for( int index = 0; index < rows.length; index++ ) |
|
72 |
{ |
|
73 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
74 |
{ |
|
75 |
continue; |
|
76 |
} |
|
77 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
78 |
} |
|
79 |
|
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* Helper method to load an image file from the CLASSPATH |
|
84 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
85 |
* @return an ImageIcon instance with the specified image file |
|
86 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
87 |
*/ |
|
88 |
public ImageIcon loadImage( String imageName ) |
|
89 |
{ |
|
90 |
try |
|
91 |
{ |
|
92 |
ClassLoader classloader = getClass().getClassLoader(); |
|
93 |
java.net.URL url = classloader.getResource( imageName ); |
|
94 |
if ( url != null ) |
|
95 |
{ |
|
96 |
ImageIcon icon = new ImageIcon( url ); |
|
97 |
return icon; |
|
98 |
} |
|
99 |
} |
|
100 |
catch( Exception e ) |
|
101 |
{ |
|
102 |
e.printStackTrace(); |
|
103 |
} |
|
104 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
105 |
} |
|
106 |
|
|
107 |
/** |
|
108 |
* Method for recalculating the component orientation for |
|
109 |
* right-to-left Locales. |
|
110 |
* @param orientation the component orientation to be applied |
|
111 |
*/ |
|
112 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
113 |
{ |
|
114 |
// Not yet implemented... |
|
115 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
116 |
super.applyComponentOrientation(orientation); |
|
117 |
} |
|
118 |
|
|
119 |
public JPanel createPanel() |
|
120 |
{ |
|
121 |
JPanel jpanel1 = new JPanel(); |
|
122 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:216PX:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:136PX:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
|
123 |
CellConstraints cc = new CellConstraints(); |
|
124 |
jpanel1.setLayout(formlayout1); |
|
125 |
|
|
126 |
lblMunicipio.setName("lblMunicipio"); |
|
127 |
lblMunicipio.setText("_municipio"); |
|
128 |
jpanel1.add(lblMunicipio,cc.xy(2,4)); |
|
129 |
|
|
130 |
lblProvincia.setName("lblProvincia"); |
|
131 |
lblProvincia.setText("_provincia"); |
|
132 |
jpanel1.add(lblProvincia,cc.xy(2,2)); |
|
133 |
|
|
134 |
txtProvincia.setName("txtProvincia"); |
|
135 |
jpanel1.add(txtProvincia,cc.xy(4,2)); |
|
136 |
|
|
137 |
txtMunicipio.setName("txtMunicipio"); |
|
138 |
jpanel1.add(txtMunicipio,cc.xy(4,4)); |
|
139 |
|
|
140 |
listVias.setName("listVias"); |
|
141 |
JScrollPane jscrollpane1 = new JScrollPane(); |
|
142 |
jscrollpane1.setViewportView(listVias); |
|
143 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
|
144 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
145 |
jpanel1.add(jscrollpane1,cc.xywh(4,8,6,1)); |
|
146 |
|
|
147 |
btnAceptar.setActionCommand("JButton"); |
|
148 |
btnAceptar.setName("btnAceptar"); |
|
149 |
btnAceptar.setText("_aceptar"); |
|
150 |
jpanel1.add(btnAceptar,cc.xy(6,10)); |
|
151 |
|
|
152 |
btnCancelar.setActionCommand("JButton"); |
|
153 |
btnCancelar.setName("btnCancelar"); |
|
154 |
btnCancelar.setText("_cancelar"); |
|
155 |
jpanel1.add(btnCancelar,cc.xy(8,10)); |
|
156 |
|
|
157 |
lblVia.setName("lblVia"); |
|
158 |
lblVia.setText("_via"); |
|
159 |
jpanel1.add(lblVia,cc.xy(2,6)); |
|
160 |
|
|
161 |
txtVia.setName("txtVia"); |
|
162 |
jpanel1.add(txtVia,cc.xy(4,6)); |
|
163 |
|
|
164 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
|
165 |
return jpanel1; |
|
166 |
} |
|
167 |
|
|
168 |
/** |
|
169 |
* Initializer |
|
170 |
*/ |
|
171 |
protected void initializePanel() |
|
172 |
{ |
|
173 |
setLayout(new BorderLayout()); |
|
174 |
add(createPanel(), BorderLayout.CENTER); |
|
175 |
} |
|
176 |
|
|
177 |
|
|
178 |
} |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/DynObjectCellRenderer.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2015 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.lrs.swing.impl |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.busquedacatastral.swing.impl; |
|
8 |
|
|
9 |
import java.awt.Component; |
|
10 |
|
|
11 |
import javax.swing.DefaultListCellRenderer; |
|
12 |
import javax.swing.JLabel; |
|
13 |
import javax.swing.JList; |
|
14 |
import javax.swing.ListCellRenderer; |
|
15 |
|
|
16 |
import org.apache.commons.lang3.StringUtils; |
|
17 |
import org.gvsig.tools.dynobject.DynObject; |
|
18 |
import org.slf4j.Logger; |
|
19 |
import org.slf4j.LoggerFactory; |
|
20 |
|
|
21 |
public class DynObjectCellRenderer implements ListCellRenderer<DynObject>{ |
|
22 |
|
|
23 |
private String renderedField; |
|
24 |
private String[] renderedFields; |
|
25 |
private String separator; |
|
26 |
|
|
27 |
/** |
|
28 |
* Default Constructor |
|
29 |
* @param renderedField indicates which field from the DynObject must be rendered |
|
30 |
*/ |
|
31 |
public DynObjectCellRenderer(String renderedField){ |
|
32 |
this.renderedField=renderedField; |
|
33 |
} |
|
34 |
|
|
35 |
public DynObjectCellRenderer(String[] renderedFields, String separator){ |
|
36 |
this.renderedFields=renderedFields; |
|
37 |
this.separator=separator; |
|
38 |
} |
|
39 |
|
|
40 |
protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer(); |
|
41 |
private static final Logger logger = LoggerFactory.getLogger(DynObjectCellRenderer.class); |
|
42 |
|
|
43 |
@Override |
|
44 |
public Component getListCellRendererComponent( |
|
45 |
JList<? extends DynObject> list, DynObject value, int index, |
|
46 |
boolean isSelected, boolean cellHasFocus) { |
|
47 |
|
|
48 |
JLabel renderer = |
|
49 |
(JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
50 |
|
|
51 |
if (value!=null){ |
|
52 |
String text=getText(value); |
|
53 |
renderer.setText(text); |
|
54 |
}else{ |
|
55 |
renderer.setText(""); |
|
56 |
} |
|
57 |
|
|
58 |
return renderer; |
|
59 |
} |
|
60 |
|
|
61 |
private String getText(DynObject dynObject){ |
|
62 |
String text=""; |
|
63 |
if (StringUtils.isNotEmpty(renderedField)){ |
|
64 |
text=(String)dynObject.getDynValue(renderedField); |
|
65 |
}else if (renderedFields!=null){ |
|
66 |
for(String fieldName:renderedFields){ |
|
67 |
if (StringUtils.isNotEmpty(text)){ |
|
68 |
text+=separator; |
|
69 |
} |
|
70 |
text+=(String)dynObject.getDynValue(fieldName); |
|
71 |
} |
|
72 |
} |
|
73 |
return text; |
|
74 |
|
|
75 |
} |
|
76 |
|
|
77 |
} |
org.gvsig.busquedacatastral/tags/org.gvsig.busquedacatastral-1.0.177/org.gvsig.busquedacatastral.swing/org.gvsig.busquedacatastral.swing.impl/src/main/java/org/gvsig/busquedacatastral/swing/impl/DefaultBusquedaCatastralConsultaCatastralPanelController.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2015 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.lrs.swing.impl |
Also available in: Unified diff