Package org.earth3d.jearth.model

Examples of org.earth3d.jearth.model.ServiceList


    mainWindow.addToSideBar(button, 0);
    button.addActionListener(this);
  }

  public void actionPerformed(ActionEvent e) {
    ServiceList serviceList = getMainWindow().getGeoDataModel().getServiceList();
   
    serviceIndex = serviceIndex % serviceList.getServices().size();
    try {
      conf.setPropery("mapnumber", ""+serviceIndex);
    } catch (IOException e1) {
      e1.printStackTrace();
    }
   
    GeoDataModel geoDataModel = getMainWindow().getGeoDataModel();
    geoDataModel.loadGeometry(geoDataModel.loadService(serviceList.getServices().get(serviceIndex++)).getGeometry());
  }
View Full Code Here


    }
   
    assertTrue(downloadedAddresses>0);
   
    // now download a service list
    serviceList = new ServiceList();
    serviceList.addListener(new DownloadFinishedListener() {
     
      public void downloadFinished(DownloadFinishedData dfd) {
        List<Service> services = serviceList.getServices();
        for (Service s : services) {
View Full Code Here

      serviceIndex = Integer.parseInt(value);
    }

    // load first geometry into model
    GeoDataModel geoDataModel = getMainWindow().getGeoDataModel();
    ServiceList serviceList = getMainWindow().getGeoDataModel().getServiceList();
    geoDataModel.loadGeometry(geoDataModel.loadService(serviceList.getServices().get(serviceIndex++)).getGeometry());
  }
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();
    } catch (SAXException e) {
View Full Code Here

   * @param em the current ExtensionManager
   * @param gdm the GeoDataModel where the serviceList for the SwitchMapButton is taken from
   */
  protected void loadInternalPlugins(ExtensionManager em, GeoDataModel gdm, Configuration conf) {
    // load data model
    ServiceList serviceList = null;
    try {
      ServerList serverList = gdm.loadServerList("http://www.earth3d.org/earth3daddresses.xml");
      serviceList = gdm.loadServiceList(serverList.getAddresses().get(1));
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    // add controller
    TreeViewServicesManager tvsm = new TreeViewServicesManager();
    tvsm.setConfiguration(conf);
    tvsm.setExtensionManager(em);
    tvsm.init();

    // load first geometry into model
    String value = conf.getProperty("mapnumber");
    int serviceIndex = 0;
    if (value != null) {
      serviceIndex = Integer.parseInt(value);
    }
    gdm.loadGeometry(gdm.loadService(serviceList.getServices().get(serviceIndex++)).getGeometry());

    // load main window
    createMainWindow(gdm, em, conf);
   
    // load info windows
View Full Code Here

    super();
   
    getJButtonOK().addActionListener(new ActionListener() {
   
      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.ServiceList

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.