Revision 6934
trunk/libraries/libJCRS/src/org/gvsig/crs/ui/TransformationNadgridsPanel.java | ||
---|---|---|
16 | 16 |
import javax.swing.JTextArea; |
17 | 17 |
import javax.swing.JTextField; |
18 | 18 |
|
19 |
import org.cresques.cts.IProjection; |
|
19 | 20 |
import org.cresques.ui.DefaultDialogPanel; |
21 |
import org.gvsig.crs.CrsFactory; |
|
22 |
import org.gvsig.crs.ICrs; |
|
20 | 23 |
|
21 | 24 |
import com.iver.andami.PluginServices; |
22 | 25 |
import com.iver.andami.ui.mdiManager.View; |
... | ... | |
27 | 30 |
|
28 | 31 |
private static final long serialVersionUID = 1L; |
29 | 32 |
|
30 |
private static boolean pressed = true; |
|
33 |
private IProjection firstProj; |
|
34 |
private String nad = "+nadgrids=sped2et.gsb"; |
|
31 | 35 |
|
32 | 36 |
private JPanel buttonPane; |
33 | 37 |
private JButton accept; |
... | ... | |
36 | 40 |
ProjChooserPanelTransformation pcpt; |
37 | 41 |
|
38 | 42 |
private String cadWKT = ""; |
43 |
private int codeEpsg; |
|
39 | 44 |
|
40 | 45 |
private JPanel jPaneOpen; |
41 | 46 |
private JLabel open_gsb; |
... | ... | |
53 | 58 |
super(false); |
54 | 59 |
pcpt = new ProjChooserPanelTransformation(); |
55 | 60 |
cadWKT = cad; |
61 |
codeEpsg = code; |
|
56 | 62 |
/*this.setPreferredSize(new Dimension(680, 650)); |
57 | 63 |
this.setLayout(new GridLayout(2,2)); |
58 | 64 |
this.setLayout(new FlowLayout(FlowLayout.LEFT,5,10));*/ |
... | ... | |
142 | 148 |
} |
143 | 149 |
|
144 | 150 |
public void cancelButton_actionPerformed(ActionEvent e) { |
145 |
pressed = false; |
|
146 | 151 |
PluginServices.getMDIManager().closeView(this); |
147 | 152 |
} |
148 | 153 |
|
... | ... | |
231 | 236 |
} |
232 | 237 |
} |
233 | 238 |
|
234 |
public static boolean isPressed() { return pressed; } |
|
239 |
public ICrs getProjection() { |
|
240 |
try { |
|
241 |
ICrs crs = new CrsFactory().getCRS(codeEpsg, |
|
242 |
cadWKT,nad); |
|
243 |
return crs; |
|
244 |
} catch (org.gvsig.crs.CrsException e) { |
|
245 |
e.printStackTrace(); |
|
246 |
} |
|
247 |
return null; |
|
248 |
} |
|
235 | 249 |
|
250 |
public void setProjection(IProjection proj) { |
|
251 |
firstProj = proj; |
|
252 |
} |
|
253 |
|
|
254 |
|
|
236 | 255 |
public ViewInfo getViewInfo() { |
237 | 256 |
ViewInfo m_viewinfo=new ViewInfo(ViewInfo.MODALDIALOG); |
238 | 257 |
m_viewinfo.setTitle(PluginServices.getText(this,"Nadgrids")); |
Also available in: Unified diff