|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.data.GISResource
com.esri.adf.web.data.graphics.GraphicsResource
public class GraphicsResource
GraphicsResource is a GISResource that permits working with GraphicsLayers that originate and live solely in the ADF tier. GraphicsResource holds a list of GraphicsLayers.
| Field Summary | |
|---|---|
protected WebSpatialReference |
spatialReference
|
| Fields inherited from class com.esri.adf.web.data.GISResource |
|---|
alias, context, defaultSpatialReference, functionalities, init |
| Constructor Summary | |
|---|---|
GraphicsResource()
|
|
| Method Summary | |
|---|---|
int |
addGraphicsLayer(GraphicsLayer layer)
Adds a GraphicsLayer to the internal list of GraphicsLayers. |
java.lang.String |
getAlias()
Returns a reader friendly name for this resource. |
java.util.List<GraphicsLayer> |
getLayers(boolean leafNodesOnly)
Returns a list of all graphics layers. |
void |
init(WebContext wcontext)
This method is called by the WebContext to initialize the resource. |
void |
removeAllGraphicsLayer()
Removes all graphics layers. |
void |
removeGraphicsLayer(GraphicsLayer layer)
Removes a given graphics layer. |
void |
setDefaultSpatialReference(WebSpatialReference spatialReference)
|
| Methods inherited from class com.esri.adf.web.data.GISResource |
|---|
activate, addFunctionality, destroy, getDefaultSpatialReference, getFunctionalities, getFunctionality, getWebContext, passivate, setAlias, setFunctionalities |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected WebSpatialReference spatialReference
| Constructor Detail |
|---|
public GraphicsResource()
| Method Detail |
|---|
public void init(WebContext wcontext)
GISResource
This method is called by the WebContext to initialize the resource. This is typically called when the
context itself is initialized or when users add a new resource to the context by using the
WebContext.addResource(String, GISResource) method. A GISResource is usable
only after this method has been called.
This method iterates through all its supported GISFunctionalitys and calls the
GISFunctionality.initFunctionality(GISResource) on them all.
Sub-classes that want to do custom initialization should override this method and make the super
call first before doing the custom stuff:
public void init(WebContext context) {
super.init(context);
myInit();
}
init in interface WebContextInitializeinit in class GISResourcewcontext - the WebContext that maintains a reference to this resourceWebContextInitialize.init(com.esri.adf.web.data.WebContext),
GISFunctionality.initFunctionality(GISResource),
WebContext.init(WebContext),
WebContext.addResource(String, GISResource)public java.lang.String getAlias()
GISResourceReturns a reader friendly name for this resource.
It is a good practice for users to explicitly set an alias when the resource is created programmatically or declaratively. Resource providers should provide an auto-generated alias anyway in case users don't explicitly set an alias themselves.
getAlias in class GISResourcepublic void setDefaultSpatialReference(WebSpatialReference spatialReference)
public int addGraphicsLayer(GraphicsLayer layer)
layer - a layer to be added
public void removeGraphicsLayer(GraphicsLayer layer)
layer - a layer to be removedpublic void removeAllGraphicsLayer()
public java.util.List<GraphicsLayer> getLayers(boolean leafNodesOnly)
leafNodesOnly - determines whether instances of GroupGraphicsLayer should be returned
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||