overlayfunctionality.java

来自「esri的ArcGIS Server超级学习模板程序(for java)」· Java 代码 · 共 60 行

JAVA
60
字号
package com.esri.solutions.jitk.web.data;

import com.esri.adf.web.data.GISFunctionality;
import com.esri.adf.web.data.GISResource;

/**
 * Used to mark a GIS Resource as an "Overlay".  An Overlay
 * must remain at the top of the Map and Table Of Contents.  
 * The {@link WebContext} object will recognize GIS Resources
 * with an OverlayFunctionality and will ensure that they
 * are at the top of the Map and Table Of Contents.
 * 
 * <p>
 * The {@link #initFunctionality(GISResource)} simply initializes
 * the internal {@link GISResource} reference in order to be
 * returned from {@link #getResource()}.
 * </p>
 * 
 * <p>
 * The {@link #destroyFunctionality()} simply sets the 
 * internal {@link GISResource} reference to <code>null</code>.
 * </p>
 */
public class OverlayFunctionality implements GISFunctionality {

	/**
	 * Reference to GIS Resource that contains this functionality.
	 */
	private GISResource m_resource;

	/**
	 * Name of the functionality.
	 */
	public static final String FUNCTIONALITY_NAME = "overlay";
	
	/*
	 * (non-Javadoc)
	 * @see com.esri.adf.web.data.GISFunctionality#destroyFunctionality()
	 */
	public void destroyFunctionality() {
		m_resource = null;
	}

	/*
	 * (non-Javadoc)
	 * @see com.esri.adf.web.data.GISFunctionality#getResource()
	 */
	public GISResource getResource() {
		return m_resource;
	}

	/*
	 * (non-Javadoc)
	 * @see com.esri.adf.web.data.GISFunctionality#initFunctionality(com.esri.adf.web.data.GISResource)
	 */
	public void initFunctionality(GISResource resource) {
		m_resource = resource;
	}	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?