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


Java LayerList.contains方法代码示例

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


在下文中一共展示了LayerList.contains方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: updateComponent

import gov.nasa.worldwind.layers.LayerList; //导入方法依赖的package包/类
protected void updateComponent(Object component, boolean enable)
{
    if (component instanceof Layer)
    {
        Layer layer = (Layer) component;
        LayerList layers = this.wwd.getModel().getLayers();

        layer.setEnabled(enable);

        if (enable)
        {
            if (!layers.contains(layer))
            {
                ApplicationTemplate.insertBeforePlacenames(this.wwd, layer);
                this.firePropertyChange("LayersPanelUpdated", null, layer);
            }
        }
        else
        {
            layers.remove(layer);
            this.firePropertyChange("LayersPanelUpdated", layer, null);
        }
    }
    else if (component instanceof ElevationModel)
    {
        ElevationModel model = (ElevationModel) component;
        CompoundElevationModel compoundModel =
            (CompoundElevationModel) this.wwd.getModel().getGlobe().getElevationModel();

        if (enable)
        {
            if (!compoundModel.getElevationModels().contains(model))
                compoundModel.addElevationModel(model);
        }
    }
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:37,代码来源:WMSLayersPanel.java

示例5: setCustomLayerInWWModel

import gov.nasa.worldwind.layers.LayerList; //导入方法依赖的package包/类
/**
 * Ensure All custom layers are set in the ww model.
 * 
 * @param wwLayers
 *            Layers which are already added to the model.
 */
private static void setCustomLayerInWWModel(final LayerList wwLayers) {

	final ArrayList<TVIMap3Layer> insertedLayers = new ArrayList<TVIMap3Layer>();

	for (final TVIMap3Layer tviLayer : _uiCustomLayers.values()) {

		final Layer customWWLayer = tviLayer.wwLayer;

		if (wwLayers.contains(customWWLayer)) {

			// layer is already contained in the model
			continue;
		}

		TVIMap3Layer insertedUILayer = null;

		// update ui/ww model
		if (tviLayer.defaultPosition == INSERT_BEFORE_COMPASS) {

			insertedUILayer = insertBeforeCompass(_ww, tviLayer);

		} else if (tviLayer.defaultPosition == INSERT_BEFORE_PLACE_NAMES) {

			insertedUILayer = insertBeforePlaceNames(_ww, tviLayer);

		} else {

			// insert in default position
			insertedUILayer = insertBeforeCompass(_ww, tviLayer);
		}

		insertedLayers.add(insertedUILayer);
	}

	// update UI
	if (_map3LayerSlideout != null && insertedLayers.size() > 0) {
		_map3LayerSlideout.updateUI_NewLayer(insertedLayers);
	}

}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:47,代码来源:Map3Manager.java


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