public AppFrame() { WorldWindowGLCanvas wwd = new WorldWindowGLCanvas(); wwd.setPreferredSize(new java.awt.Dimension(1000, 800)); this.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER); this.pack(); wwd.setModel(new BasicModel()); }
public ShapefilesLayerTest() { wwd = new WorldWindowGLCanvas(); wwd.setPreferredSize(new java.awt.Dimension(1000, 800)); this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER); wwd.setModel(new BasicModel()); shapefile = new ShapefilesLayer(); layers = shapefile.makeShapefileLayers(FILE_PATH); for (Layer l : layers) { ApplicationTemplate.insertBeforePlacenames(wwd, l); } wwd.redraw(); }
public void flyToLatLon(LatLon latlon, double zoom) { Globe globe = canvas.getModel().getGlobe(); Position position = new Position(latlon, globe.getElevation(latlon.getLatitude(), latlon.getLongitude())); flyToPosition(position, zoom); }
private void initializeEvents() { final WorldWindowGLCanvas wwGLCanvas = GGlobeApplication.instance().getWorldWindowGLCanvas(); wwGLCanvas .getInputHandler() .addMouseListener( new MouseAdapter() { @Override public void mouseClicked(final MouseEvent e) { final View view = wwGLCanvas.getView(); final Line ray = view.computeRayFromScreenPoint(e.getX(), e.getY()); if (pick(ray) != null) { e.consume(); } } }); }
public ScenarioController(VegetationScenarioApp appFrame) { this.appFrame = appFrame; this.canvas = appFrame.getWwd(); this.view = (OrbitView) canvas.getView(); }