Revision 852 org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/DefaultCoordinateReferenceSystemSelectorComponent.java
DefaultCoordinateReferenceSystemSelectorComponent.java | ||
---|---|---|
38 | 38 |
import org.slf4j.LoggerFactory; |
39 | 39 |
|
40 | 40 |
import org.gvsig.proj.CoordinateReferenceSystem; |
41 |
import org.gvsig.proj.CoordinateReferenceSystemException; |
|
42 |
import org.gvsig.proj.CoordinateReferenceSystemNotFoundException; |
|
43 | 41 |
import org.gvsig.proj.catalog.CRSDefinition; |
44 | 42 |
import org.gvsig.proj.swing.CoordinateReferenceSystemSelectorComponent; |
45 | 43 |
import org.gvsig.proj.swing.CoordinateReferenceSystemSwingManager; |
... | ... | |
54 | 52 |
*/ |
55 | 53 |
public class DefaultCoordinateReferenceSystemSelectorComponent |
56 | 54 |
extends DefaultCoordinateReferenceSystemSelectorComponentView |
57 |
implements CoordinateReferenceSystemSelectorComponent { |
|
55 |
//implements CoordinateReferenceSystemSelectorComponent |
|
56 |
{ |
|
58 | 57 |
|
59 | 58 |
private static final Logger LOG = LoggerFactory |
60 | 59 |
.getLogger(DefaultCoordinateReferenceSystemSelectorComponent.class); |
... | ... | |
105 | 104 |
CoordinateReferenceSystem crs = |
106 | 105 |
getSelectedCoordinateReferenceSystem(); |
107 | 106 |
if (crs != null) { |
107 |
/* cmi tmp |
|
108 | 108 |
try { |
109 | 109 |
txtDefinition.setText(crs.getDefinition().toWKT()); |
110 | 110 |
} catch (org.gvsig.proj.catalog.exception.UnsupportedCoordinateReferenceSystemException e1) { |
... | ... | |
113 | 113 |
} catch (UnsupportedOperationException e1) { |
114 | 114 |
// TODO Auto-generated catch block |
115 | 115 |
e1.printStackTrace(); |
116 |
} |
|
116 |
}*/
|
|
117 | 117 |
} |
118 | 118 |
} |
119 | 119 |
}); |
... | ... | |
147 | 147 |
CoordinateReferenceSystem crs = getSelectedCoordinateReferenceSystem(); |
148 | 148 |
if( crs == null ) { |
149 | 149 |
txtDefinition.setText(""); |
150 |
} else { |
|
150 |
} else {/* cmi tmp
|
|
151 | 151 |
try { |
152 | 152 |
txtDefinition.setText(crs.getDefinition().toWKT()); |
153 | 153 |
} catch (org.gvsig.proj.catalog.exception.UnsupportedCoordinateReferenceSystemException e1) { |
... | ... | |
156 | 156 |
} catch (UnsupportedOperationException e1) { |
157 | 157 |
// TODO Auto-generated catch block |
158 | 158 |
e1.printStackTrace(); |
159 |
} |
|
159 |
} */
|
|
160 | 160 |
} |
161 | 161 |
} |
162 | 162 |
}); |
163 | 163 |
|
164 | 164 |
} |
165 | 165 |
|
166 |
@Override |
|
166 |
// cmi tmp @Override
|
|
167 | 167 |
public JComponent asJComponent() { |
168 | 168 |
return this; |
169 | 169 |
} |
... | ... | |
182 | 182 |
String authority = authorityModel.getSelectedAuthority(); |
183 | 183 |
String code = (String) this.lstCodes.getSelectedValue(); |
184 | 184 |
if (authority != null && code != null) { |
185 |
/* cmi tmp |
|
185 | 186 |
try { |
186 | 187 |
CRSDefinition def = uimanager.getCatalogManager().getCRSDefinition(authority+":"+code); |
187 |
return uimanager.getManager().getCoordinateReferenceSystem(def); |
|
188 |
return uimanager.getCRSManager().getCoordinateReferenceSystem(def);
|
|
188 | 189 |
} catch (UnsupportedCoordinateReferenceSystemException e) { |
189 | 190 |
LOG.error("Could not find CRS with authority: " + authority |
190 | 191 |
+ " and code: " + code, e); |
... | ... | |
194 | 195 |
} catch (CoordinateReferenceSystemException e) { |
195 | 196 |
// TODO Auto-generated catch block |
196 | 197 |
e.printStackTrace(); |
197 |
} |
|
198 |
}*/
|
|
198 | 199 |
} |
199 | 200 |
return crs; |
200 | 201 |
} |
201 | 202 |
|
202 | 203 |
public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs) { |
203 | 204 |
if (crs != null) { |
204 |
CRSDefinition definition; |
|
205 |
CRSDefinition definition;/*
|
|
205 | 206 |
try { |
206 | 207 |
definition = crs.getDefinition(); |
207 | 208 |
authorityModel.setSelectedAuthority(definition.getAuthorityName()); |
... | ... | |
211 | 212 |
| UnsupportedOperationException e) { |
212 | 213 |
// TODO Auto-generated catch block |
213 | 214 |
e.printStackTrace(); |
214 |
} |
|
215 |
}*/
|
|
215 | 216 |
} |
216 | 217 |
} |
217 | 218 |
} |
Also available in: Unified diff