当前位置: 首页>>代码示例>>Java>>正文


Java RenderableLayer类代码示例

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


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

示例1: importFenceDiagram

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public static void importFenceDiagram(JFrame frame, WorldWindow ww, WWMapApp mapApp) {
	ImportFenceDiagramDialog dialog = new ImportFenceDiagramDialog(frame);
	if (dialog.image == null || dialog.nav == null) return;

	int baseElev;
	try {
		 baseElev = NumberFormat.getIntegerInstance().parse(dialog.baseElevation.getText()).intValue();
	} catch (ParseException e) {
		e.printStackTrace();
		return;
	}

	FenceDiagram fd = new FenceDiagram(ww, 
			dialog.nav, 
			baseElev * 1000,
			1, 
			dialog.image);
	RenderableLayer rl = new RenderableLayer();
	rl.setName(dialog.name.getText());
	rl.addRenderable(fd);

	mapApp.makeLayerVisible(rl);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:24,代码来源:ImportFenceDiagram.java

示例2: loadDB

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
@Override
public boolean loadDB() {
	if (!super.loadDB())
		return false;
	
	trackLayer = new RenderableLayer();
	
	iconLayer = new IconLayer();
	icon = new UserFacingIcon("org/geomapapp/resources/icons/wdot.png", Position.fromDegrees(0, 0, 0));
	icon.setSize( new Dimension(16,16));
	icon.setVisible(false);
	iconLayer.addIcon(icon);
	
	layerSet = new LayerSet();
	layerSet.setName(getDBName());
	layerSet.add( trackLayer );
	layerSet.add( iconLayer );

	layer = new WWLayer(layerSet) {
		public void close() {
			((MapApp)map.getApp()).closeDB(WWSCS.this);
		}
		public Database getDB() {
			return WWSCS.this;
		}
	};
	
	scsTiles = new SCSTileLayer(
			new SCSTrackTiler(cruises));
	
	layerSet.add(scsTiles);
	
	ww.getInputHandler().addMouseListener(terrainListener);
	
	return true;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:37,代码来源:WWSCS.java

示例3: loadDB

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
@Override
public boolean loadDB() {
	if (!super.loadDB())
		return false;

	layerSet = new LayerSet();
	layerSet.setName(getDBName());

	layer = new WWLayer(layerSet) {
		@Override
		public Database getDB() {
			return WWXMCS.this;
		}

		@Override
		public void close() {
			((MapApp)map.getApp()).closeDB(WWXMCS.this);
		}
	};

	tracklayer = new RenderableLayer();
	makeCruiseAreas();
	
	iconLayer = new IconLayer();
	
	layerSet.add(tracklayer);
	layerSet.add(iconLayer);

	ww.getInputHandler().addMouseListener(this);

	makeTrackLines();
	updateSelectedTrack();
	return true;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:35,代码来源:WWXMCS.java

示例4: getLayer

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public Layer getLayer() {
	if (layer == null) {
		wwSceneGraph = new WWSceneGraph();
		renderableLayer = new RenderableLayer();

		if (dataSets!=null&&dataSets.size()>0)
			for (Iterator iter = dataSets.iterator(); iter.hasNext();) {
				WWUnknownDataSet d = (WWUnknownDataSet) iter.next();
				d.setLayerSceneGraph(wwSceneGraph);
				d.setRenderableLayer(renderableLayer);
				d.updateLayer();
			}

		layerSet = new LayerSet();
		layerSet.setName("Import Data");
		layerSet.add(wwSceneGraph);
		layerSet.add(renderableLayer);

		layer = new WWLayer(layerSet){
			public Database getDB() {
				return WWCustomDB.this;
			}

			public void close() {
				WWCustomDB.this.close();
				if (dataSets.size() != 0)
					return;

				((MapApp) map.getApp()).closeDB(WWCustomDB.this);
			}
		};
	}
	return layer;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:35,代码来源:WWCustomDB.java

示例5: loadDB

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
@Override
public boolean loadDB() {
	if (!super.loadDB())
		return false;
	
	trackLayer = new RenderableLayer();
	
	iconLayer = new IconLayer();
	icon = new UserFacingIcon("org/geomapapp/resources/icons/wdot.png", Position.fromDegrees(0, 0, 0));
	icon.setSize( new Dimension(16,16));
	icon.setVisible(false);
	iconLayer.addIcon(icon);
	
	layerSet = new LayerSet();
	layerSet.setName(getDBName());
	layerSet.add( trackLayer );
	layerSet.add( iconLayer );
	
	layer = new WWLayer(layerSet) {
		public void close() {
			((MapApp)map.getApp()).closeDB(WWMGG.this);
		}
		public Database getDB() {
			return WWMGG.this;
		}
	};
	
	newTrackSet(mggSel.getLoadedControlFiles());
	
	ww.getInputHandler().addMouseListener(terrainListener);
	
	return true;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:34,代码来源:WWMGG.java

示例6: loadDB

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
@Override
public boolean loadDB() {
	if (!super.loadDB())
		return false;
	
	layerSet = new LayerSet();
	layerSet.setName(getDBName());
	
	layer = new WWLayer(layerSet) {
		public void close() {
			((MapApp)map.getApp()).closeDB(WWMBTracks.this);
		}
		public Database getDB() {
			return WWMBTracks.this;
		}
	};

	mbTiles = new MBTileLayer(
			new MBTrackTiler(cruises));
	
	trackLayer = new RenderableLayer();
	layerSet.add( trackLayer );
	layerSet.add(mbTiles);

	ww.getInputHandler().addMouseListener(terrainListener);
	
	return true;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:29,代码来源:WWMBTracks.java

示例7: getBackgroundLayers

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
private ArrayList<Layer> getBackgroundLayers() {
	ArrayList<Layer> layers = new ArrayList<Layer>();
	LayerList wwdlayers = wwd.getModel().getLayers();
	for (Layer layer : wwdlayers) {
		if (isHiddenLayer(layer) || layer instanceof TellervoDataLayer || layer instanceof Renderable
				|| layer instanceof RenderableLayer)
			continue;

		layers.add(layer);

	}
	return layers;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:14,代码来源:TellervoLayerPanel.java

示例8: getDataLayers

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
private ArrayList<Layer> getDataLayers() {
	ArrayList<Layer> layers = new ArrayList<Layer>();

	for (Layer layer : wwd.getModel().getLayers()) {
		if (isHiddenLayer(layer))
			continue;

		if (layer instanceof TellervoDataLayer || layer instanceof Renderable || layer instanceof RenderableLayer) {
			layers.add(layer);
		}
	}
	return layers;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:14,代码来源:TellervoLayerPanel.java

示例9: detach

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public void detach()
{
    this.getController().setEnabled(false);

    RenderableLayer layer = this.getMapPanel().getAnnotationLayer();
    layer.removeRenderable(this.getAnnotation());
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:8,代码来源:WWJPanel.java

示例10: attach

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public void attach()
{
    this.getController().setEnabled(true);

    RenderableLayer layer = this.mapPanel.getAnnotationLayer();
    layer.removeRenderable(this.getAnnotation());
    layer.addRenderable(this.getAnnotation());
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:9,代码来源:WWJPanel.java

示例11: AppFrame

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public AppFrame()
{
    super(true, true, false);

    // Add a controller to send input events to BrowserBalloons.
    this.hotSpotController = new HotSpotController(this.getWwd());
    // Add a controller to handle link and navigation events in BrowserBalloons.
    this.balloonController = new MarkerBalloonController(this.getWwd());

    MarkerAttributes attrs = new BasicMarkerAttributes(Material.WHITE, BasicMarkerShape.SPHERE, 1d, 10, 5);

    double lon = -110.0;
    double minLat = 20, maxLat = 60, latDelta = 2;

    RenderableLayer balloonLayer = new RenderableLayer();
    insertBeforePlacenames(this.getWwd(), balloonLayer);

    int i = 0;
    java.util.List<Marker> markers = new ArrayList<Marker>();
    for (double lat = minLat; lat <= maxLat; lat += latDelta)
    {
        Marker marker = new MyMarker(Position.fromDegrees(lat, lon, 0), attrs, i);
        markers.add(marker);
        i++;
    }

    MarkerLayer layer = new MarkerLayer();
    layer.setKeepSeparated(false);
    layer.setElevation(1000d);
    layer.setMarkers(markers);
    insertBeforePlacenames(this.getWwd(), layer);
}
 
开发者ID:parkerabercrombie,项目名称:worldwind-examples,代码行数:33,代码来源:BalloonForMarker.java

示例12: SectorSelector

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public SectorSelector(WorldWindow worldWindow) {
    if (worldWindow == null) {
        String msg = Logging.getMessage("nullValue.WorldWindow");
        Logging.logger().log(java.util.logging.Level.SEVERE, msg);
        throw new IllegalArgumentException(msg);
    }

    this.wwd = worldWindow;

    this.layer = new RenderableLayer();
    this.shape = new RegionShape(Sector.EMPTY_SECTOR);
    ((RenderableLayer) this.layer).addRenderable(this.shape);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:14,代码来源:SectorSelector.java

示例13: ScreenSelector

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
public ScreenSelector( WorldWindow worldWindow ) {
    if (worldWindow == null) {
        String msg = Logging.getMessage("nullValue.WorldWindow");
        Logging.logger().severe(msg);
        throw new IllegalArgumentException(msg);
    }

    this.wwd = worldWindow;
    this.layer = this.createLayer();
    this.layer.setPickEnabled(false); // The screen selector is not
                                      // pickable.
    this.selectionRect = this.createSelectionRectangle();
    ((RenderableLayer) this.layer).addRenderable(this.selectionRect);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:15,代码来源:ScreenSelector.java

示例14: SimpleShapeDraggingRx

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的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

示例15: GuiFrame

import gov.nasa.worldwind.layers.RenderableLayer; //导入依赖的package包/类
GuiFrame() throws GeometryException, TriangulationException {
    navMeshModel = new NavigationMeshModel();

    final List<Layer> layers = new ArrayList<Layer>();
    final RenderableLayer navMeshLayer = new RenderableLayer();
    navMeshLayer.setPickEnabled(false);
    final RenderableLayer constrainedEdgeLayer = new RenderableLayer();
    constrainedEdgeLayer.setPickEnabled(false);
    final RenderableLayer obstacleEditorLayer = new RenderableLayer();
    final RenderableLayer obstaclesLayer = new RenderableLayer();
    layers.add(navMeshLayer);
    layers.add(constrainedEdgeLayer);
    layers.add(obstacleEditorLayer);
    layers.add(obstaclesLayer);

    // Create the WorldWindow.
    final WorldWindPanel wwp = new WorldWindPanel(layers);

    getContentPane().add(wwp, BorderLayout.CENTER);

    final WorldWindow wwd = wwp.getWwd();
    final ObstaclesModel obstaclesModel = new ObstaclesModel();
    final ObstacleEditor editor = new ObstacleEditor(obstaclesModel, wwd);

    final ObstacleEditorListener oel = new ObstacleEditorView(obstacleEditorLayer);
    final ObstaclesModelListener ol = new ObstaclesView(obstaclesLayer);
    final NavigationMeshModelListener nl = new NavigationMeshView(navMeshLayer, constrainedEdgeLayer);

    final WorldWindowController controller = new WorldWindowController(wwd, editor, navMeshModel);
    wwd.getInputHandler().addMouseListener(controller);
    wwd.addSelectListener(controller);
    pack();

    // Center the application on the screen.
    WWUtil.alignComponent(null, this, AVKey.CENTER);
    setResizable(true);
    navMeshModel.addListener(nl);
    editor.addListener(oel);
    obstaclesModel.addListener(ol);
}
 
开发者ID:ofmooseandmen,项目名称:sherpa,代码行数:41,代码来源:GuiFrame.java


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