Пример #1
0
 private boolean parseURL(DownloadDialog gui) {
   Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText());
   if (b == null) return false;
   gui.boundingBoxChanged(b, BoundingBoxSelection.this);
   updateBboxFields(b);
   updateUrl(b);
   return true;
 }
Пример #2
0
 /** Test URL parsing */
 @Test
 public void testParse() {
   for (ParseTestItem item : parseTestData) {
     Bounds bounds = null;
     try {
       bounds = OsmUrlToBounds.parse(item.url);
     } catch (IllegalArgumentException e) {
       // Ignore. check if bounds is null after
     }
     Assert.assertEquals(item.url, item.bounds, bounds);
   }
 }