|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.tasks.MapToolsTask
public class MapToolsTask
Field Summary | |
---|---|
protected int |
layerId
|
protected boolean |
panAction
|
static String |
TOOL_ALL
|
static String |
TOOL_FULLEXT
|
static String |
TOOL_IDENTIFY
|
static String |
TOOL_MEASURE
|
static String |
TOOL_NEXTEXTENT
|
static String |
TOOL_PAN
|
static String |
TOOL_PREEXTENT
|
static String |
TOOL_ZOOMIN
|
static String |
TOOL_ZOOMOUT
|
protected String |
tools
|
Constructor Summary | |
---|---|
MapToolsTask()
|
Method Summary | |
---|---|
void |
destroy()
The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in
this method. |
void |
getArea(MapEvent event)
|
int |
getAreaUnitsID()
|
Map<Integer,String> |
getAreaUnitsList()
|
void |
getDistance(MapEvent event)
|
int |
getDistanceUnitsID()
|
Map<Integer,String> |
getDistanceUnitsList()
|
Map<String,String> |
getIdentifiableLayers()
Returns the map entry of identifiable layers. |
List<? extends LayerDefinition> |
getLayerDefinitions()
Returns the list of LayerDefinition . |
int |
getLayerId()
Deprecated. As of ArcGIS Java Server 9.3, instead use getIdentifiableLayers() |
void |
getLocation(MapEvent event)
|
String |
getOutputA()
|
String |
getOutputB()
|
GISResource |
getResource()
Deprecated. As of ArcGIS Java Server 9.3, instead get the resource from WebContext.getResourceById(String)
based on the resource id. |
double |
getRoundFactor()
Returns current rounding factor; |
MapToolsTaskConfig |
getTaskConfig()
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to get all properties |
TaskInfo |
getTaskInfo()
|
String |
getTaskName()
|
String |
getTools()
Returns the tool key(s) separated by comma |
WebContext |
getWebContext()
Returns the WebContext object |
void |
identify(MapEvent event)
|
List<QueryResult> |
identify(WebContext webContext,
WebGeometry webGeometry)
Identify the map based on the specified context and geometry. |
List<QueryResult> |
identify(WebGeometry webGeometry)
Identify the map based on the specified geometry. |
void |
init(WebContext webContext)
The initialization chores of attributes of a WebContext should be performed in this method. |
boolean |
isMapContinousPan()
Deprecated. As of ArcGIS Java Server 9.3, instead use isMapContinuousPan() |
boolean |
isMapContinuousPan()
Returns the pan action to the map tools task. |
boolean |
isShowInfoWindow()
Returns true if the task result(s) to be shown in the info window. |
void |
measure(MapEvent event)
|
void |
next(TaskEvent event)
|
void |
pan(MapEvent event)
|
void |
previous(TaskEvent event)
|
void |
setAreaUnitsID(int areaUnitsID)
|
void |
setDistanceUnitsID(int distanceUnitsID)
|
void |
setIdentifiableLayers(Map<String,String> identifiableLayers)
Sets the map entry of identifiable layers. |
void |
setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
Sets the list of LayerDefinition objects. |
void |
setLayerId(int layerId)
Deprecated. As of ArcGIS Java Server 9.3, instead use setIdentifiableLayers(java.util.Map |
void |
setMapContinousPan(boolean panAction)
Deprecated. As of ArcGIS Java Server 9.3, instead use setMapContinuousPan(boolean) |
void |
setMapContinuousPan(boolean panAction)
Sets the pan action of map tools task to be continuous. |
void |
setResource(GISResource resource)
Deprecated. As of ArcGIS Java Server 9.3, instead use setIdentifiableLayers(java.util.Map |
void |
setRoundFactor(double roundFactor)
Sets the rounding factor, the number is used to set the output precision of measurement. |
void |
setShowInfoWindow(boolean showInfoWindow)
Sets whether the task result(s) to be shown in the info window or not. |
void |
setTaskConfig(MapToolsTaskConfig config)
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to set all properties |
void |
setTaskInfo(TaskInfo taskInfo)
|
void |
setTaskName(String taskName)
|
void |
setTools(String tools)
Sets the tools order and their visibilities of a map tools task. |
void |
setWebContext(WebContext webContext)
Deprecated. As of ArcGIS Java Server 9.3, no replacement |
void |
update(WebContext webContext,
Object arg)
This method is called by the WebContext on its registered WebContextObserver s when users call the
refresh() methods on the context. |
void |
zoomFullExtent(TaskEvent event)
|
void |
zoomIn(MapEvent event)
|
void |
zoomOut(MapEvent event)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TOOL_ZOOMIN
public static final String TOOL_ZOOMOUT
public static final String TOOL_PAN
public static final String TOOL_PREEXTENT
public static final String TOOL_NEXTEXTENT
public static final String TOOL_FULLEXT
public static final String TOOL_IDENTIFY
public static final String TOOL_MEASURE
public static final String TOOL_ALL
protected boolean panAction
protected String tools
protected int layerId
Constructor Detail |
---|
public MapToolsTask()
Method Detail |
---|
public void init(WebContext webContext)
WebContextInitialize
The initialization chores of attributes of a WebContext
should be performed in this method.
Typically this method is called by the WebContext
when the context itself is initialized. It is important
to note that this method is again called by the context when a GISResource
is dynamically added to or
removed from the context. Classes that implement this method should keep this in mind and adapt the method to react
to the callbacks in these circumstances as well.
A WebContext
attribute is usable only after this method has been called.
init
in interface WebContextInitialize
webContext
- WebContext
- the WebContextWebContext.init(WebContext)
,
WebContext.addResource(String, GISResource, int)
,
WebContext.removeResource(GISResource)
public void destroy()
WebContextInitialize
The cleaup chores (such as releasing held resources) of attributes of a WebContext
should be performed in
this method.
Typically this method is called by the WebContext
when the context itself is destroyed.
The WebContext
attribute is unusable after this method has been called.
destroy
in interface WebContextInitialize
WebContext.destroy()
public void update(WebContext webContext, Object arg)
WebContextObserver
This method is called by the WebContext
on its registered WebContextObserver
s when users call the
refresh()
methods on the context.
To setup an object to be updated by the context, one needs to use the
WebContext.addObserver(WebContextObserver)
to register itself with the context. All
context attributes are wired up to the WebContext
. When users change state on any of
the attributes and need to intimate other attributes of the context to react to the change they call either the
WebContext.refresh()
or WebContext.refresh(Object)
methods. The context in turns calls the WebContextObserver.update(WebContext, Object)
methods on all its registered
observers.
update
in interface WebContextObserver
webContext
- the WebContext
that has been refreshedarg
- the argument passed to the WebContext
's refresh(arg)
methodWebContext.refresh(Object)
,
WebContext.addObserver(WebContextObserver)
,
WebContext.removeObserver(WebContextObserver)
public WebContext getWebContext()
WebContext
object
public String getTaskName()
public void setTaskName(String taskName)
public TaskInfo getTaskInfo()
getTaskInfo
in interface TaskInfoBean
public void setTaskInfo(TaskInfo taskInfo)
setTaskInfo
in interface TaskInfoBean
public void zoomFullExtent(TaskEvent event)
public void zoomIn(MapEvent event)
public void zoomOut(MapEvent event)
public void pan(MapEvent event)
public void previous(TaskEvent event)
public void next(TaskEvent event)
public void identify(MapEvent event)
public List<QueryResult> identify(WebGeometry webGeometry)
webGeometry
- the geometry in map coordinates
public List<QueryResult> identify(WebContext webContext, WebGeometry webGeometry)
webContext
- the context object, passing null will use the context from this objectwebGeometry
- the geometry in map coordinates
public void getLocation(MapEvent event)
public void getDistance(MapEvent event)
public void getArea(MapEvent event)
public void measure(MapEvent event)
public String getOutputA()
public String getOutputB()
public double getRoundFactor()
public void setRoundFactor(double roundFactor)
roundFactor
- - an integer;public int getAreaUnitsID()
public void setAreaUnitsID(int areaUnitsID)
public int getDistanceUnitsID()
public void setDistanceUnitsID(int distanceUnitsID)
public Map<Integer,String> getAreaUnitsList()
public Map<Integer,String> getDistanceUnitsList()
public void setMapContinuousPan(boolean panAction)
panAction
- if true, the pan action is continuouspublic boolean isMapContinuousPan()
public void setTools(String tools)
Sets the tools order and their visibilities of a map tools task.
For example setting to "IDENTIFY,ZOOMIN,ZOOMOUT," will display three tools in the map tools task. config.setTools(MapToolsTask.TOOL_ZOOMIN + "," + MapToolsTask.TOOL_ZOOMOUT);
tools
- a String with multi tool key word separated by a comma.public String getTools()
public void setLayerDefinitions(List<? extends LayerDefinition> layerDefinitions)
LayerDefinition
objects.
layerDefinitions
- the list of layer definition objectspublic List<? extends LayerDefinition> getLayerDefinitions()
LayerDefinition
.
public void setShowInfoWindow(boolean showInfoWindow)
showInfoWindow
- if true, info window is shownpublic boolean isShowInfoWindow()
public void setIdentifiableLayers(Map<String,String> identifiableLayers)
For Example, java.util.Map<String, Integer> identifiableLayers1 = new java.util.LinkedHashMap<String, Integer>(1); identifiableLayers1.put("ags1", "2,3"); identifiableLayers1.put("aws1", "0"); identifiableLayers1.put("aims1", "0,5");
identifiableLayers
- the map entry of identifiable layerspublic Map<String,String> getIdentifiableLayers()
@Deprecated public void setWebContext(WebContext webContext)
@Deprecated public void setTaskConfig(MapToolsTaskConfig config)
config
- the map tools task config object@Deprecated public MapToolsTaskConfig getTaskConfig()
@Deprecated public void setResource(GISResource resource)
setIdentifiableLayers(java.util.Map)
resource
- the GISResource
object.@Deprecated public GISResource getResource()
WebContext.getResourceById(String)
based on the resource id.
GISResource
object.
@Deprecated public void setLayerId(int layerId)
setIdentifiableLayers(java.util.Map)
GISResource
object in which the identify should be performed.
By default identify works with all resource(s) and all layer(s).
layerId
- the layer id@Deprecated public int getLayerId()
getIdentifiableLayers()
@Deprecated public void setMapContinousPan(boolean panAction)
setMapContinuousPan(boolean)
@Deprecated public boolean isMapContinousPan()
isMapContinuousPan()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |