com.esri.map
Class MessageGroupLayer

java.lang.Object
  extended by com.esri.map.Layer
      extended by com.esri.map.MessageGroupLayer

public class MessageGroupLayer
extends Layer

This class is used with the MessageProcessor class to display the graphics associated with processed messages.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.map.Layer
Layer.LayerStatus
 
Field Summary
protected  List<Layer> innerLayers
           
 
Fields inherited from class com.esri.map.Layer
_credentials, _progress, _resolutionList, serviceInfo
 
Constructor Summary
MessageGroupLayer(SymbolDictionary.DictionaryType type)
          Instantiates a new message group layer along with a new MessageProcessor for the given SymbolDictionary.DictionaryType.
MessageGroupLayer(SymbolDictionary.DictionaryType type, String symbolDictionaryPath)
          Instantiates a new message group layer along with a new MessageProcessor for the given SymbolDictionary.DictionaryType.
 
Method Summary
 boolean contains(Layer layer)
           
protected  void createNativeLayer()
           
protected  boolean doesExist(com.esri.map.GroupLayerBase grouplayer, Layer checklayer)
           
protected  void finalize()
           
 Layer get(int index)
          Returns the layer for the given index position.
 long getAddGraphicsLayerRequestCallbackHandle()
          Gets the handle of the add graphics layer request callback handle.
 SpatialReference getDefaultSpatialReference()
          Gets the defaultSpatialReference of the Layer.
 Envelope getFullExtent()
          Returns the full extent of the layer.
 long getID()
          Return the Layer runtime ID which is a long integer.
 Layer getLayer(String layername)
          Returns the layer for the given layer name.
 Layer[] getLayers()
          Returns the direct sublayers in an array.
 LayerLegendInfoCollection getLegend()
           
 double getMaxScale()
          Gets the maximum scale at which this layer will be displayed.
 MessageProcessor getMessageProcessor()
          Get the message processor created by this class.
 double getMinScale()
          Gets the minimum scale at which this layer will be displayed.
protected  void graphicsLayerAddRequest(String layerName, int index)
           
protected  void init(boolean isVisible, int[] visibleLayers, String title, float opacity)
          This method is called only when composing a Map from a Web Map.
protected  void initializeNativeLayer()
           
protected  int internalAdd(Layer layer)
           
protected  boolean internalAddLayerAt(Layer layer, int index)
           
protected  void internalInit()
           
 boolean isEmpty()
           
 void recycle()
          Releases resources referenced by the Layer so that they can be recycled.
protected  void recycleLayers()
           
protected  void setDefaultSpatialReference(SpatialReference defaultSpatialReference)
          Sets the defaultSpatialReference of the Layer.
protected  void setMap(JMap parent)
          Every layer is provided a reference to the parent JComponent that contains that layer.
 void setOpacity(float opacity)
          Sets the opacity of the GroupLayer, it will change all opacity of it sublayers.
 int size()
          Returns the size of the group layer.
 
Methods inherited from class com.esri.map.Layer
addLayerInitializeCompleteListener, fireLayerCreateCompleteEvent, fireLayerCreateErrorEvent, fireLayerCreateErrorEvent, getCopyrightText, getCredentialsInternal, getDescription, getException, getExtent, getInitialExtent, getInitializationError, getLayerHandle, getMap, getMapServer, getMapServerInfo, getMapServerLegendInfo, getName, getOpacity, getPopupInfo, getResolution, getResolutionList, getServiceDescription, getSpatialReference, getStatus, getUrl, getUrlHashCode, initializeAsync, internalGetLayerLegendInfos, isHidingNoDataTiles, isInitialized, isReady, isShowingCopyright, isVisible, loadServiceInfo, lock, reinitializeAsync, removeLayerInitializeCompleteListener, setCopyrightText, setCredentials, setDescription, setError, setException, setFullExtent, setInitialExtent, setLayerHandle, setMapServer, setName, setPopupInfos, setServiceDescription, setShowingCopyright, setStatus, setUrl, setVisible, unlock, updateSpatialReferenceStatus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

innerLayers

protected final List<Layer> innerLayers
Constructor Detail

MessageGroupLayer

public MessageGroupLayer(SymbolDictionary.DictionaryType type)
Instantiates a new message group layer along with a new MessageProcessor for the given SymbolDictionary.DictionaryType. This group layer will be automatically associated with the message processor instance.

Parameters:
type - the type of message processor to create.

MessageGroupLayer

public MessageGroupLayer(SymbolDictionary.DictionaryType type,
                         String symbolDictionaryPath)
Instantiates a new message group layer along with a new MessageProcessor for the given SymbolDictionary.DictionaryType. A path to the symbol dictionary to be used can also be specified. If no symbol dictionary path is specified, the system default will be used.

Parameters:
type - the type of message processor to create.
symbolDictionaryPath - the symbol dictionary path
Method Detail

getAddGraphicsLayerRequestCallbackHandle

public long getAddGraphicsLayerRequestCallbackHandle()
Gets the handle of the add graphics layer request callback handle.

Returns:
the adds graphics layer request callback handle

getMessageProcessor

public MessageProcessor getMessageProcessor()
Get the message processor created by this class.

Returns:
MessageProcessor instance created by this class.

recycle

public void recycle()
Description copied from class: Layer
Releases resources referenced by the Layer so that they can be recycled.


finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable

createNativeLayer

protected void createNativeLayer()

getLayers

public Layer[] getLayers()
Returns the direct sublayers in an array.

Returns:
an array of Layer objects

getLayer

public Layer getLayer(String layername)
Returns the layer for the given layer name.

Parameters:
layername - a layer name string
Returns:
a Layer object

get

public Layer get(int index)
Returns the layer for the given index position.

Parameters:
index - an integer for layer position.
Returns:
a Layer object

isEmpty

public boolean isEmpty()

contains

public boolean contains(Layer layer)

size

public int size()
Returns the size of the group layer.

Returns:
the size of the group layer.

setOpacity

public void setOpacity(float opacity)
Sets the opacity of the GroupLayer, it will change all opacity of it sublayers.

Overrides:
setOpacity in class Layer
Parameters:
opacity - the opacity to set.

getFullExtent

public Envelope getFullExtent()
Returns the full extent of the layer. Returns NULL if the group layer is empty.

Overrides:
getFullExtent in class Layer
Returns:
an Envelope object

getDefaultSpatialReference

public SpatialReference getDefaultSpatialReference()
Gets the defaultSpatialReference of the Layer.

Overrides:
getDefaultSpatialReference in class Layer
Returns:
Returns the defaultSpatialReference.

getID

public long getID()
Return the Layer runtime ID which is a long integer. A zero will be returned if the Layer object is invalid.

Returns:
a long integer.

getMinScale

public double getMinScale()
Description copied from class: Layer
Gets the minimum scale at which this layer will be displayed. For service layers this is defined by the service. For a GraphicsLayer there is no minimum scale.

Overrides:
getMinScale in class Layer
Returns:
the minimum scale

getMaxScale

public double getMaxScale()
Description copied from class: Layer
Gets the maximum scale at which this layer will be displayed. For service layers this is defined by the service. For a GraphicsLayer there is no maximum scale.

Overrides:
getMaxScale in class Layer
Returns:
the maximum scale

getLegend

public LayerLegendInfoCollection getLegend()
Specified by:
getLegend in class Layer

internalInit

protected void internalInit()
Specified by:
internalInit in class Layer

setDefaultSpatialReference

protected void setDefaultSpatialReference(SpatialReference defaultSpatialReference)
Sets the defaultSpatialReference of the Layer.

Overrides:
setDefaultSpatialReference in class Layer
Parameters:
defaultSpatialReference - The defaultSpatialReference to set.

internalAdd

protected int internalAdd(Layer layer)
Parameters:
layer -
Returns:

internalAddLayerAt

protected boolean internalAddLayerAt(Layer layer,
                                     int index)
Parameters:
layer -
index -
Returns:

doesExist

protected boolean doesExist(com.esri.map.GroupLayerBase grouplayer,
                            Layer checklayer)

recycleLayers

protected void recycleLayers()

graphicsLayerAddRequest

protected void graphicsLayerAddRequest(String layerName,
                                       int index)

init

protected void init(boolean isVisible,
                    int[] visibleLayers,
                    String title,
                    float opacity)
Description copied from class: Layer
This method is called only when composing a Map from a Web Map. The web map contains properties that every layer should be initialized with, up front.

Specified by:
init in class Layer

initializeNativeLayer

protected void initializeNativeLayer()
Specified by:
initializeNativeLayer in class Layer

setMap

protected void setMap(JMap parent)
Description copied from class: Layer
Every layer is provided a reference to the parent JComponent that contains that layer. Layers can use the existence or absence of a parent to determine if are being used in a JMap.

Overrides:
setMap in class Layer
Parameters:
parent - the new parent component


Copyright © 2012. All Rights Reserved.