• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WorldWindowGLCanvas类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中gov.nasa.worldwind.awt.WorldWindowGLCanvas的典型用法代码示例。如果您正苦于以下问题:Java WorldWindowGLCanvas类的具体用法?Java WorldWindowGLCanvas怎么用?Java WorldWindowGLCanvas使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WorldWindowGLCanvas类属于gov.nasa.worldwind.awt包,在下文中一共展示了WorldWindowGLCanvas类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createPlace

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
@Override
protected MapPlace createPlace(MapPlace root, String text, double x,
		double y, double zoom) {
	WorldWindowGLCanvas wwd = ((WWMap) map).wwd;
	OrbitView view = (OrbitView) wwd.getView();

	zoom = ((WWMap) map).getGMAZoom();
	Position pos = view.getCenterPosition();
	double pitch = view.getPitch().degrees;
	double heading = view.getHeading().degrees;
	double zoom2 = view.getZoom();
	double ve = wwd.getSceneController().getVerticalExaggeration();

	return new WWMapPlace( 
			root,
			text, 
			pos.getLongitude().degrees,
			pos.getLatitude().degrees,
			zoom,
			pitch,
			heading,
			zoom2,
			ve);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:25,代码来源:WWMapPlaces.java


示例2: DialogTerrainProfileConfig

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public DialogTerrainProfileConfig(	final WorldWindowGLCanvas wwcanvas,
									final TerrainProfileLayer profileLayer,
									final IDialogSettings state) {

	_wwcanvas = wwcanvas;
	_profileLayer = profileLayer;
	_state = state;

	_toolProvider = new TerrainToolProvider();

	_selectionListener = new SelectionAdapter() {
		@Override
		public void widgetSelected(final SelectionEvent e) {
			if (_isUpdateUI) {
				return;
			}
			onModify();
		}
	};
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:DialogTerrainProfileConfig.java


示例3: addProduct

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public void addProduct(final Product product, WorldWindowGLCanvas wwd) {
    theWWD = wwd;

    final String name = getUniqueName(product);
    if (this.outlineTable.get(name) != null)
        return;

    final GeoCoding geoCoding = product.getSceneGeoCoding();
    if (geoCoding == null) {
        final String productType = product.getProductType();
        if (productType.equals("ASA_WVW_2P") || productType.equals("ASA_WVS_1P") || productType.equals("ASA_WVI_1P")) {
            addWaveProduct(product);
        }
    } else {

        if (enableSurfaceImages) {
            final InputProductValidator validator = new InputProductValidator(product);
            if (validator.isMapProjected() && product.getSceneGeoCoding() != null) {
                addSurfaceImage(product);
            }
        }

        // add outline
        addOutline(product);
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:27,代码来源:DefaultProductLayer.java


示例4: getControlPanel

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public JPanel getControlPanel(final WorldWindowGLCanvas wwd) {
    final JSlider opacitySlider = new JSlider();
    opacitySlider.setMaximum(100);
    opacitySlider.setValue((int) (getOpacity() * 100));
    opacitySlider.setEnabled(true);
    opacitySlider.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            int value = opacitySlider.getValue();
            setOpacity(value / 100d);
            wwd.repaint();
        }
    });

    //theSelectedObjectLabel = new JLabel("Selected: ");

    final JPanel opacityPanel = new JPanel(new BorderLayout(5, 5));
    opacityPanel.add(new JLabel("Opacity"), BorderLayout.WEST);
    opacityPanel.add(opacitySlider, BorderLayout.CENTER);
    return opacityPanel;
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:21,代码来源:DefaultProductLayer.java


示例5: initWorldWindLayerModel

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
private void initWorldWindLayerModel()
{
    Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    model.setShowWireframeExterior(false);
    model.setShowWireframeInterior(false);
    model.setShowTessellationBoundingVolumes(false);

    if (is3DGlobe) {
        model.setGlobe(new Earth());
    } else {
        model.setGlobe(new EarthFlat());
    }

    world = new WorldWindowGLCanvas();
    world.setModel(model);
}
 
开发者ID:vobject,项目名称:maru,代码行数:17,代码来源:WorldWindMap.java


示例6: WWMap

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public WWMap(MapApp app, WorldWindowGLCanvas wwd) {
	super(app, new ConstrainedIdentityProjection(), 1, 1);
	this.wwd = wwd;
	visibleSector = Sector.FULL_SPHERE;

	wwd.getSceneController().addPropertyChangeListener(new PropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent evt) {
			if (evt.getPropertyName().equals(AVKey.VIEW)) {
				checkVisibleSector();
			}
		}
	});
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:14,代码来源:WWMap.java


示例7: WWMapTools

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public WWMapTools(MapApp app, XMap map, WorldWindowGLCanvas wwCanvas) {
	super(app, map);
	this.wwCanvas = wwCanvas;

	wwCanvas.getInputHandler().addMouseMotionListener(
			new MouseInputAdapter() {
				@Override
				public void mouseMoved(MouseEvent e) {
					lastPoint = e.getPoint();
					
					SwingUtilities.invokeLater(new Runnable() {
						public void run() {
							updateInfo();
						}
					});
				}
			});

	wwCanvas.addRenderingListener(new RenderingListener() {
		public void stageChanged(RenderingEvent event) {
			if (event.getStage().equals(RenderingEvent.AFTER_BUFFER_SWAP)) {
				alt = WWMapTools.this.wwCanvas.getView().getEyePosition().getElevation()/1000;

				SwingUtilities.invokeLater(new Runnable() {
					public void run() {
						updateInfo();
					}
				});
			}
		}
	});
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:33,代码来源:WWMapTools.java


示例8: findWorldWindView

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
protected WorldWindowGLCanvas findWorldWindView() {
    final WWWorldViewToolView window = (WWWorldViewToolView)
            WindowManager.getDefault().findTopComponent("WWWorldMapToolView");
    if(window != null) {
        return window.getWwd();
    }
    return null;
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:9,代码来源:WWBaseToolView.java


示例9: setProducts

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public void setProducts(final Product[] products) {
    WorldWindowGLCanvas wwd = getWwd();
    final LayerList layerList = getWwd().getModel().getLayers();
    layerList.stream().filter(layer -> layer instanceof WWLayer).forEach(layer -> {
        final WWLayer wwLayer = (WWLayer) layer;
        for (Product prod : products) {
            try {
                wwLayer.addProduct(prod, wwd);
            } catch (Exception e) {
                SnapApp.getDefault().handleError("WorldWind unable to add product " + prod.getName(), e);
            }
        }
    });
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:15,代码来源:WWBaseToolView.java


示例10: AppPanel

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public AppPanel(final WorldWindowGLCanvas shareWith, final boolean includeStatusBar, final boolean flatWorld,
                final boolean removeExtraLayers) {
    super(new BorderLayout());

    this.wwd = new WorldWindowGLCanvas(shareWith);

    // Create the default model as described in the current worldwind properties.
    final Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    this.wwd.setModel(m);
    if (flatWorld) {
        m.setGlobe(new EarthFlat());
        this.wwd.setView(new FlatOrbitView());
    } else {
        m.setGlobe(new Earth());
        this.wwd.setView(new BasicOrbitView());
    }

    if (removeExtraLayers) {
        final LayerList layerList = m.getLayers();
        for (Layer layer : layerList) {
            if (layer instanceof CompassLayer || layer instanceof WorldMapLayer || layer instanceof StarsLayer ||
                    layer instanceof LandsatI3WMSLayer || layer instanceof SkyGradientLayer)
                layerList.remove(layer);
        }
    }

    // Setup a select listener for the worldmap click-and-go feature
    this.wwd.addSelectListener(new ClickAndGoSelectListener(wwd, WorldMapLayer.class));

    this.wwd.getSceneController().setClutterFilter(new PlacemarkClutterFilter());

    this.add(this.wwd, BorderLayout.CENTER);

    if (includeStatusBar) {
        this.statusBar = new MinimalStatusBar();
        this.add(statusBar, BorderLayout.PAGE_END);
        this.statusBar.setEventSource(wwd);
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:40,代码来源:AppPanel.java


示例11: ZoomEvents

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public ZoomEvents()
    {
        WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
        wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
        this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
        wwd.setModel(new BasicModel());

        final Observable<Double> viewEvents = ViewObservables.fromWorldWindViewZooms((OrbitView) wwd.getView());

        viewEvents.subscribe(new Observer<Double>() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(Double propertyChangeEvent) {
                System.out.println("VIEW CHANGE");
            }
        });

//        mouseEventObservable.subscribe(EventConsumer.createMouseEventConsumer());
    }
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:29,代码来源:ZoomEvents.java


示例12: SimpleShapeDraggingRx

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public SimpleShapeDraggingRx(){
    final WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
    wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
    this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
    wwd.setModel(new BasicModel());

    // Add a layer containing an image
    SurfaceImage si = new SurfaceImage("images/400x230-splash-nww.png", Sector.fromDegrees(35, 45, -115, -95));
    RenderableLayer layer = new RenderableLayer();
    layer.addRenderable(si);
    insertBeforePlacenames(wwd, layer);

    final BasicDraggerRx draggableSurfaceImage = BasicDraggerRx.makeDraggable(wwd, si);
    final Observable<Observable<Position>> dragStreams = draggableSurfaceImage.observePositions();

    dragStreams.subscribe(new Action1<Observable<Position>>() {
        @Override
        public void call(Observable<Position> positionObservable) {
            System.out.println("BEGINNING DRAG");
            positionObservable.subscribe(new rx.Observer<Position>() {
                @Override
                public void onCompleted() {
                    System.out.println("DRAGGING COMPLETED");
                }

                @Override
                public void onError(Throwable e) {}

                @Override
                public void onNext(Position position) {
                    //dragging object
                }
            });
        }
    });
}
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:37,代码来源:SimpleShapeDraggingRx.java


示例13: ConsumeZoomEvents

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public ConsumeZoomEvents()
{
    WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
    wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
    this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
    wwd.setModel(new BasicModel());

    final Observable<MouseWheelEvent> mouseWheelObservable =
            MouseObservables.fromWorldWindMouseWheelEvents(wwd.getInputHandler());

    mouseWheelObservable.subscribe(EventConsumer.createMouseEventConsumer());
}
 
开发者ID:eddieburns55,项目名称:RxWorldwind,代码行数:13,代码来源:ConsumeZoomEvents.java


示例14: setupGui

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
private void setupGui(Dimension canvasSize, boolean includeStatusBar)
{
	
    this.wwd = new WorldWindowGLCanvas();
    ((Component) this.wwd).setPreferredSize(canvasSize);
        
    // Create the default model as described in the current worldwind properties.
    Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    this.wwd.setModel(m);
    
    // Setup a select listener for the worldmap click-and-go feature
    this.wwd.addSelectListener(new ClickAndGoSelectListener(this.getWwd(), WorldMapLayer.class));

    this.wwd.addRenderingExceptionListener(new RenderingExceptionListener()
    {
        public void exceptionThrown(Throwable t)
        {
        	GISPanel.this.remove((Component) wwd);
        	GISPanel.this.failedReq();
            return;
                
        }
    });
    
    
    this.add((Component) this.wwd, BorderLayout.CENTER);
   
    
    if (includeStatusBar)
    {
        this.statusBar = new StatusBar();
        this.add(statusBar, BorderLayout.PAGE_END);
        this.statusBar.setEventSource(wwd);
    }
    
    // Add the layer manager layer to the model layer list
    
    if(isMiniMap)
    {
     TellervoLayerManagerLayer layermanager = new TellervoLayerManagerLayer(getWwd(), getWwd().getModel().getLayers());
     layermanager.setName("Show/hide layer list");
     layermanager.setMinimized(true);
     layermanager.setPosition(AVKey.NORTHWEST);
     getWwd().getModel().getLayers().add(layermanager);
    }

    
    this.validate();
    
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:51,代码来源:GISPanel.java


示例15: createWorldWindow

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
protected WorldWindow createWorldWindow()
{
    return new WorldWindowGLCanvas();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:5,代码来源:GISPanel.java


示例16: getWWCanvas

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
public static WorldWindowGLCanvas getWWCanvas() {
	return _ww;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:4,代码来源:Map3Manager.java


示例17: setupWWSelectionListener

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
private void setupWWSelectionListener(final boolean isLayerVisible) {

		final WorldWindowGLCanvas ww = Map3Manager.getWWCanvas();

		if (isLayerVisible) {

			if (_lastAddRemoveAction != 1) {

				_lastAddRemoveAction = 1;
				ww.addSelectListener(this);
			}

		} else {

			if (_lastAddRemoveAction != 0) {

				_lastAddRemoveAction = 0;
				ww.removeSelectListener(this);
			}
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:22,代码来源:TourTrackLayer.java


示例18: setupWWSelectionListener

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
private void setupWWSelectionListener(final boolean isLayerVisible) {

		final WorldWindowGLCanvas ww = Map3Manager.getWWCanvas();

		if (isLayerVisible) {

			if (_lastAddRemoveAction != 1) {

				_lastAddRemoveAction = 1;
				ww.addSelectListener(this);

//				ww.getSceneController().setClutterFilter(_clutterFilter);

			}

		} else {

			if (_lastAddRemoveAction != 0) {

				_lastAddRemoveAction = 0;
				ww.removeSelectListener(this);

//				ww.getSceneController().setClutterFilter(null);
			}
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:MarkerLayer.java


示例19: NwwPanel

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
protected NwwPanel( boolean useWwGlCanvas, boolean withStatusBar, boolean removeDefaultLayers ) {
    super(new BorderLayout());

    // Configuration.setValue(AVKey.INITIAL_LATITUDE, gpsLogShps[0].y);
    // Configuration.setValue(AVKey.INITIAL_LONGITUDE, gpsLogShps[0].x);
    // Configuration.setValue(AVKey.INITIAL_ALTITUDE, 1000);
    // Configuration.setValue(AVKey.INITIAL_PITCH, 45);

    long t1 = System.currentTimeMillis();
    if (useWwGlCanvas) {
        logger.insertDebug("NwwPanel", "Create GLCanvas");
        wwd = new WorldWindowGLCanvas();
    } else {
        logger.insertDebug("NwwPanel", "Create GLJPanel");
        wwd = new WorldWindowGLJPanel();
    }
    // ((Component) wwd).setPreferredSize(new Dimension(500, 500));
    long t2 = System.currentTimeMillis();
    logger.insertDebug("NwwPanel", "Create Canvas - DONE " + (t2 - t1) / 1000);

    logger.insertDebug("NwwPanel", "Create Model");
    Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    this.getWwd().setModel(model);
    long t3 = System.currentTimeMillis();
    logger.insertDebug("NwwPanel", "Create Model - DONE " + (t3 - t2) / 1000);

    if (removeDefaultLayers) {
        logger.insertDebug("NwwPanel", "Remove and add layers");
        LayerList layers = model.getLayers();
        List<Layer> addBack = new ArrayList<>();
        Iterator<Layer> layerIterator = layers.iterator();
        List<String> namesToKeep = NwwUtilities.LAYERS_TO_KEEP_FROM_ORIGNALNWW;
        while( layerIterator.hasNext() ) {
            Layer layer = layerIterator.next();
            if (namesToKeep.contains(layer.getName())) {
                addBack.add(layer);
            }
        }
        layers.clear();
        layers.addAll(addBack);
        long t4 = System.currentTimeMillis();
        logger.insertDebug("NwwPanel", "Remove and add layers - DONE " + (t4 - t3) / 1000);
    }
    this.add((Component) this.getWwd(), BorderLayout.CENTER);

    if (withStatusBar) {
        this.statusBar = new StatusBar();
        this.add(statusBar, BorderLayout.PAGE_END);
        this.statusBar.setEventSource(getWwd());
    }
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:52,代码来源:NwwPanel.java


示例20: createWWPanel

import gov.nasa.worldwind.awt.WorldWindowGLCanvas; //导入依赖的package包/类
AppPanel createWWPanel(final WorldWindowGLCanvas shareWith,
                       final boolean includeStatusBar, final boolean flatWorld, final boolean removeExtraLayers) {
    wwjPanel = new AppPanel(shareWith, includeStatusBar, flatWorld, removeExtraLayers);
    wwjPanel.setPreferredSize(canvasSize);
    return wwjPanel;
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:7,代码来源:WWBaseToolView.java



注:本文中的gov.nasa.worldwind.awt.WorldWindowGLCanvas类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RowSorterListener类代码示例发布时间:2022-05-21
下一篇:
Java IdentityService类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap