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

📄 labelredliningtaskinfo.java

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

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.TaskParamDescriptor;
import com.esri.adf.web.data.tasks.TaskToolDescriptor;
import com.esri.adf.web.faces.event.ClientActions;
import com.esri.solutions.jitk.common.resources.TextResources;
import com.esri.solutions.jitk.web.tasks.RenderAwareTaskDescription;
import com.esri.solutions.jitk.web.tasks.RenderControlledTaskInfo;

/**
 * This is a task-related container UI for label redlining task. 
 */
@SuppressWarnings("serial")
public class LabelRedliningTaskInfo extends RenderControlledTaskInfo {
	
	public LabelRedliningTaskInfo() {
		
		this._paramDescriptors = new TaskParamDescriptor[10];
		this._actionDescriptors = new TaskActionDescriptor[3];		
		this._toolDescriptors = new TaskToolDescriptor[2];
		this._tabularLayout = new TabularLayout[1];
		this._taskDescriptor = new RenderAwareTaskDescription(LabelRedliningTask.class, TextResources.getResourceString(ResourceProps.TASK_WINDOW_TITLE), TextResources.getResourceString(ResourceProps.TASK_WINDOW_TITLE));

		this._toolDescriptors[0] = new TaskToolDescriptor(LabelRedliningTask.class, "placeLabel", TextResources.getResourceString(ResourceProps.PLACE_LABEL), ClientActions.MAP_POINT);
		this._toolDescriptors[0].setDefaultImage("WebResource/com/esri/solutions/jitk/web/tasks/images/DrawLabel.gif");
		this._toolDescriptors[0].setSelectedImage("WebResource/com/esri/solutions/jitk/web/tasks/images/DrawLabelD.gif");
		this._toolDescriptors[0].setHoverImage("WebResource/com/esri/solutions/jitk/web/tasks/images/DrawLabelU.gif");
		this._toolDescriptors[0].setDisabledImage("WebResource/com/esri/solutions/jitk/web/tasks/images/DrawLabelX.gif");
		this._toolDescriptors[0].setToolTip(TextResources.getResourceString(ResourceProps.PLACE_LABEL));
		this._toolDescriptors[0].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE);

		this._toolDescriptors[1] = new TaskToolDescriptor(LabelRedliningTask.class, "findElement", TextResources.getResourceString(ResourceProps.DELETE_LABEL), ClientActions.MAP_RECTANGLE);
		this._toolDescriptors[1].setDefaultImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deletevertex.gif");
		this._toolDescriptors[1].setSelectedImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deletevertexD.gif");
		this._toolDescriptors[1].setHoverImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deletevertexU.gif");
		this._toolDescriptors[1].setDisabledImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deletevertexX.gif");
		this._toolDescriptors[1].setToolTip(TextResources.getResourceString(ResourceProps.DELETE_LABEL));
		this._toolDescriptors[1].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE);

		this._actionDescriptors[0] = new TaskActionDescriptor(LabelRedliningTask.class, "deleteAllLabels", TextResources.getResourceString(ResourceProps.DELETE_ALL_LABELS));
		this._actionDescriptors[0].setDefaultImage("WebResource/com/esri/solutions/jitk/web/tasks/images/delete.gif");
		this._actionDescriptors[0].setSelectedImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deleteD.gif");
		this._actionDescriptors[0].setHoverImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deleteU.gif");
		this._actionDescriptors[0].setDisabledImage("WebResource/com/esri/solutions/jitk/web/tasks/images/deleteX.gif");
		this._actionDescriptors[0].setToolTip(TextResources.getResourceString(ResourceProps.DELETE_ALL_LABELS));
		this._actionDescriptors[0].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE);

		this._actionDescriptors[1] = new TaskActionDescriptor(LabelRedliningTask.class, "deleteSelectLabels", TextResources.getResourceString(ResourceProps.DELETE_SELECT_LABELS));
		this._actionDescriptors[1].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
		this._actionDescriptors[2] = new TaskActionDescriptor(LabelRedliningTask.class, "clearSelectLabels", TextResources.getResourceString(ResourceProps.CLEAR_SELECT_LABELS));
		this._actionDescriptors[2].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);

		this._tabularLayout[0] = new TabularLayout();
		this._tabularLayout[0].setId("LabelTaskSelection");
		this._tabularLayout[0].setBorder(1);
		this._tabularLayout[0].addComponent(this._toolDescriptors[0], new TabularPosition(0, 0, 1, 1));
		this._tabularLayout[0].addComponent(this._toolDescriptors[1], new TabularPosition(0, 1, 1, 1));
		this._tabularLayout[0].addComponent(this._actionDescriptors[0], new TabularPosition(0, 2, 1, 1));

		this._paramDescriptors[0] = new TaskParamDescriptor(LabelRedliningTask.class, "font", TextResources.getResourceString(ResourceProps.FONT), "getFontList");
		this._paramDescriptors[0].setRendererType(TaskParamDescriptor.SELECT_RENDERER_TYPE);
		this._tabularLayout[0].addComponent(this._paramDescriptors[0], new TabularPosition(1, 0, 1, 3));

		this._paramDescriptors[1] = new TaskParamDescriptor(LabelRedliningTask.class, "labelSize", TextResources.getResourceString(ResourceProps.SIZE), "getSizeList");
		this._paramDescriptors[1].setRendererType(TaskParamDescriptor.SELECT_RENDERER_TYPE);
		this._tabularLayout[0].addComponent(this._paramDescriptors[1], new TabularPosition(2, 3, 1, 3));

		this._paramDescriptors[2] = new TaskParamDescriptor(LabelRedliningTask.class, "labelColor", TextResources.getResourceString(ResourceProps.COLOR));
		this._tabularLayout[0].addComponent(this._paramDescriptors[2], new TabularPosition(3, 0, 1, 3));

		this._paramDescriptors[3] = new TaskParamDescriptor(LabelRedliningTask.class, "labelText", TextResources.getResourceString(ResourceProps.LABEL_TEXT), "getLabelText", null);
		this._tabularLayout[0].addComponent(this._paramDescriptors[3], new TabularPosition(4, 0, 1, 3));

		this._paramDescriptors[4] = new TaskParamDescriptor(LabelRedliningTask.class, "annoText", "");
		this._tabularLayout[0].addComponent(this._paramDescriptors[4], new TabularPosition(5, 0, 1, 3));

		this._paramDescriptors[5] = new TaskParamDescriptor(LabelRedliningTask.class, "fontPreview", TextResources.getResourceString(ResourceProps.DEFAULT_FONT), "getFontPreview", null);
		this._tabularLayout[0].addComponent(this._paramDescriptors[5], new TabularPosition(6, 0, 1, 3, "width:220px;margin-bottom: 5px;text-align:center;"));

		this._paramDescriptors[6] = new TaskParamDescriptor(LabelRedliningTask.class, "selectLabelFeatures", "0", "getSelectLabelFeatures", null);
		this._tabularLayout[0].addComponent(this._paramDescriptors[6], new TabularPosition(6, 0, 1, 1));
		this._tabularLayout[0].addComponent(this._actionDescriptors[1], new TabularPosition(6, 1, 1, 1));
		this._tabularLayout[0].addComponent(this._actionDescriptors[2], new TabularPosition(6, 2, 1, 1));

		this._paramDescriptors[7] = new TaskParamDescriptor(LabelRedliningTask.class, "deleteLabelMessage", TextResources.getResourceString(ResourceProps.MSG_DELETE_LABELS));
		this._tabularLayout[0].addComponent(this._paramDescriptors[7], new TabularPosition(7, 0, 1, 1, "display:none"));
		this._paramDescriptors[8] = new TaskParamDescriptor(LabelRedliningTask.class, "deleteSelectedLabelMessage", TextResources.getResourceString(ResourceProps.MSG_DELETE_SELECTED_LABELS));
		this._tabularLayout[0].addComponent(this._paramDescriptors[8], new TabularPosition(7, 1, 1, 1, "display:none"));
		this._paramDescriptors[9] = new TaskParamDescriptor(LabelRedliningTask.class, "footerNote", TextResources.getResourceString(ResourceProps.FOOTER_NOTE));
		this._tabularLayout[0].addComponent(this._paramDescriptors[9], new TabularPosition(8, 1, 1, 1, "display:none"));
	}
}

⌨️ 快捷键说明

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