📄 zoomtocoordinatetaskinfo.java
字号:
package com.esri.solutions.jitk.web.tasks.navigation.coordinate;
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.solutions.jitk.common.resources.TextResources;
import com.esri.solutions.jitk.web.tasks.RenderAwareTaskDescription;
import com.esri.solutions.jitk.web.tasks.RenderControlledTaskInfo;
/**
* Describes the actions, parameters, tools, and the task for
* the ZoomToCoordinate task. This object will also maintain the state
* of all the UI components for the ZoomToCoordinate Task as the user progresses
* through the work-flow of the task.
*/
public class ZoomToCoordinateTaskInfo extends RenderControlledTaskInfo {
private static final long serialVersionUID = 7838615742937318959L;
protected RenderAwareTaskDescription _taskDescriptor;
/**
* One and only constructor for ZoomToCoordinateTaskInfo class
* @param taskImplClass
* @param taskName
* @throws Throwable
*/
@SuppressWarnings("unchecked")
public ZoomToCoordinateTaskInfo(Class taskImplClass, String taskName) throws Throwable {
super();
_taskDescriptor = new RenderAwareTaskDescription(ZoomToCoordinateTask.class, taskName, TextResources.getResourceString(ResourceProps.RES_LABEL_TASK_WINDOW));
// Task Params
_paramDescriptors = new TaskParamDescriptor[15];
// The input Latitude coordinate
_paramDescriptors[0] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "ddLat", TextResources.getResourceString(ResourceProps.RES_LABEL_LAT));
_paramDescriptors[0].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[0].setHidden(false);
// The input Longitude coordinate
_paramDescriptors[1] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "ddLon", TextResources.getResourceString(ResourceProps.RES_LABEL_LON));
_paramDescriptors[1].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[1].setHidden(false);
// The input Latitude coordinate - Degrees
_paramDescriptors[2] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLatD", TextResources.getResourceString(ResourceProps.RES_LABEL_DD));
_paramDescriptors[2].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[2].setHidden(false);
// The input Latitude coordinate - Minutes
_paramDescriptors[3] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLatM", TextResources.getResourceString(ResourceProps.RES_LABEL_MM));
_paramDescriptors[3].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[3].setHidden(false);
// The input Latitude coordinate - Seconds
_paramDescriptors[4] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLatS", TextResources.getResourceString(ResourceProps.RES_LABEL_SS));
_paramDescriptors[4].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[4].setHidden(false);
// The input Longitude coordinate - Degrees
_paramDescriptors[5] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLonD", TextResources.getResourceString(ResourceProps.RES_LABEL_DD));
_paramDescriptors[5].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[5].setHidden(false);
// The input Longitude coordinate - Minutes
_paramDescriptors[6] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLonM", TextResources.getResourceString(ResourceProps.RES_LABEL_MM));
_paramDescriptors[6].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[6].setHidden(false);
// The input Longitude coordinate - Seconds
_paramDescriptors[7] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "dmsLonS", TextResources.getResourceString(ResourceProps.RES_LABEL_SS));
_paramDescriptors[7].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[7].setHidden(false);
// The input MGRS coordinate
_paramDescriptors[8] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "mgrs", TextResources.getResourceString(ResourceProps.RES_LABEL_MGRS));
_paramDescriptors[8].setRendererType(TaskParamDescriptor.TEXT_RENDERER_TYPE);
_paramDescriptors[8].setHidden(false);
_paramDescriptors[9] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "tab1", TextResources.getResourceString(ResourceProps.TAB_DD));
_paramDescriptors[10] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "tab2", TextResources.getResourceString(ResourceProps.TAB_DMS));
_paramDescriptors[11] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "tab3", TextResources.getResourceString(ResourceProps.TAB_MGRS));
_paramDescriptors[12] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "footerNoteTab1", TextResources.getResourceString(ResourceProps.FOOTER_NOTE_DD));
_paramDescriptors[13] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "footerNoteTab2", TextResources.getResourceString(ResourceProps.FOOTER_NOTE_DMS));
_paramDescriptors[14] = new TaskParamDescriptor(ZoomToCoordinateTask.class, "footerNoteTab3", TextResources.getResourceString(ResourceProps.FOOTER_NOTE_MGRS));
_tabularLayout = new TabularLayout[1];
_tabularLayout[0] = new TabularLayout();
_tabularLayout[0].setId("ZoomToCoordinateTask");
_tabularLayout[0].addComponent(this._paramDescriptors[0], new TabularPosition(0, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[1], new TabularPosition(1, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[2], new TabularPosition(2, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[3], new TabularPosition(3, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[4], new TabularPosition(4, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[5], new TabularPosition(5, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[6], new TabularPosition(6, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[7], new TabularPosition(7, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[8], new TabularPosition(8, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[9], new TabularPosition(9, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[10], new TabularPosition(10, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[11], new TabularPosition(11, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[12], new TabularPosition(12, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[13], new TabularPosition(13, 0, 1, 1));
_tabularLayout[0].addComponent(this._paramDescriptors[14], new TabularPosition(14, 0, 1, 1));
_actionDescriptors = new TaskActionDescriptor[3];
_actionDescriptors[0] = new TaskActionDescriptor(ZoomToCoordinateTask.class, "zoomToDDCoordinate", TextResources.getResourceString(ResourceProps.RES_LABEL_TASK_ZOOM_BUTTON));
_actionDescriptors[0].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
_actionDescriptors[0].setStyleClass("esriToolDefault");
_actionDescriptors[1] = new TaskActionDescriptor(ZoomToCoordinateTask.class, "zoomToDMSCoordinate", TextResources.getResourceString(ResourceProps.RES_LABEL_TASK_ZOOM_BUTTON));
_actionDescriptors[1].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
_actionDescriptors[1].setStyleClass("esriToolDefault");
_actionDescriptors[2] = new TaskActionDescriptor(ZoomToCoordinateTask.class, "zoomToMGRSCoordinate", TextResources.getResourceString(ResourceProps.RES_LABEL_TASK_ZOOM_BUTTON));
_actionDescriptors[2].setRendererType(TaskToolDescriptor.TEXT_RENDERER_TYPE);
_actionDescriptors[2].setStyleClass("esriToolDefault");
_tabularLayout[0].addComponent(this._actionDescriptors[0], new TabularPosition(15, 0, 1, 1));
_tabularLayout[0].addComponent(this._actionDescriptors[1], new TabularPosition(16, 0, 1, 1));
_tabularLayout[0].addComponent(this._actionDescriptors[2], new TabularPosition(17, 0, 1, 1));
}
public RenderAwareTaskDescription getTaskDescriptor() {
return _taskDescriptor;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -