wcstoclayercontent.java

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

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

import com.esri.adf.web.data.TocNodeContent;
import com.esri.adf.web.faces.event.TocEvent;
import com.esri.solutions.jitk.datasources.ogc.wcs.info.WCSCoverageInfoBrief;

@SuppressWarnings("serial")
public class WCSTocLayerContent extends TocNodeContent{
	
	private String text = null;
	private boolean checked = false;
	private String key = null;
	private WCSCoverageInfoBrief coverage = null;
	
	public WCSTocLayerContent(WCSCoverageInfoBrief coverage) {
		
		this.coverage = coverage;
		this.text = coverage.getLabel();
		this.checked = true;
		this.key = coverage.getName();
	}
	
	public String getKey() {
		return this.key;
	}
	
	/**
	 * Returns the coverage object.
	 */
	public WCSCoverageInfoBrief getCoverage() {
		return this.coverage;
	}
	
	/**
	 * Returns an indicator whether this node is checkable.
	 */
	public boolean isCheckable() {
		return true;
	}
	
	/**
	 * If isCheckable() is true, it indicates whether it is checked
	 */
	public boolean isChecked() {
		return this.checked;
	}
	
	/**
	 * Returns the text displayed on the node;
	 */
	public String getText() {
		return this.text;
	}
	
	/**
	 * Handles the event which occurs at a content node;
	 */
	public void handleNodeEvent(TocEvent event) {}
	
	/**
	 * Handles the checked/unchecked event occuring at a node.
	 */
	public void handleCheckedEvent(boolean checked, TocEvent event){
		this.checked = checked;
		event.getWebContext().refresh();		
	}
}

⌨️ 快捷键说明

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