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


Java LayerList类代码示例

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


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

示例1: addOverlay

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
@Override
public void addOverlay( String name, Overlay overlay, int index, String infoURLString, boolean fireChange, XML_Menu xml_item) {
	super.addOverlay(name, overlay, index, infoURLString, fireChange, xml_item);
	if (overlay instanceof WWOverlay) {
		WWOverlay wwOverlay = (WWOverlay)overlay;
		Layer layer = wwOverlay.getLayer();

		if (layer instanceof WWLayer)
			((WWLayer) layer).setInfoURL(infoURLString);

		LayerList layers = wwd.getModel().getLayers();
		if (layers.contains(layer)) return;

		layers.add( layer );
		wwd.addSelectListener( wwOverlay.getSelectListener() );
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:18,代码来源:WWMap.java

示例2: updateCreditButtonState

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
protected void updateCreditButtonState() {
	LayerList ll = wwModel.getLayers();
	for (int i = ll.size() - 1; i >= 0; i--) {
		Layer l = ll.get(i);
		if (l.isEnabled() && (l.getOpacity() > .2)) {
			for (Class<?> c : l.getClass().getInterfaces())
				if (c.equals( InfoSupplier.class )) {
					((WWMapTools)tools).creditB.setEnabled(true);
					return;
				}
			((WWMapTools)tools).creditB.setEnabled(false);
			return;
		}
	}
	((WWMapTools)tools).creditB.setEnabled(false);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:WWMapApp.java

示例3: makeLayerVisible

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
public synchronized void makeLayerVisible(Layer newLayer, boolean ignoreLayer) {
	if (newLayer == null) return;

	if (ignoreLayer)
		layerManager.addIgnoredLayer(newLayer);

	LayerList ll = wwModel.getLayers();

	newLayer.setEnabled(true);
	if (newLayer.getOpacity() < .3)
		newLayer.setOpacity(1);

	ll.remove(newLayer);
	ll.add(ll.size(), newLayer);

	if (!ignoreLayer)
		setLayerManagerVisible(true);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:19,代码来源:WWMapApp.java

示例4: toLayerList

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
private List<ILayer> toLayerList(LayerList ll) {
	List<ILayer> layers = new ArrayList<ILayer>();

	for (Layer layer : ll) {
		WWILayer ilayer = new LayerManager.WWILayer(layer);

		if (layer instanceof InfoSupplier) {
			String infoURL = ((InfoSupplier) layer).getInfoURL();
			ilayer.setInfoURL(infoURL);
		}
		if (layer instanceof LegendSupplier) {
			String legendURL = ((LegendSupplier) layer).getLegendURL();
			ilayer.setLegendURL(legendURL);
		}
		if (layer instanceof WESNSupplier) {
			ilayer.setWESN(((WESNSupplier)layer).getWESN());
		}
		layers.add(ilayer);
	}
	return layers;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:22,代码来源:WWMapApp.java

示例5: TellervoLayerManagerLayer

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

    this.wwd = wwd;
    
    for(Layer layer : visibleLayers)
    {
    	this.visibleLayerNames.add(layer.getName());
    }
    
    this.initialize();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:19,代码来源:TellervoLayerManagerLayer.java

示例6: enable

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
public void enable() {
    this.getShape().setStartPosition(null);

    LayerList layers = this.getWwd().getModel().getLayers();

    if (!layers.contains(this.getLayer()))
        layers.add(this.getLayer());

    if (!this.getLayer().isEnabled())
        this.getLayer().setEnabled(true);

    this.setArmed(true);

    this.getWwd().addRenderingListener(this);
    this.getWwd().addSelectListener(this);
    this.getWwd().getInputHandler().addMouseListener(this);
    this.getWwd().getInputHandler().addMouseMotionListener(this);

    this.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:21,代码来源:SectorSelector.java

示例7: enable

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
public void enable() {
    // Clear any existing selection and clear set the SceneController's pick
    // rectangle. This ensures that this
    // ScreenSelector starts with the correct state when enabled.
    this.selectionRect.clearSelection();
    this.getWwd().getSceneController().setPickRectangle(null);

    // Add and enable the layer that displays this ScreenSelector's
    // selection rectangle.
    LayerList layers = this.getWwd().getModel().getLayers();

    if (!layers.contains(this.getLayer()))
        layers.add(this.getLayer());

    if (!this.getLayer().isEnabled())
        this.getLayer().setEnabled(true);

    // Listen for mouse input on the World Window.
    this.getWwd().getInputHandler().addMouseListener(this);
    this.getWwd().getInputHandler().addMouseMotionListener(this);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:22,代码来源:ScreenSelector.java

示例8: isUpToDate

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
protected boolean isUpToDate(WorldWindow wwd)
{
    // Determines whether this layer manager's layer list is consistent with the specified WorldWindow's. Knowing
    // this prevents redundant updates.

    LayerList layerList = wwd.getModel().getLayers();

    if (this.layerPanels.size() != layerList.size())
        return false;

    for (int i = 0; i < layerList.size(); i++)
    {
        if (layerList.get(i) != this.layerPanels.get(i).getLayer())
            return false;
    }

    return true;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:19,代码来源:LayerManagerPanel.java

示例9: getValidLayers

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
private LayerList getValidLayers() {
    final LayerList validLayers = new LayerList();
    final LayerList allLayers = wwd.getModel().getLayers();
    for (Layer l : allLayers) {
        if (l.getName().equalsIgnoreCase("Atmosphere") || l.getName().equalsIgnoreCase("World Map") ||
                l.getName().equalsIgnoreCase("Scale bar") || l.getName().equalsIgnoreCase("Compass") ||
                l.getName().equalsIgnoreCase("NASA Blue Marble Image"))
            continue;
        if (l.getName().equalsIgnoreCase("MS Bing Aerial"))
            virtualEarthAerialLayer = l;
        else if (l.getName().equalsIgnoreCase("MS Bing Roads"))
            virtualEarthRoadsLayer = l;
        else if (l.getName().equalsIgnoreCase("MS Bing Hybrid"))
            virtualEarthHybridLayer = l;

        validLayers.add(l);
    }
    return validLayers;
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:20,代码来源:LayerPanelLayer.java

示例10: setSelectedProduct

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
public void setSelectedProduct(final Product product) {
    if (product == getSelectedProduct() && eyePosition == getWwd().getView().getEyePosition())
        return;

    final LayerList layerList = getWwd().getModel().getLayers();
    layerList.stream().filter(layer -> layer instanceof WWLayer).forEach(layer -> {
        final WWLayer wwLayer = (WWLayer) layer;
        wwLayer.setSelectedProduct(product);
    });

    if (isVisible()) {
        gotoProduct(product);
        getWwd().redrawNow();
        eyePosition = getWwd().getView().getEyePosition();
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:17,代码来源:WWBaseToolView.java

示例11: makeControlPanel

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
private JPanel makeControlPanel() {

        final JPanel controlPanel = new JPanel(new GridLayout(2, 1, 5, 5));
        controlPanel.setBorder(new EmptyBorder(15, 15, 15, 15));

        final LayerList layerList = getWwd().getModel().getLayers();
        for (Layer layer : layerList) {
            if (layer instanceof WWLayer) {
                final WWLayer wwLayer = (WWLayer) layer;
                final JPanel layerControlPanel = wwLayer.getControlPanel(getWwd());
                controlPanel.add(layerControlPanel);
            }
        }

        return controlPanel;
    }
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:17,代码来源:WWAnalysisToolView.java

示例12: updateSunAngleProvider

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
protected void updateSunAngleProvider() {
	LayerList ll = wwModel.getLayers();
	for (int i = ll.size() - 1; i >= 0; i--) {
		Layer l = ll.get(i);
		if (l.isEnabled() && (l.getOpacity() > .4) &&
				true)
			for (Class<?> c : l.getClass().getInterfaces())
				if (c.equals( SunAngle.class ) && ((SunAngle) l).isSunValid()) {
					compassLayer.setAngleSupplier((SunAngle) l);
					return;
				}
	}
	compassLayer.setAngleSupplier(null);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:15,代码来源:WWMapApp.java

示例13: updateColorScaleProvider

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
protected void updateColorScaleProvider() {
	LayerList ll = wwModel.getLayers();
	for (int i = ll.size() - 1; i >= 0; i--) {
		Layer l = ll.get(i);
		if (l.isEnabled() && (l.getOpacity() > .2)) {
			for (Class<?> c : l.getClass().getInterfaces())
				if (c.equals( ColorScale.class ) && ((ColorScale) l).isColorScaleValid()) {
					colorScaleLayer.setScaleSupplier((ColorScale) l);
					return;
				}
		}
	}
	colorScaleLayer.setScaleSupplier(null);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:15,代码来源:WWMapApp.java

示例14: disposeLayer

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
private void disposeLayer(Class<?> c) {
	LayerList ll = wwModel.getLayers();

	for (Layer layer : ll) {
		if (c.isInstance(layer)) {
			ll.remove(layer);
			layer.dispose();
			return;
		}
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:12,代码来源:WWMapApp.java

示例15: showCredit

import gov.nasa.worldwind.layers.LayerList; //导入依赖的package包/类
public void showCredit() {
	LayerList ll = wwModel.getLayers();
	for (int i = ll.size() - 1; i >= 0; i--) {
		Layer l = ll.get(i);
		if (l.isEnabled() && (l.getOpacity() > .2)) {
			for (Class<?> c : l.getClass().getInterfaces())
				if (c.equals( InfoSupplier.class )) {
					String url = ((InfoSupplier) l).getInfoURL();
					BrowseURL.browseURL(url);
				}
			return;
		}
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:15,代码来源:WWMapApp.java


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