⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filtertaskinfo.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.web.tasks.filter;

import java.util.ResourceBundle;

import com.esri.adf.web.data.tasks.SimpleTaskInfo;
import com.esri.adf.web.data.tasks.TabularLayout;
import com.esri.adf.web.data.tasks.TabularPosition;
import com.esri.adf.web.data.tasks.TaskActionDescriptor;
import com.esri.adf.web.data.tasks.TaskActionDescriptorModel;
import com.esri.adf.web.data.tasks.TaskLayout;
import com.esri.adf.web.data.tasks.TaskParamDescriptor;
import com.esri.adf.web.data.tasks.TaskParamDescriptorModel;
import com.esri.adf.web.data.tasks.TaskToolDescriptor;
import com.esri.adf.web.data.tasks.TaskToolDescriptorModel;
import com.esri.solutions.jitk.common.resources.TextResources;
import com.esri.solutions.jitk.web.tasks.RenderAwareTaskDescription;

public class FilterTaskInfo extends SimpleTaskInfo {
	private static final long serialVersionUID = -1904244969686423644L;
	private static String SHARED_RESOURCE_NAME = "res.solutions_jitk_tasks";
	private ResourceBundle resourceBundle;

	private static final String INPUT_LAYER = "filtertask.ui.label.inputLayer";
	private static final String ATTRIBUTE_SELECTION = "filtertask.ui.label.attributeSelection";
	private static final String ADD_TO_QUERY_EXPRESSION = "filtertask.ui.label.addToQueryExpression";
	private static final String APPLY_BUTTON_LABEL = "filtertask.ui.label.applyButtonLabel";
	private static final String QUERY_EXPRESSION = "filtertask.ui.label.filterExpression";
	private static final String FILTER_TASK = "filtertask.ui.label.filter";
	private static final String LAYER = "filtertask.ui.label.layer";
	private static final String ATTRIBUTE = "filtertask.ui.label.attribute";
	private static final String OPERATION = "filtertask.ui.label.operation";
	private static final String TEXT_VALUE = "filtertask.ui.label.textValue";
	private static final String DOMAIN_VALUE = "filtertask.ui.label.domainValue";
	private static final String GET_SAMPLE_VALUE = "filtertask.ui.label.getSampleValue";
	private static final String UIMessage1 = "filtertask.msg.UIMessage1";
	private static final String UIMessage2 = "filtertask.msg.UIMessage2";
	private static final String UIMessage3 = "filtertask.msg.UIMessage3";
	private static final String UIMessage4 = "filtertask.msg.UIMessage4";
	private static final String FOOTER_NOTE = "filtertask.ui.footer.note";
	
	private RenderAwareTaskDescription taskDescriptor = null;
	private TaskParamDescriptor[]  paramDescriptors = null;
	private TaskActionDescriptor[] actionDescriptors = null;
	private TaskToolDescriptor[] toolDescriptors = null;
	private TabularLayout[] tabularLayout = null;
	
	public FilterTaskInfo(){
		this.setResourceBundle(ResourceBundle.getBundle(SHARED_RESOURCE_NAME));

		this.paramDescriptors = new TaskParamDescriptor[19];
		this.actionDescriptors = new TaskActionDescriptor[3];		
		this.tabularLayout = new TabularLayout[1];
		this.taskDescriptor = new RenderAwareTaskDescription(FilterTask.class, TextResources.getResourceString(FILTER_TASK), TextResources.getResourceString(FILTER_TASK));

		this.tabularLayout[0] = new TabularLayout();
		this.tabularLayout[0].setId("FilterSelection");
		
		this.paramDescriptors[0] = new TaskParamDescriptor(FilterTask.class, "selectedLayer", "Selected Layer");
		this.paramDescriptors[0].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[0], new TabularPosition(0, 0, 1, 1, "display:none;"));

		this.actionDescriptors[0] = new TaskActionDescriptor(FilterTask.class, "doSelectLayer", "selectLayer");
		this.actionDescriptors[0].setRendererType(TaskActionDescriptor.TEXT_RENDERER_TYPE);
		
		this.paramDescriptors[1] = new TaskParamDescriptor(FilterTask.class, "attributeSelection", "");
		this.paramDescriptors[1].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[1], new TabularPosition(1, 0, 1, 1, "border-width:0px;text-align:left;"));

		this.paramDescriptors[2] = new TaskParamDescriptor(FilterTask.class, "layer", TextResources.getResourceString(LAYER), "getInputLayer", "setInputLayer");
		this.paramDescriptors[2].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[2], new TabularPosition(2, 0, 1, 3, "border-width:0px;text-align:left;"));

		this.paramDescriptors[3] = new TaskParamDescriptor(FilterTask.class, "attribute", TextResources.getResourceString(ATTRIBUTE), "getAttributeList");
		this.tabularLayout[0].addComponent(this.paramDescriptors[3], new TabularPosition(4, 0, 1, 3, "border-width:0px;text-align:left;"));

		this.paramDescriptors[4] = new TaskParamDescriptor(FilterTask.class, "operation", TextResources.getResourceString(OPERATION), "getOperationList");
		this.tabularLayout[0].addComponent(this.paramDescriptors[4], new TabularPosition(5, 0, 1, 3, "border-width:0px;text-align:left;"));
		
		this.actionDescriptors[1] = new TaskActionDescriptor(FilterTask.class, "sampleValues", TextResources.getResourceString(GET_SAMPLE_VALUE));
		this.actionDescriptors[1].setToolTip(TextResources.getResourceString(GET_SAMPLE_VALUE));
		this.actionDescriptors[1].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.actionDescriptors[1], new TabularPosition(6, 1, 1, 3));
		
		this.paramDescriptors[5] = new TaskParamDescriptor(FilterTask.class, "domainValue", TextResources.getResourceString(DOMAIN_VALUE), "getDomainValueList");
		this.tabularLayout[0].addComponent(this.paramDescriptors[5], new TabularPosition(7, 1, 1, 2, "border-width:0px;text-align:left;"));

		this.paramDescriptors[6] = new TaskParamDescriptor(FilterTask.class, "textValue", TextResources.getResourceString(TEXT_VALUE));
		this.paramDescriptors[6].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[6], new TabularPosition(8, 1, 1, 2, "border-width:0px;text-align:left;"));

		this.paramDescriptors[7] = new TaskParamDescriptor(FilterTask.class, "sql", "");
		this.paramDescriptors[7].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[7], new TabularPosition(9, 0, 1, 3, "border-width:0px;text-align:left;"));

		this.paramDescriptors[8] = new TaskParamDescriptor(FilterTask.class, "spatialFilterSelection", "");
		this.paramDescriptors[8].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.paramDescriptors[8], new TabularPosition(10, 0, 1, 3, "border-width:0px;text-align:left;"));
		
		this.actionDescriptors[2] = new TaskActionDescriptor(FilterTask.class, "filterLayer", TextResources.getResourceString(APPLY_BUTTON_LABEL));
		this.actionDescriptors[2].setToolTip(TextResources.getResourceString(APPLY_BUTTON_LABEL));
		this.actionDescriptors[2].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
		this.tabularLayout[0].addComponent(this.actionDescriptors[2], new TabularPosition(11, 0, 1, 1));

		this.paramDescriptors[9] = new TaskParamDescriptor(FilterTask.class, "inputLayerLabel", TextResources.getResourceString(INPUT_LAYER));
		this.tabularLayout[0].addComponent(this.paramDescriptors[9], new TabularPosition(13, 0, 1, 1, "display:none;"));

		this.paramDescriptors[10] = new TaskParamDescriptor(FilterTask.class, "attributeSelectionLabel", TextResources.getResourceString(ATTRIBUTE_SELECTION));
		this.tabularLayout[0].addComponent(this.paramDescriptors[10], new TabularPosition(13, 0, 1, 1, "display:none;"));

		this.paramDescriptors[11] = new TaskParamDescriptor(FilterTask.class, "addToQueryExpressionLabel", TextResources.getResourceString(ADD_TO_QUERY_EXPRESSION));
		this.tabularLayout[0].addComponent(this.paramDescriptors[11], new TabularPosition(13, 0, 1, 1, "display:none;"));

		this.paramDescriptors[12] = new TaskParamDescriptor(FilterTask.class, "queryExpressionLabel", TextResources.getResourceString(QUERY_EXPRESSION));
		this.tabularLayout[0].addComponent(this.paramDescriptors[12], new TabularPosition(13, 0, 1, 1, "display:none;"));

		this.paramDescriptors[13] = new TaskParamDescriptor(FilterTask.class, "uiMessage1", TextResources.getResourceString(UIMessage1));
		this.tabularLayout[0].addComponent(this.paramDescriptors[13], new TabularPosition(14, 0, 1, 1, "display:none;"));

		this.paramDescriptors[14] = new TaskParamDescriptor(FilterTask.class, "uiMessage2", TextResources.getResourceString(UIMessage2));
		this.tabularLayout[0].addComponent(this.paramDescriptors[14], new TabularPosition(14, 1, 1, 1, "display:none;"));

		this.paramDescriptors[15] = new TaskParamDescriptor(FilterTask.class, "uiMessage3", TextResources.getResourceString(UIMessage3));
		this.tabularLayout[0].addComponent(this.paramDescriptors[15], new TabularPosition(14, 2, 1, 1, "display:none;"));

		this.paramDescriptors[16] = new TaskParamDescriptor(FilterTask.class, "uiMessage4", TextResources.getResourceString(UIMessage4));
		this.tabularLayout[0].addComponent(this.paramDescriptors[16], new TabularPosition(14, 3, 1, 1, "display:none;"));
		
		this.paramDescriptors[18] = new TaskParamDescriptor(FilterTask.class, "footerNote", TextResources.getResourceString(FOOTER_NOTE));
		this.tabularLayout[0].addComponent(this.paramDescriptors[18], new TabularPosition(15, 1, 1, 1, "display:none"));
		
		this.paramDescriptors[17] = new TaskParamDescriptor(
				FilterTask.class, "InputLayerLabel", "");
		this.paramDescriptors[17]
				.setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
		this.paramDescriptors[17].setHidden(false);
		this.tabularLayout[0].addComponent(this.paramDescriptors[17], new TabularPosition(1, 0, 1, 1, "border-width:0px;text-align:left;"));
	
	}

	public ResourceBundle getResourceBundle() {
		return resourceBundle;
	}

	public void setResourceBundle(ResourceBundle resourceBundle) {
		this.resourceBundle = resourceBundle;
	}

	public RenderAwareTaskDescription getTaskDescriptor(){
	    return this.taskDescriptor;
	}

	public TaskParamDescriptorModel[] getParamDescriptors(){
	    return this.paramDescriptors;
	}

	public TaskActionDescriptorModel[] getActionDescriptors(){
	    return this.actionDescriptors;
	}
	
	public TaskToolDescriptorModel[] getToolDescriptors(){
	    return this.toolDescriptors;
	}
	  
	public TaskLayout[] getTaskLayout(){
	    return this.tabularLayout;
	}
}

⌨️ 快捷键说明

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