Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java

View differences:

InfoCRSPanel.java
40 40

  
41 41
package org.gvsig.crs.gui.panels;
42 42

  
43
import java.awt.BorderLayout;
43 44
import java.awt.Dimension;
44 45
import java.awt.FlowLayout;
45 46
import java.awt.Font;
......
53 54
import javax.swing.JScrollPane;
54 55
import javax.swing.JTable;
55 56
import javax.swing.ListSelectionModel;
57
import javax.swing.border.EmptyBorder;
56 58
import javax.swing.table.DefaultTableModel;
57 59

  
58 60
import org.cresques.ui.DefaultDialogPanel;
......
66 68
 * Clase que genera el panel de informaci?n del CRS seleccionado
67 69
 * en el caso del repositorio de la EPSG
68 70
 * @author Miguel Garc?a Jim?nez (garciajimenez.miguel@gmail.com)
71
 * @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es)
69 72
 *
70 73
 */
71 74
public class InfoCRSPanel extends DefaultDialogPanel implements IWindow, ActionListener{
......
106 109
	}
107 110
	
108 111
	private void inicializate() {
109
		this.add(getPanel(), null);
110
		this.add(getJPanelButtons(),null);
112
		this.setLayout(new BorderLayout());
113
		JPanel p=new JPanel(new BorderLayout());
114
		p.setBorder(new EmptyBorder(0,10,0,10));
115
		p.add(getPanel(),BorderLayout.NORTH);
116
		p.add(getJScrollPane1(),BorderLayout.CENTER);
117
		this.add(p, BorderLayout.CENTER);
118
		this.add(getJPanelButtons(),BorderLayout.SOUTH);
111 119
	}
112 120

  
113 121
	private JPanel getPanel() {
114 122
		if(panelLabels == null) {
115 123
			panelLabels = new JPanel();
116
			panelLabels.setLayout(new GridLayout(6,4));
117
			panelLabels.setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
118
			panelLabels.setPreferredSize(new Dimension(525, 300));
119
			panelLabels.add(getJLabelProjcs(),null);
120
			panelLabels.add(getJLabelProjcsDinamic(),null);
121
			panelLabels.add(getJLabelGeogcs(),null);
122
			panelLabels.add(getJLabelGeogcsDinamic(),null);
123
			panelLabels.add(getJLabelDatum(),null);
124
			panelLabels.add(getJLabelDatumDinamic(),null);
125
			panelLabels.add(getJLabelSpheroid(),null);
126
			panelLabels.add(getJLabelSpheroidDinamic(),null);
127
			panelLabels.add(getJLabelPrimen(),null);
128
			panelLabels.add(getJLabelPrimenDinamic(),null);
129
			panelLabels.add(getJLabelUnits(),null);
130
			panelLabels.add(getJLabelUnitsDinamic(),null);
131
			panelLabels.add(getJLabelProjection(),null);
132
			panelLabels.add(getJLabelProjectionDinamic(),null);
133
			panelLabels.add(getJLabelUnits_p(),null);
134
			panelLabels.add(getJLabelUnits_pDinamic(),null);
135
			panelLabels.add(getJScrollPane1(), null);
124
			panelLabels.setLayout(new GridLayout(4,2));
125
			JPanel p00=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
126
			p00.add(getJLabelProjcs());
127
			p00.add(getJLabelProjcsDinamic());
128
			JPanel p01=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
129
			p01.add(getJLabelGeogcs());
130
			p01.add(getJLabelGeogcsDinamic());
131
			JPanel p10=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
132
			p10.add(getJLabelDatum());
133
			p10.add(getJLabelDatumDinamic());
134
			JPanel p11=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
135
			p11.add(getJLabelSpheroid());
136
			p11.add(getJLabelSpheroidDinamic());
137
			JPanel p20=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
138
			p20.add(getJLabelPrimen());
139
			p20.add(getJLabelPrimenDinamic());
140
			JPanel p21=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
141
			p21.add(getJLabelUnits());
142
			p21.add(getJLabelUnitsDinamic());
143
			JPanel p30=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
144
			p30.add(getJLabelProjection());
145
			p30.add(getJLabelProjectionDinamic());
146
			JPanel p31=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
147
			p31.add(getJLabelUnits_p());
148
			p31.add(getJLabelUnits_pDinamic());
149
			
150
			panelLabels.add(p00);
151
			panelLabels.add(p01);
152
			panelLabels.add(p10);
153
			panelLabels.add(p11);
154
			panelLabels.add(p20);
155
			panelLabels.add(p21);
156
			panelLabels.add(p30);
157
			panelLabels.add(p31);
158
			
136 159
		}
137 160
		return panelLabels;
138 161
	}
......
140 163
	private JPanel getJPanelButtons() {
141 164
		if(jPanelbuttons == null) {
142 165
			jPanelbuttons = new JPanel();
143
			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
144
			jPanelbuttons.setPreferredSize(new Dimension(525,50));
166
			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
145 167
			jPanelbuttons.add(getJButtonOk(),null);
146 168
		}
147 169
		return jPanelbuttons;
......
162 184
	private JLabel getJLabelProjcs() {
163 185
		if(jLabelProjcs == null) {
164 186
			jLabelProjcs = new JLabel();
165
			jLabelProjcs.setPreferredSize(new Dimension(75,20));
166 187
			jLabelProjcs.setFont(new Font("Projcs:",Font.BOLD,10));
167 188
			jLabelProjcs.setText(PluginServices.getText(this,"projcs")+":");
168 189
		}
......
172 193
	private JLabel getJLabelProjcsDinamic() {
173 194
		if(jLabelProjcsdinamic == null) {
174 195
			jLabelProjcsdinamic = new JLabel();
175
			jLabelProjcsdinamic.setPreferredSize(new Dimension(150,20));
176 196
			jLabelProjcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
177 197
			jLabelProjcsdinamic.setText(proj.getCrsWkt().getProjcs());
178 198
		}
......
182 202
	private JLabel getJLabelGeogcs() {
183 203
		if(jLabelGeogcs == null) {
184 204
			jLabelGeogcs = new JLabel();
185
			jLabelGeogcs.setPreferredSize(new Dimension(75,20));
186 205
			jLabelGeogcs.setFont(new Font("Geogcs:",Font.BOLD,10));
187 206
			jLabelGeogcs.setText(PluginServices.getText(this,"geogcs")+ ":");
188 207
		}
......
192 211
	private JLabel getJLabelGeogcsDinamic() {
193 212
		if(jLabelGeogcsdinamic == null) {
194 213
			jLabelGeogcsdinamic = new JLabel();
195
			jLabelGeogcsdinamic.setPreferredSize(new Dimension(150,20));
196 214
			jLabelGeogcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
197 215
			jLabelGeogcsdinamic.setText(proj.getCrsWkt().getGeogcs());
198 216
		}
......
202 220
	private JLabel getJLabelDatum() {
203 221
		if(jLabelDatum == null) {
204 222
			jLabelDatum = new JLabel();
205
			jLabelDatum.setPreferredSize(new Dimension(75,20));
206 223
			jLabelDatum.setFont(new Font("Datum:",Font.BOLD,10));
207 224
			jLabelDatum.setText(PluginServices.getText(this,"datum")+":");
208 225
		}
......
212 229
	private JLabel getJLabelDatumDinamic() {
213 230
		if(jLabelDatumdinamic == null) {
214 231
			jLabelDatumdinamic = new JLabel();
215
			jLabelDatumdinamic.setPreferredSize(new Dimension(150,20));
216 232
			jLabelDatumdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
217 233
			jLabelDatumdinamic.setText(proj.getCrsWkt().getDatumName());
218 234
		}
......
222 238
	private JLabel getJLabelSpheroid() {
223 239
		if(jLabelSpheroid == null) {
224 240
			jLabelSpheroid = new JLabel();
225
			jLabelSpheroid.setPreferredSize(new Dimension(75,20));
226 241
			jLabelSpheroid.setFont(new Font("Spheroid",Font.BOLD,10));
227 242
			jLabelSpheroid.setText(PluginServices.getText(this,"spheriod")+":");
228 243
		}
......
233 248
		if(jLabelSpheroiddinamic == null) {
234 249
			String[] sphe = proj.getCrsWkt().getSpheroid();
235 250
			jLabelSpheroiddinamic = new JLabel();
236
			jLabelSpheroiddinamic.setPreferredSize(new Dimension(200,20));
237 251
			jLabelSpheroiddinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
238 252
			jLabelSpheroiddinamic.setText(sphe[0]+" , "+sphe[1]+" , "+sphe[2]);
239 253
		}
......
243 257
	private JLabel getJLabelPrimen() {
244 258
		if(jLabelPrimem == null) {
245 259
			jLabelPrimem = new JLabel();
246
			jLabelPrimem.setPreferredSize(new Dimension(75,20));
247 260
			jLabelPrimem.setFont(new Font("Primen:",Font.BOLD,10));
248 261
			jLabelPrimem.setText(PluginServices.getText(this,"primem")+":");
249 262
		}
......
254 267
		if(jLabelPrimemdinamic == null) {
255 268
			String pri[] = proj.getCrsWkt().getPrimen();
256 269
			jLabelPrimemdinamic = new JLabel();
257
			jLabelPrimemdinamic.setPreferredSize(new Dimension(150,20));
258 270
			jLabelPrimemdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
259 271
			jLabelPrimemdinamic.setText(pri[0]+" , "+pri[1]);
260 272
		}
......
264 276
	private JLabel getJLabelProjection() {
265 277
		if(jLabelProjection == null) {
266 278
			jLabelProjection = new JLabel();
267
			jLabelProjection.setPreferredSize(new Dimension(75,20));
268 279
			jLabelProjection.setFont(new Font("Projection",Font.BOLD,10));
269 280
			jLabelProjection.setText(PluginServices.getText(this,"projection")+":");
270 281
		}
......
274 285
	private JLabel getJLabelProjectionDinamic() {
275 286
		if(jLabelProjectiondinamic == null) {
276 287
			jLabelProjectiondinamic = new JLabel();
277
			jLabelProjectiondinamic.setPreferredSize(new Dimension(150,20));
278 288
			jLabelProjectiondinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
279 289
			jLabelProjectiondinamic.setText(proj.getCrsWkt().getProjection());
280 290
		}
......
284 294
	private JLabel getJLabelUnits() {
285 295
		if(jLabelUnits == null) {
286 296
			jLabelUnits = new JLabel();
287
			jLabelUnits.setPreferredSize(new Dimension(75,20));
288 297
			jLabelUnits.setFont(new Font("Units",Font.BOLD,10));
289 298
			jLabelUnits.setText(PluginServices.getText(this,"units")+":");
290 299
		}
......
298 307
			jLabelUnitsdinamic.setPreferredSize(new Dimension(200,20));
299 308
			jLabelUnitsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
300 309
			jLabelUnitsdinamic.setText(units[0]+" , "+units[1]);
310
			System.out.println("Unidades:  "+ units[0]+" , "+units[1]);
311

  
301 312
		}
302 313
		return jLabelUnitsdinamic;
303 314
	}
......
305 316
	private JLabel getJLabelUnits_p() {
306 317
		if(jLabelUnits_p == null) {
307 318
			jLabelUnits_p = new JLabel();
308
			jLabelUnits_p.setPreferredSize(new Dimension(75,20));
309 319
			jLabelUnits_p.setFont(new Font("",Font.BOLD,10));
310 320
			jLabelUnits_p.setText(PluginServices.getText(this,"units_p")+":");
311 321
		}
......
316 326
		if(jLabelUnits_pdinamic == null) {
317 327
			String[] uni_p = proj.getCrsWkt().getUnit_p();
318 328
			jLabelUnits_pdinamic = new JLabel();
319
			jLabelUnits_pdinamic.setPreferredSize(new Dimension(150,20));
320 329
			jLabelUnits_pdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
321 330
			jLabelUnits_pdinamic.setText(uni_p[0]+" , "+uni_p[1]);
322 331
			
......
328 337
		if(jScrollPane1 == null) {
329 338
			jScrollPane1 = new JScrollPane();
330 339
			jScrollPane1.setPreferredSize(new Dimension(400,150));
331
		/*	jScrollPane1.setBorder(
332
				    BorderFactory.createCompoundBorder(
333
					BorderFactory.createCompoundBorder(
334
							BorderFactory.createTitledBorder("Transformations"),
335
							BorderFactory.createEmptyBorder(5,5,5,5)),
336
							jScrollPane1.getBorder()));*/
337 340
			jScrollPane1.setViewportView(getJTable());
338 341
		}
339 342
		return jScrollPane1;
......
371 374
	public WindowInfo getWindowInfo() {
372 375
		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
373 376
   		m_viewinfo.setTitle(PluginServices.getText(this,proj.getCrsWkt().getName()));
377
   		m_viewinfo.setWidth(600);
378
   		m_viewinfo.setHeight(250);
374 379
		return m_viewinfo;
375 380
	}
376 381

  

Also available in: Unified diff