Class MultiMapLayer<L extends MapLayer>
- java.lang.Object
-
- org.arakhne.afc.gis.primitive.AbstractGISElement<C,T>
-
- org.arakhne.afc.gis.primitive.AbstractBoundedGISElement<GISLayerContainer<?>,MapLayer>
-
- org.arakhne.afc.gis.maplayer.MapLayer
-
- org.arakhne.afc.gis.maplayer.MultiMapLayer<L>
-
- Type Parameters:
L
- is the type of the layers in this container.
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<L>
,EventListener
,AttributeChangeListener
,AttributeCollection
,AttributeProvider
,GISLayerContainer<L>
,BoundedGISElement
,GISBrowsable
,GISCloneable<MapLayer>
,GISContainer<L>
,GISContentElement<GISLayerContainer<?>>
,GISEditable
,GISElement
,GISPrimitive
,GISTreeBrowsable<L>
,BoundedElement2afp<Rectangle2d>
,InformedIterable<L>
,JsonableObject
- Direct Known Subclasses:
BusLineLayer
,BusNetworkLayer
public class MultiMapLayer<L extends MapLayer> extends MapLayer implements GISTreeBrowsable<L>, GISLayerContainer<L>
This class is a container of layers.The order of the layers in this container is important. It is assumed to be from the bottom-most layer (at the end of the layer collection) to the top-most layer (at index 0). Iterator on this container must go from top to bottom.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.arakhne.afc.gis.maplayer.MapLayer
MapLayer.SpecialAttributeValue
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.gis.maplayer.MapLayer
ATTR_CLICKABLE, ATTR_COLOR, ATTR_REMOVABLE, ATTR_USE_CONTAINER_COLOR, ATTR_VISIBLE, listeners
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISElement
ATTR_NAME, NAME_COMPARATOR
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description MultiMapLayer()
Create a new layer with the specified attribute source.MultiMapLayer(boolean isTemp)
Create a new layer with the specified attribute source.MultiMapLayer(UUID id)
Create a new layer with the specified attribute source.MultiMapLayer(UUID id, boolean isTemp)
Create a new layer with the specified attribute source.MultiMapLayer(UUID id, AttributeCollection attributeSource)
Create a new layer with the specified attribute source.MultiMapLayer(UUID id, AttributeCollection attributeSource, boolean isTemp)
Create a new layer with the specified attribute source.MultiMapLayer(AttributeCollection attributeSource)
Create a new layer with the specified attribute source.MultiMapLayer(AttributeCollection attributeSource, boolean isTemp)
Create a new layer with the specified attribute source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMapLayer(int index, L layer)
Insert a map layer inside this container at the specified index.boolean
addMapLayer(L layer)
Add a map layer inside this container at the top-most position.void
bindChangeListener(ChangeListener listener)
Bind the given listener to this container.protected Rectangle2d
calcBounds()
Compute the bounds of this element.protected Rectangle2d
calcVisibleBounds()
Compute the bounds of this visible elements.void
clear()
Remove all the children.MultiMapLayer<L>
clone()
Clone this object to obtain a valid copy.void
fireElementChanged()
Fire the event that indicates this object has changed.protected void
fireLayerAddedEvent(MapLayer layer, int index)
Fire the event that indicates a layer was added.void
fireLayerAttributeChangedEvent(MapLayerAttributeChangeEvent event)
Forward to the parent layer the event that indicates the content of a child layer was changed.void
fireLayerContentChangedEvent(MapLayerContentEvent event)
Forward to the parent layer the event that indicates the content of a child layer was changed.void
fireLayerHierarchyChangedEvent(MapLayerHierarchyEvent event)
Fire the event that indicates the hierarchy of layers has changed.protected void
fireLayerMovedDownEvent(MapLayer layer, int newIndex)
Fire the event that indicates a layer was moved down.protected void
fireLayerMovedUpEvent(MapLayer layer, int newIndex)
Fire the event that indicates a layer was moved up.protected void
fireLayerRemoveAllEvent(List<? extends L> removedObjects)
Fire the event that indicates all the layers were removed.protected void
fireLayerRemovedEvent(MapLayer layer, int oldChildIndex)
Fire the event that indicates a layer was removed.List<L>
getAllMapLayers()
Replies the map layers.Iterator<L>
getBottomUpIterator()
Replies a bottom-up iterator.L
getChildAt(int childIndex)
Replies the child at the specified index.int
getChildCount()
Replies count of children.Class<? extends L>
getElementType()
Replies the class of the elements in this iterable object.L
getMapLayerAt(int index)
Replies the map layer at the specified index.int
getMapLayerCount()
Replies the count of map layers inside this container.GISTreeBrowsable<?>
getParent()
Replies the parent that contains this element, ornull
.Shape2d<?>
getShape()
Replies the shape of this this element.Iterator<L>
getTopDownIterator()
Replies a top-down iterator.Rectangle2d
getVisibleBoundingBox()
Replies the bounding box of this visible elements.int
indexOf(MapLayer layer)
Replies the index of the given layer in this container.boolean
isBottomLayer(MapLayer layer)
Replies if the specified layer is the bottom-most inside this container.boolean
isTopLayer(MapLayer layer)
Replies if the specified layer is the top-most inside this container.Iterator<L>
iterator()
boolean
moveLayerDown(int index)
Move the specified layer up.boolean
moveLayerDown(MapLayer layer)
Move the specified layer up.boolean
moveLayerUp(int index)
Move the specified layer up.boolean
moveLayerUp(MapLayer layer)
Move the specified layer up.void
onAttributeChangeEvent(AttributeChangeEvent event)
Invoked when the attribute's value changed.boolean
removeMapLayer(MapLayer layer)
Remove a map layer from this container.L
removeMapLayerAt(int index)
Remove the map layer inside this container.void
resetBoundingBox()
Clear the current bounding box to force the computation of it at the next call toAbstractBoundedGISElement.getBoundingBox()
.Iterator<L>
reverseIterator()
Replies a reverse iterator (from bottom to top).protected void
setMapLayerAt(int index, L layer)
Put the given layer at the given index but do not fire any event.int
size()
Replies the count of map elements inside this container.void
toJson(JsonBuffer buffer)
Replies the Json representation of this node.-
Methods inherited from class org.arakhne.afc.gis.maplayer.MapLayer
addGISEditableChangeListener, addLayerListener, contains, contains, fireLayerAttributeChangedEvent, getColor, getGeoLocation, getListeners, getParentName, getRawColor, indexInParent, intersects, isClickable, isContainerColorUsed, isReadOnlyObject, isRemovable, isTemporaryLayer, isVisible, removeGISEditableChangeListener, removeLayerListener, repaint, setClickable, setColor, setContainer, setContainerColorUse, setReadOnlyObject, setRemovable, setUUID, setVisible, setVisible
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractBoundedGISElement
getBoundingBox, setBoundingBox
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractGISElement
addAttributeChangeListener, addAttributes, addAttributes, attributes, copyAttributes, flush, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCollection, getAttributeCount, getAttributeObject, getAttributeProvider, getContainer, getGeoId, getName, getTopContainer, getUUID, hasAttribute, hashKey, isEventFirable, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setEventFirable, setName, toMap, toMap, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeCollection
addAttributeChangeListener, addAttributes, addAttributes, flush, isEventFirable, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setEventFirable
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeProvider
attributes, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCount, getAttributeObject, hasAttribute, toMap, toMap
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.BoundedElement2afp
getBoundingBox
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISBrowsable
getParentName, isVisible, setColor, setName, setVisible, setVisible
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISContainer
getColor, getName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISContentElement
getContainer, getTopContainer
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISEditable
getName, setName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISElement
copyAttributes, getName, hashKey, setName
-
Methods inherited from interface org.arakhne.afc.gis.maplayer.GISLayerContainer
addLayerListener, removeLayerListener
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
getGeoId, getGeoLocation, getUUID
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
MultiMapLayer
public MultiMapLayer()
Create a new layer with the specified attribute source.
-
MultiMapLayer
public MultiMapLayer(AttributeCollection attributeSource)
Create a new layer with the specified attribute source.- Parameters:
attributeSource
- is the provider of the layer's attributes.
-
MultiMapLayer
public MultiMapLayer(boolean isTemp)
Create a new layer with the specified attribute source.- Parameters:
isTemp
- indicates if this layer is temporary.
-
MultiMapLayer
public MultiMapLayer(AttributeCollection attributeSource, boolean isTemp)
Create a new layer with the specified attribute source.- Parameters:
attributeSource
- is the provider of the layer's attributes.isTemp
- indicates if this layer is temporary.
-
MultiMapLayer
public MultiMapLayer(UUID id)
Create a new layer with the specified attribute source.- Parameters:
id
- is the unique identifier of this element, ornull
if unknown.- Since:
- 4.0
-
MultiMapLayer
public MultiMapLayer(UUID id, AttributeCollection attributeSource)
Create a new layer with the specified attribute source.- Parameters:
id
- is the unique identifier of this element, ornull
if unknown.attributeSource
- is the provider of the layer's attributes.- Since:
- 4.0
-
MultiMapLayer
public MultiMapLayer(UUID id, boolean isTemp)
Create a new layer with the specified attribute source.- Parameters:
id
- is the unique identifier of this element, ornull
if unknown.isTemp
- indicates if this layer is temporary.- Since:
- 4.0
-
MultiMapLayer
public MultiMapLayer(UUID id, AttributeCollection attributeSource, boolean isTemp)
Create a new layer with the specified attribute source.- Parameters:
id
- is the unique identifier of this element, ornull
if unknown.attributeSource
- is the provider of the layer's attributes.isTemp
- indicates if this layer is temporary.- Since:
- 4.0
-
-
Method Detail
-
bindChangeListener
public void bindChangeListener(ChangeListener listener)
Description copied from interface:GISContainer
Bind the given listener to this container.- Specified by:
bindChangeListener
in interfaceGISContainer<L extends MapLayer>
- Parameters:
listener
- the listener.
-
fireLayerContentChangedEvent
public void fireLayerContentChangedEvent(MapLayerContentEvent event)
Description copied from class:MapLayer
Forward to the parent layer the event that indicates the content of a child layer was changed. Only theMapLayerListener
and the container are notified.- Specified by:
fireLayerContentChangedEvent
in interfaceGISLayerContainer<L extends MapLayer>
- Overrides:
fireLayerContentChangedEvent
in classMapLayer
- Parameters:
event
- the event.
-
fireLayerHierarchyChangedEvent
public void fireLayerHierarchyChangedEvent(MapLayerHierarchyEvent event)
Description copied from class:MapLayer
Fire the event that indicates the hierarchy of layers has changed. Only theMapLayerListener
and the container are notified.- Specified by:
fireLayerHierarchyChangedEvent
in interfaceGISLayerContainer<L extends MapLayer>
- Overrides:
fireLayerHierarchyChangedEvent
in classMapLayer
- Parameters:
event
- the event.
-
fireElementChanged
public void fireElementChanged()
Description copied from class:MapLayer
Fire the event that indicates this object has changed. Only theGISEditableChangeListener
are notified.- Overrides:
fireElementChanged
in classMapLayer
-
clone
@Pure public MultiMapLayer<L> clone()
Description copied from class:MapLayer
Clone this object to obtain a valid copy.- Specified by:
clone
in interfaceAttributeCollection
- Specified by:
clone
in interfaceAttributeProvider
- Specified by:
clone
in interfaceGISCloneable<L extends MapLayer>
- Specified by:
clone
in interfaceGISElement
- Overrides:
clone
in classMapLayer
- Returns:
- a copy
-
toJson
@Pure public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObject
Replies the Json representation of this node.- Specified by:
toJson
in interfaceJsonableObject
- Overrides:
toJson
in classAbstractBoundedGISElement<GISLayerContainer<?>,MapLayer>
- Parameters:
buffer
- the Json buffer.
-
getElementType
public Class<? extends L> getElementType()
Description copied from interface:InformedIterable
Replies the class of the elements in this iterable object.- Specified by:
getElementType
in interfaceInformedIterable<L extends MapLayer>
- Returns:
- the type of the elements.
-
calcBounds
protected Rectangle2d calcBounds()
Description copied from class:AbstractBoundedGISElement
Compute the bounds of this element. This function does not update the internal attribute replied byAbstractBoundedGISElement.getBoundingBox()
- Specified by:
calcBounds
in classAbstractBoundedGISElement<GISLayerContainer<?>,MapLayer>
- Returns:
- the bounds
-
getShape
public Shape2d<?> getShape()
Description copied from interface:BoundedGISElement
Replies the shape of this this element.The bounding box replied by
BoundedElement2afp.getBoundingBox()
encloses the replied shape.- Specified by:
getShape
in interfaceBoundedGISElement
- Returns:
- the shape or
null
if not applicable.
-
calcVisibleBounds
protected Rectangle2d calcVisibleBounds()
Compute the bounds of this visible elements. This function does not update the internal attribute replied bygetVisibleBoundingBox()
- Returns:
- the visible bounds or
null
if no layer.
-
fireLayerAttributeChangedEvent
public void fireLayerAttributeChangedEvent(MapLayerAttributeChangeEvent event)
Description copied from class:MapLayer
Forward to the parent layer the event that indicates the content of a child layer was changed. Only theMapLayerListener
and the container are notified.- Specified by:
fireLayerAttributeChangedEvent
in interfaceGISLayerContainer<L extends MapLayer>
- Overrides:
fireLayerAttributeChangedEvent
in classMapLayer
- Parameters:
event
- the event
-
getVisibleBoundingBox
@Pure public Rectangle2d getVisibleBoundingBox()
Description copied from interface:GISLayerContainer
Replies the bounding box of this visible elements.- Specified by:
getVisibleBoundingBox
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- the bounding box or
null
if not applicable.
-
resetBoundingBox
public void resetBoundingBox()
Description copied from class:MapLayer
Clear the current bounding box to force the computation of it at the next call toAbstractBoundedGISElement.getBoundingBox()
.- Specified by:
resetBoundingBox
in interfaceBoundedGISElement
- Specified by:
resetBoundingBox
in interfaceGISContainer<L extends MapLayer>
- Overrides:
resetBoundingBox
in classMapLayer
-
size
@Pure public int size()
Description copied from interface:GISContainer
Replies the count of map elements inside this container.- Specified by:
size
in interfaceGISContainer<L extends MapLayer>
- Returns:
- the count of map elements inside this container.
-
getMapLayerCount
@Pure public int getMapLayerCount()
Description copied from interface:GISLayerContainer
Replies the count of map layers inside this container.- Specified by:
getMapLayerCount
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- the count of map layers
-
addMapLayer
public boolean addMapLayer(L layer)
Description copied from interface:GISLayerContainer
Add a map layer inside this container at the top-most position.- Specified by:
addMapLayer
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the layer was added successfully, otherwisefalse
-
addMapLayer
public void addMapLayer(int index, L layer)
Description copied from interface:GISLayerContainer
Insert a map layer inside this container at the specified index.- Specified by:
addMapLayer
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
index
- the layer position.layer
- the layer.
-
setMapLayerAt
protected void setMapLayerAt(int index, L layer)
Put the given layer at the given index but do not fire any event.This function does not test if the layer is already present in the list of layers.
- Parameters:
index
- index.layer
- layer.- Throws:
IndexOutOfBoundsException
- if the index is invalid.
-
removeMapLayer
public boolean removeMapLayer(MapLayer layer)
Description copied from interface:GISLayerContainer
Remove a map layer from this container.- Specified by:
removeMapLayer
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the layer was removed successfully, otherwisefalse
-
removeMapLayerAt
public L removeMapLayerAt(int index)
Description copied from interface:GISLayerContainer
Remove the map layer inside this container.- Specified by:
removeMapLayerAt
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
index
- the index.- Returns:
- the removed map layer
-
moveLayerUp
public boolean moveLayerUp(MapLayer layer)
Description copied from interface:GISLayerContainer
Move the specified layer up.The layer position is important for drawing and event handling. Indeed the layers will be drawn from the index replied by
GISLayerContainer.getMapLayerCount()
minus 1 (last) to the index0
(first). Moreover the events will be forwarded to the layers from the first to the last.- Specified by:
moveLayerUp
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the layer was moved. otherwisefalse
-
moveLayerUp
public boolean moveLayerUp(int index)
Description copied from interface:GISLayerContainer
Move the specified layer up.The layer position is important for drawing and event handling. Indeed the layers will be drawn from the index replied by
GISLayerContainer.getMapLayerCount()
minus 1 (last) to the index0
(first). Moreover the events will be forwarded to the layers from the first to the last.- Specified by:
moveLayerUp
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
index
- the index.- Returns:
true
if the layer was moved. otherwisefalse
-
moveLayerDown
public boolean moveLayerDown(MapLayer layer)
Description copied from interface:GISLayerContainer
Move the specified layer up.The layer position is important for drawing and event handling. Indeed the layers will be drawn from the index replied by
GISLayerContainer.getMapLayerCount()
minus 1 (last) to the index0
(first). Moreover the events will be forwarded to the layers from the first to the last.- Specified by:
moveLayerDown
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the layer was moved. otherwisefalse
-
moveLayerDown
public boolean moveLayerDown(int index)
Description copied from interface:GISLayerContainer
Move the specified layer up.The layer position is important for drawing and event handling. Indeed the layers will be drawn from the index replied by
GISLayerContainer.getMapLayerCount()
minus 1 (last) to the index0
(first). Moreover the events will be forwarded to the layers from the first to the last.- Specified by:
moveLayerDown
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
index
- the index.- Returns:
true
if the layer was moved. otherwisefalse
-
getMapLayerAt
@Pure public final L getMapLayerAt(int index)
Description copied from interface:GISLayerContainer
Replies the map layer at the specified index.- Specified by:
getMapLayerAt
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
index
- the index.- Returns:
- the map layer at the given index
-
getAllMapLayers
@Pure public List<L> getAllMapLayers()
Description copied from interface:GISLayerContainer
Replies the map layers.- Specified by:
getAllMapLayers
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- the map layers
-
clear
public void clear()
Description copied from interface:GISLayerContainer
Remove all the children.- Specified by:
clear
in interfaceGISLayerContainer<L extends MapLayer>
-
isBottomLayer
@Pure public boolean isBottomLayer(MapLayer layer)
Description copied from interface:GISLayerContainer
Replies if the specified layer is the bottom-most inside this container.- Specified by:
isBottomLayer
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the given layer is the bottom-most layer in this container, otherwisefalse
-
isTopLayer
@Pure public boolean isTopLayer(MapLayer layer)
Description copied from interface:GISLayerContainer
Replies if the specified layer is the top-most inside this container.- Specified by:
isTopLayer
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
true
if the given layer is the top-most layer in this container, otherwisefalse
-
reverseIterator
@Pure public final Iterator<L> reverseIterator()
Description copied from interface:GISLayerContainer
Replies a reverse iterator (from bottom to top).- Specified by:
reverseIterator
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- a reverse iterator on layers.
- See Also:
Iterable.iterator()
,GISLayerContainer.getBottomUpIterator()
,GISLayerContainer.getTopDownIterator()
-
getBottomUpIterator
@Pure public Iterator<L> getBottomUpIterator()
Description copied from interface:GISLayerContainer
Replies a bottom-up iterator.- Specified by:
getBottomUpIterator
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- a bottom-up iterator on layers.
- See Also:
Iterable.iterator()
,GISLayerContainer.reverseIterator()
,GISLayerContainer.getTopDownIterator()
-
getTopDownIterator
@Pure public Iterator<L> getTopDownIterator()
Description copied from interface:GISLayerContainer
Replies a top-down iterator.- Specified by:
getTopDownIterator
in interfaceGISLayerContainer<L extends MapLayer>
- Returns:
- a top-down iterator on layers.
- See Also:
Iterable.iterator()
,GISLayerContainer.reverseIterator()
,GISLayerContainer.getBottomUpIterator()
-
onAttributeChangeEvent
public void onAttributeChangeEvent(AttributeChangeEvent event)
Description copied from class:MapLayer
Invoked when the attribute's value changed.- Specified by:
onAttributeChangeEvent
in interfaceAttributeChangeListener
- Overrides:
onAttributeChangeEvent
in classMapLayer
- Parameters:
event
- describes the changes.
-
fireLayerAddedEvent
protected void fireLayerAddedEvent(MapLayer layer, int index)
Fire the event that indicates a layer was added.- Parameters:
layer
- is the added layer.index
- is the insertion index.
-
fireLayerRemovedEvent
protected void fireLayerRemovedEvent(MapLayer layer, int oldChildIndex)
Fire the event that indicates a layer was removed.- Parameters:
layer
- is the removed layer.oldChildIndex
- the old child index.
-
fireLayerMovedUpEvent
protected void fireLayerMovedUpEvent(MapLayer layer, int newIndex)
Fire the event that indicates a layer was moved up.- Parameters:
layer
- is the moved layer.newIndex
- is the new index of the layer.
-
fireLayerMovedDownEvent
protected void fireLayerMovedDownEvent(MapLayer layer, int newIndex)
Fire the event that indicates a layer was moved down.- Parameters:
layer
- is the moved layer.newIndex
- is the new index of the layer.
-
fireLayerRemoveAllEvent
protected void fireLayerRemoveAllEvent(List<? extends L> removedObjects)
Fire the event that indicates all the layers were removed.- Parameters:
removedObjects
- are the removed objects.
-
getParent
@Pure public GISTreeBrowsable<?> getParent()
Description copied from interface:GISTreeBrowsable
Replies the parent that contains this element, ornull
.- Specified by:
getParent
in interfaceGISTreeBrowsable<L extends MapLayer>
- Returns:
- the parent element.
-
getChildCount
@Pure public final int getChildCount()
Description copied from interface:GISTreeBrowsable
Replies count of children.- Specified by:
getChildCount
in interfaceGISTreeBrowsable<L extends MapLayer>
- Returns:
- count of children.
-
getChildAt
@Pure public L getChildAt(int childIndex)
Description copied from interface:GISTreeBrowsable
Replies the child at the specified index.- Specified by:
getChildAt
in interfaceGISTreeBrowsable<L extends MapLayer>
- Parameters:
childIndex
- is the position of the child to reply- Returns:
- the child at the specified index.
-
indexOf
@Pure public final int indexOf(MapLayer layer)
Description copied from interface:GISLayerContainer
Replies the index of the given layer in this container.- Specified by:
indexOf
in interfaceGISLayerContainer<L extends MapLayer>
- Parameters:
layer
- the layer.- Returns:
- the index of the layer or
-1
if not found
-
-