com.moximedia.ows
Class Layers

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended bycom.moximedia.ows.Layers
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, LayerType, java.util.List, java.util.RandomAccess, java.io.Serializable

public class Layers
extends java.util.ArrayList
implements LayerType, java.io.Serializable

Author:
jdc
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface com.moximedia.ows.types.LayerType
LAYER_TYPE_ACETATE, LAYER_TYPE_WFS, LAYER_TYPE_WMS
 
Constructor Summary
Layers()
          Creates new Layers
 
Method Summary
 void addLayer(int index, Layer layer)
          Adds a layer to the array at the specified position.
 void addLayer(Layer layer)
          Adds a layer to the array
 AcetateLayer getAcetateLayerByName(java.lang.String name)
          Gets the specified acetate layer by name.
 AcetateLayer getAcetateLayerByTitle(java.lang.String title)
          Gets the specified acetate layer by title.
 Layers getAcetateLayers()
          Gets a Layers object containing just the acetate layers in this object.
 Layer getActiveLayer()
          Returns the active layer, if any.
 Layer getActiveLayer(double scale)
          Gets the active layer, if any.
 LayerGroup getActiveLayerGroup()
          Gets the active layer group, if any.
 Layer getLayer(int index)
          Returns the layer at the specified index.
 Layer getLayerById(java.lang.String id)
          Returns the layer with the specified id.
 Layer getLayerByIdOrTitle(java.lang.String idOrTitle)
          Returns the layer with the specified id or title.
 Layer getLayerByName(java.lang.String name)
          Returns the layer with the specified name.
 Layer getLayerByObjectId(int objectId)
          Returns the layer with the specified object id.
 Layer getLayerByTitle(java.lang.String title)
          Returns the layer with the the specified title.
 int getLayerIndex(java.lang.String name)
          Returns the index of the specified layer.
 WfsLayer getWfsLayerByName(java.lang.String name)
          Returns the WFS layer with the the specified name.
 WfsLayer getWfsLayerByTitle(java.lang.String title)
          Returns the WFS layer with the the specified title.
 WmsLayer getWmsLayerByName(java.lang.String name)
          Returns the WMS layer with the the specified name.
 WmsLayer getWmsLayerByTitle(java.lang.String title)
          Returns the WMS layer with the the specified title.
 void moveTo(Layer layer, int index)
          Moves a layer to the specified index order.
 void moveToBottom(int layerIndex)
          Moves the layer at the specified index to the bottom of the index order.
 void moveToBottom(Layer layer)
          Moves a layer to the bottom of the index order.
 void moveToTop(int layerIndex)
          Moves the layer at the specified index to the top of the index order.
 void moveToTop(Layer layer)
          Moves a layer to the top of the index order.
 void removeLayer(java.lang.String name)
          Removes all layers with the specified name.
 void removeLayerByName(java.lang.String name)
          Removes all layers with the specified name.
 void removeLayerByTitle(java.lang.String title)
          Removes all layers with the specified title.
 void setActiveLayer(int objectId)
          Sets the active layer using an object id.
 void setActiveLayer(Layer layer)
          Sets the active layer.
 void setActiveLayerGroup(LayerGroup group)
          Sets the active layer group.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

Layers

public Layers()
Creates new Layers

Method Detail

addLayer

public void addLayer(Layer layer)
Adds a layer to the array

Parameters:
layer - The layer to add.

addLayer

public void addLayer(int index,
                     Layer layer)
Adds a layer to the array at the specified position.

Parameters:
index - The position (zero based) to add the layer.
layer - The layer to add.

getLayerIndex

public int getLayerIndex(java.lang.String name)
Returns the index of the specified layer.

Parameters:
name - The layer name.
Returns:
The zero based indes of the specified layer, or -1 if the layer is not found.

getAcetateLayers

public Layers getAcetateLayers()
Gets a Layers object containing just the acetate layers in this object.

Returns:
A Layers object containing just the acetate layers in this object.

getAcetateLayerByName

public AcetateLayer getAcetateLayerByName(java.lang.String name)
Gets the specified acetate layer by name.

Parameters:
name - The name to search for.
Returns:
The layer, or null if a matching layer is not found.

getAcetateLayerByTitle

public AcetateLayer getAcetateLayerByTitle(java.lang.String title)
Gets the specified acetate layer by title.

Parameters:
title - The title to search for.
Returns:
The layer, or null if a matching layer is not found.

getActiveLayer

public Layer getActiveLayer()
Returns the active layer, if any.

Returns:
The active layer, or null if an active layer is not set.

getActiveLayer

public Layer getActiveLayer(double scale)
Gets the active layer, if any. If a layer group is active, this method returns the first layer in the layer group that is visible at the specified scale.

Parameters:
scale - The map scale.
Returns:
The layer, or null if a layer isn't active at the scale.

getActiveLayerGroup

public LayerGroup getActiveLayerGroup()
Gets the active layer group, if any.

Returns:
The active layer group, or null if a layer group isn't acive.

getLayer

public Layer getLayer(int index)
Returns the layer at the specified index.

Parameters:
index - The zero based index of the layer.
Returns:
The layer at the specified index, or null if a layer is not found at the index.

getLayerById

public Layer getLayerById(java.lang.String id)
Returns the layer with the specified id.

Parameters:
id - The id of the layer.
Returns:
The layer with the specified id, or null if a layer is not found with the specified id.

getLayerByIdOrTitle

public Layer getLayerByIdOrTitle(java.lang.String idOrTitle)
Returns the layer with the specified id or title.

Parameters:
idOrTitle - The id or title of the layer.
Returns:
The layer with the specified id or title, or null if a layer is not found with the specified id or title.

getLayerByObjectId

public Layer getLayerByObjectId(int objectId)
Returns the layer with the specified object id.

Parameters:
objectId - The object id of the layer.
Returns:
The layer with the specified object id, or null if a layer is not found with the specified object id.

getLayerByName

public Layer getLayerByName(java.lang.String name)
Returns the layer with the specified name.

Parameters:
name - The name of the layer.
Returns:
The layer with the specified name, or null if a layer is not found with the specified name.

getLayerByTitle

public Layer getLayerByTitle(java.lang.String title)
Returns the layer with the the specified title.

Parameters:
title - The title of the layer.
Returns:
The layer with the specified title, or null if a layer is not found with the specified title.

getWfsLayerByName

public WfsLayer getWfsLayerByName(java.lang.String name)
Returns the WFS layer with the the specified name.

Parameters:
name - The name of the layer.
Returns:
The WFS layer with the specified name, or null if a layer is not found with the specified name.

getWfsLayerByTitle

public WfsLayer getWfsLayerByTitle(java.lang.String title)
Returns the WFS layer with the the specified title.

Parameters:
title - The title of the layer.
Returns:
The WFS layer with the specified title, or null if a layer is not found with the specified title.

getWmsLayerByName

public WmsLayer getWmsLayerByName(java.lang.String name)
Returns the WMS layer with the the specified name.

Parameters:
name - The name of the layer.
Returns:
The WMS layer with the specified name, or null if a layer is not found with the specified name.

getWmsLayerByTitle

public WmsLayer getWmsLayerByTitle(java.lang.String title)
Returns the WMS layer with the the specified title.

Parameters:
title - The title of the layer.
Returns:
The WMS layer with the specified title, or null if a layer is not found with the specified title.

moveTo

public void moveTo(Layer layer,
                   int index)
Moves a layer to the specified index order.

Parameters:
layer - The Layer to move.
index - The zero based new position.

moveToBottom

public void moveToBottom(Layer layer)
Moves a layer to the bottom of the index order.

Parameters:
layer - The Layer to move.

moveToBottom

public void moveToBottom(int layerIndex)
Moves the layer at the specified index to the bottom of the index order.

Parameters:
layerIndex - The zero based position of the layer.

moveToTop

public void moveToTop(Layer layer)
Moves a layer to the top of the index order.

Parameters:
layer - The Layer to move.

moveToTop

public void moveToTop(int layerIndex)
Moves the layer at the specified index to the top of the index order.

Parameters:
layerIndex - The zero based position of the layer.

removeLayer

public void removeLayer(java.lang.String name)
Removes all layers with the specified name.

Parameters:
name - The name of the layer to remove.

removeLayerByName

public void removeLayerByName(java.lang.String name)
Removes all layers with the specified name.

Parameters:
name - The name of the layer to remove.

removeLayerByTitle

public void removeLayerByTitle(java.lang.String title)
Removes all layers with the specified title.

Parameters:
title - The title of the layer to remove.

setActiveLayer

public void setActiveLayer(int objectId)
Sets the active layer using an object id.

Parameters:
objectId - The objectId of the layer to make active.

setActiveLayer

public void setActiveLayer(Layer layer)
Sets the active layer.

Parameters:
layer - The layer to make active.

setActiveLayerGroup

public void setActiveLayerGroup(LayerGroup group)
Sets the active layer group.

Parameters:
group - The layer group to make active.


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.