demo\GeorssTaskInfo.java
/* Copyright 2010 ESRI * * All rights reserved under the copyright laws of the United States * and applicable international laws, treaties, and conventions. * * You may freely redistribute and use this sample code, with or * without modification, provided you include the original copyright * notice and use restrictions. * * See the use restrictions. * */ package demo; import com.esri.adf.web.data.tasks.SimpleTaskInfo; import com.esri.adf.web.data.tasks.TaskActionDescriptor; import com.esri.adf.web.data.tasks.TaskActionDescriptorModel; import com.esri.adf.web.data.tasks.TaskDescriptor; 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.adf.web.faces.event.ClientActions; public class GeorssTaskInfo extends SimpleTaskInfo { private TaskDescriptor taskDesc = null; private TaskActionDescriptor[] taskActions = new TaskActionDescriptor[2]; private TaskParamDescriptor[] taskParams = new TaskParamDescriptor[1]; private TaskToolDescriptor[] taskTools = new TaskToolDescriptor[1]; public GeorssTaskInfo() { taskDesc = new TaskDescriptor(GeorssTask.class, "GeoRSS", "GeoRSS Overlay"); taskParams[0] = new TaskParamDescriptor(GeorssTask.class, "georssURL", "Enter GeoRSS URL"); taskTools[0] = new TaskToolDescriptor(GeorssTask.class, "search", "Search", ClientActions.MAP_RECTANGLE); taskTools[0].setDefaultImage("images/tasks/search/searchextent.gif"); taskTools[0].setSelectedImage("images/tasks/search/searchextentD.gif"); taskTools[0].setHoverImage("images/tasks/search/searchextentU.gif"); taskTools[0].setDisabledImage("images/tasks/search/searchextent.gif"); taskTools[0].setToolTip("Search by extent"); taskTools[0].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE); taskActions[0] = new TaskActionDescriptor(GeorssTask.class, "addGeorssSource", "Add GeoRSS"); taskActions[0].setToolTip("Add GeoRSS"); taskActions[0].setDefaultImage("images/tasks/geoprocessing/gpAdd.gif"); taskActions[0] .setSelectedImage("images/tasks/geoprocessing/gpAddD.gif"); taskActions[0].setHoverImage("images/tasks/geoprocessing/gpAddU.gif"); taskActions[0].setDisabledImage("images/tasks/geoprocessing/gpAdd.gif"); taskActions[0].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE); taskActions[1] = new TaskActionDescriptor(GeorssTask.class, "clearGraphics", "Clear Locations"); taskActions[1].setToolTip("Clear Graphics"); taskActions[1].setDefaultImage("images/tasks/search/cleargraphics.gif"); taskActions[1] .setSelectedImage("images/tasks/search/cleargraphicsD.gif"); taskActions[1].setHoverImage("images/tasks/search/cleargraphicsU.gif"); taskActions[1] .setDisabledImage("images/tasks/search/cleargraphics.gif"); taskActions[1].setRendererType(TaskToolDescriptor.IMAGE_RENDERER_TYPE); } public TaskLayout[] getTaskLayout() { return null; } public TaskDescriptor getTaskDescriptor() { return taskDesc; } public TaskParamDescriptorModel[] getParamDescriptors() { return taskParams; } public TaskActionDescriptorModel[] getActionDescriptors() { return taskActions; } public TaskToolDescriptorModel[] getToolDescriptors() { return taskTools; } }