Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
InfoTransformationsRecentsPanel.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 |
import java.awt.Font; |
|
46 |
import java.awt.GridLayout; |
|
47 | 46 |
import java.awt.event.ActionEvent; |
48 | 47 |
import java.awt.event.ActionListener; |
49 | 48 |
import java.sql.ResultSet; |
... | ... | |
51 | 50 |
|
52 | 51 |
import javax.swing.BorderFactory; |
53 | 52 |
import javax.swing.JButton; |
54 |
import javax.swing.JLabel; |
|
55 | 53 |
import javax.swing.JPanel; |
56 | 54 |
import javax.swing.JScrollPane; |
57 | 55 |
import javax.swing.JTable; |
58 | 56 |
import javax.swing.ListSelectionModel; |
59 | 57 |
import javax.swing.table.DefaultTableModel; |
60 | 58 |
|
61 |
import org.cresques.ui.DefaultDialogPanel; |
|
62 | 59 |
import org.gvsig.crs.EpsgConnection; |
63 |
import org.gvsig.crs.ICrs; |
|
64 | 60 |
import org.gvsig.crs.Query; |
65 | 61 |
|
66 | 62 |
import com.iver.andami.PluginServices; |
... | ... | |
71 | 67 |
/** |
72 | 68 |
* Panel con la informaci?n de la transformaci?n seleccionada |
73 | 69 |
* @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com) |
70 |
* @author Luisa Marina Fern?ndez (luisam.fernandez@uclm.es) |
|
74 | 71 |
* |
75 | 72 |
*/ |
76 | 73 |
public class InfoTransformationsRecentsPanel extends JPanel implements IWindow, ActionListener{ |
... | ... | |
85 | 82 |
public TableSorter sorter = null; |
86 | 83 |
String[] data = null; |
87 | 84 |
|
85 |
//Ancho y alto del panel |
|
86 |
private int v_height=200; |
|
87 |
private int v_width=420; |
|
88 |
|
|
88 | 89 |
public InfoTransformationsRecentsPanel(String[] data) { |
89 | 90 |
super(); |
90 |
// TODO Auto-generated constructor stub |
|
91 | 91 |
this.data = data; |
92 | 92 |
inicializate(); |
93 | 93 |
} |
94 | 94 |
|
95 | 95 |
private void inicializate() { |
96 |
setLayout(new GridLayout(2,1)); |
|
97 |
setLayout(new FlowLayout(FlowLayout.LEADING,5,10)); |
|
98 |
setPreferredSize(new Dimension(400, 200)); |
|
99 |
add(getJScrollPane1(), null); |
|
100 |
add(getJPanelButtons(), null); |
|
96 |
setLayout(new BorderLayout()); |
|
97 |
add(getJScrollPane1(), BorderLayout.CENTER); |
|
98 |
add(getJPanelButtons(), BorderLayout.SOUTH); |
|
101 | 99 |
|
102 | 100 |
} |
103 | 101 |
|
104 | 102 |
private JPanel getJPanelButtons() { |
105 | 103 |
if(jPanelbuttons == null) { |
106 | 104 |
jPanelbuttons = new JPanel(); |
107 |
jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT)); |
|
108 |
jPanelbuttons.setPreferredSize(new Dimension(400,50)); |
|
105 |
jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10)); |
|
109 | 106 |
jPanelbuttons.add(getJButtonOk(),null); |
110 | 107 |
} |
111 | 108 |
return jPanelbuttons; |
... | ... | |
117 | 114 |
jButtonOk.setText(PluginServices.getText(this,"ok")); |
118 | 115 |
jButtonOk.setPreferredSize(new Dimension(100,25)); |
119 | 116 |
jButtonOk.setMnemonic('O'); |
120 |
jButtonOk.setToolTipText("Accept");
|
|
117 |
jButtonOk.setToolTipText(PluginServices.getText(this,"ok"));
|
|
121 | 118 |
jButtonOk.addActionListener(this); |
122 | 119 |
} |
123 | 120 |
return jButtonOk; |
... | ... | |
145 | 142 |
Object[][] datos = obtainData(); |
146 | 143 |
dtm = new DefaultTableModel(datos, columnNames) |
147 | 144 |
{ |
145 |
private static final long serialVersionUID = 1L; |
|
146 |
|
|
148 | 147 |
public boolean isCellEditable(int row, int column) { |
149 | 148 |
return false; |
150 | 149 |
} |
... | ... | |
190 | 189 |
"WHERE area_code = "+ Integer.parseInt(result.getString("area_of_use_code")); |
191 | 190 |
|
192 | 191 |
} catch (SQLException e) { |
193 |
// TODO Auto-generated catch block |
|
194 | 192 |
e.printStackTrace(); |
195 | 193 |
} |
196 | 194 |
valid[3][0] = PluginServices.getText(this,"transformation_name"); |
... | ... | |
201 | 199 |
result.next(); |
202 | 200 |
valid[4][1] = result.getString("area_of_use"); |
203 | 201 |
} catch (SQLException e) { |
204 |
// TODO Auto-generated catch block |
|
205 | 202 |
e.printStackTrace(); |
206 | 203 |
} |
207 | 204 |
} |
... | ... | |
233 | 230 |
public WindowInfo getWindowInfo() { |
234 | 231 |
WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG); |
235 | 232 |
m_viewinfo.setTitle("Info");//PluginServices.getText(this,proj.getCrsWkt().getName())); |
233 |
//Define el ancho y el alto del panel |
|
234 |
m_viewinfo.setHeight(v_height); |
|
235 |
m_viewinfo.setWidth(v_width); |
|
236 | 236 |
return m_viewinfo; |
237 | 237 |
} |
238 | 238 |
|
Also available in: Unified diff