Package org.earth3d.jearth.model

Examples of org.earth3d.jearth.model.Service


    }

    assertTrue(downloadedServices>0);

    // now choose the first service for download
    Service service = serviceList.getServices().get(0);
    service.addListener(new DownloadFinishedListener() {
     
      public void downloadFinished(DownloadFinishedData dfd) {
        synchronized(sl) {
          sl.notifyAll();
        }
      }
   
      public void downloadFailed(DownloadFinishedData dfd, Exception e) {
        InfoWindow.showError(e);

        synchronized(sl) {
          sl.notifyAll();
        }
      }
    });
    service.download();

    synchronized(sl) {
      sl.wait();
    }

    assertTrue(service.getGeometry() != null);
    assertEquals("sphere", ((GeometryMapTree) service.getGeometry()).getBase());
   
    // then download the first texture map tile and heightfield map tile
    GeometryMapTree geometry = (GeometryMapTree) service.getGeometry();
    geometry.addListener(new DownloadFinishedListener() {
     
      public void downloadFinished(DownloadFinishedData dfd) {
        synchronized(sl) {
          sl.notifyAll();
View Full Code Here


      // create a geometry file for this map
      Geometry geo = createGeometryFile(getOutputDir() + File.separator + "geometry.mxml");
     
      // create a service file for this geometry
      ServiceList sl = new ServiceList();
      Service service = sl.addGeometry("geometry.mxml", geo);
      service.setName(getMapName());
      sl.writeXML(getOutputDir() + File.separator + "service.sxml");
     
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

  protected void doubleClickEvent(int selRow, TreePath selPath) {
    TreeNode clickedNode = (TreeNode) selPath.getLastPathComponent();

    if (clickedNode instanceof ServiceTreeNode) {
      Service clickedService = ((ServiceTreeNode) clickedNode).getService();
     
      if (clickedService != null) {
        GeoDataModel geoDataModel = getMainWindow().getGeoDataModel();
        geoDataModel.loadGeometry(geoDataModel.loadService(clickedService).getGeometry());
      }
View Full Code Here

   
      public void actionPerformed(ActionEvent e) {
        ServiceList sl;
        try {
          sl = geoDataModel.loadServiceList(new URL(getJTextFieldURL().getText()));
          Service service = geoDataModel.loadService(sl.getServices().get(0));
          Geometry geo = geoDataModel.loadGeometry(service.getGeometry());
          dispose();
        } catch (MalformedURLException e1) {
          e1.printStackTrace();
        }
      }
View Full Code Here

TOP

Related Classes of org.earth3d.jearth.model.Service

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.