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 voidaddMapLayer(int index, L layer)Insert a map layer inside this container at the specified index.booleanaddMapLayer(L layer)Add a map layer inside this container at the top-most position.voidbindChangeListener(ChangeListener listener)Bind the given listener to this container.protected Rectangle2dcalcBounds()Compute the bounds of this element.protected Rectangle2dcalcVisibleBounds()Compute the bounds of this visible elements.voidclear()Remove all the children.MultiMapLayer<L>clone()Clone this object to obtain a valid copy.voidfireElementChanged()Fire the event that indicates this object has changed.protected voidfireLayerAddedEvent(MapLayer layer, int index)Fire the event that indicates a layer was added.voidfireLayerAttributeChangedEvent(MapLayerAttributeChangeEvent event)Forward to the parent layer the event that indicates the content of a child layer was changed.voidfireLayerContentChangedEvent(MapLayerContentEvent event)Forward to the parent layer the event that indicates the content of a child layer was changed.voidfireLayerHierarchyChangedEvent(MapLayerHierarchyEvent event)Fire the event that indicates the hierarchy of layers has changed.protected voidfireLayerMovedDownEvent(MapLayer layer, int newIndex)Fire the event that indicates a layer was moved down.protected voidfireLayerMovedUpEvent(MapLayer layer, int newIndex)Fire the event that indicates a layer was moved up.protected voidfireLayerRemoveAllEvent(List<? extends L> removedObjects)Fire the event that indicates all the layers were removed.protected voidfireLayerRemovedEvent(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.LgetChildAt(int childIndex)Replies the child at the specified index.intgetChildCount()Replies count of children.Class<? extends L>getElementType()Replies the class of the elements in this iterable object.LgetMapLayerAt(int index)Replies the map layer at the specified index.intgetMapLayerCount()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.Rectangle2dgetVisibleBoundingBox()Replies the bounding box of this visible elements.intindexOf(MapLayer layer)Replies the index of the given layer in this container.booleanisBottomLayer(MapLayer layer)Replies if the specified layer is the bottom-most inside this container.booleanisTopLayer(MapLayer layer)Replies if the specified layer is the top-most inside this container.Iterator<L>iterator()booleanmoveLayerDown(int index)Move the specified layer up.booleanmoveLayerDown(MapLayer layer)Move the specified layer up.booleanmoveLayerUp(int index)Move the specified layer up.booleanmoveLayerUp(MapLayer layer)Move the specified layer up.voidonAttributeChangeEvent(AttributeChangeEvent event)Invoked when the attribute's value changed.booleanremoveMapLayer(MapLayer layer)Remove a map layer from this container.LremoveMapLayerAt(int index)Remove the map layer inside this container.voidresetBoundingBox()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 voidsetMapLayerAt(int index, L layer)Put the given layer at the given index but do not fire any event.intsize()Replies the count of map elements inside this container.voidtoJson(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, ornullif 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, ornullif 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, ornullif 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, ornullif 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:GISContainerBind the given listener to this container.- Specified by:
bindChangeListenerin interfaceGISContainer<L extends MapLayer>- Parameters:
listener- the listener.
-
fireLayerContentChangedEvent
public void fireLayerContentChangedEvent(MapLayerContentEvent event)
Description copied from class:MapLayerForward to the parent layer the event that indicates the content of a child layer was changed. Only theMapLayerListenerand the container are notified.- Specified by:
fireLayerContentChangedEventin interfaceGISLayerContainer<L extends MapLayer>- Overrides:
fireLayerContentChangedEventin classMapLayer- Parameters:
event- the event.
-
fireLayerHierarchyChangedEvent
public void fireLayerHierarchyChangedEvent(MapLayerHierarchyEvent event)
Description copied from class:MapLayerFire the event that indicates the hierarchy of layers has changed. Only theMapLayerListenerand the container are notified.- Specified by:
fireLayerHierarchyChangedEventin interfaceGISLayerContainer<L extends MapLayer>- Overrides:
fireLayerHierarchyChangedEventin classMapLayer- Parameters:
event- the event.
-
fireElementChanged
public void fireElementChanged()
Description copied from class:MapLayerFire the event that indicates this object has changed. Only theGISEditableChangeListenerare notified.- Overrides:
fireElementChangedin classMapLayer
-
clone
@Pure public MultiMapLayer<L> clone()
Description copied from class:MapLayerClone this object to obtain a valid copy.- Specified by:
clonein interfaceAttributeCollection- Specified by:
clonein interfaceAttributeProvider- Specified by:
clonein interfaceGISCloneable<L extends MapLayer>- Specified by:
clonein interfaceGISElement- Overrides:
clonein classMapLayer- Returns:
- a copy
-
toJson
@Pure public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Overrides:
toJsonin classAbstractBoundedGISElement<GISLayerContainer<?>,MapLayer>- Parameters:
buffer- the Json buffer.
-
getElementType
public Class<? extends L> getElementType()
Description copied from interface:InformedIterableReplies the class of the elements in this iterable object.- Specified by:
getElementTypein interfaceInformedIterable<L extends MapLayer>- Returns:
- the type of the elements.
-
calcBounds
protected Rectangle2d calcBounds()
Description copied from class:AbstractBoundedGISElementCompute the bounds of this element. This function does not update the internal attribute replied byAbstractBoundedGISElement.getBoundingBox()- Specified by:
calcBoundsin classAbstractBoundedGISElement<GISLayerContainer<?>,MapLayer>- Returns:
- the bounds
-
getShape
public Shape2d<?> getShape()
Description copied from interface:BoundedGISElementReplies the shape of this this element.The bounding box replied by
BoundedElement2afp.getBoundingBox()encloses the replied shape.- Specified by:
getShapein interfaceBoundedGISElement- Returns:
- the shape or
nullif 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
nullif no layer.
-
fireLayerAttributeChangedEvent
public void fireLayerAttributeChangedEvent(MapLayerAttributeChangeEvent event)
Description copied from class:MapLayerForward to the parent layer the event that indicates the content of a child layer was changed. Only theMapLayerListenerand the container are notified.- Specified by:
fireLayerAttributeChangedEventin interfaceGISLayerContainer<L extends MapLayer>- Overrides:
fireLayerAttributeChangedEventin classMapLayer- Parameters:
event- the event
-
getVisibleBoundingBox
@Pure public Rectangle2d getVisibleBoundingBox()
Description copied from interface:GISLayerContainerReplies the bounding box of this visible elements.- Specified by:
getVisibleBoundingBoxin interfaceGISLayerContainer<L extends MapLayer>- Returns:
- the bounding box or
nullif not applicable.
-
resetBoundingBox
public void resetBoundingBox()
Description copied from class:MapLayerClear the current bounding box to force the computation of it at the next call toAbstractBoundedGISElement.getBoundingBox().- Specified by:
resetBoundingBoxin interfaceBoundedGISElement- Specified by:
resetBoundingBoxin interfaceGISContainer<L extends MapLayer>- Overrides:
resetBoundingBoxin classMapLayer
-
size
@Pure public int size()
Description copied from interface:GISContainerReplies the count of map elements inside this container.- Specified by:
sizein interfaceGISContainer<L extends MapLayer>- Returns:
- the count of map elements inside this container.
-
getMapLayerCount
@Pure public int getMapLayerCount()
Description copied from interface:GISLayerContainerReplies the count of map layers inside this container.- Specified by:
getMapLayerCountin interfaceGISLayerContainer<L extends MapLayer>- Returns:
- the count of map layers
-
addMapLayer
public boolean addMapLayer(L layer)
Description copied from interface:GISLayerContainerAdd a map layer inside this container at the top-most position.- Specified by:
addMapLayerin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the layer was added successfully, otherwisefalse
-
addMapLayer
public void addMapLayer(int index, L layer)Description copied from interface:GISLayerContainerInsert a map layer inside this container at the specified index.- Specified by:
addMapLayerin 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:GISLayerContainerRemove a map layer from this container.- Specified by:
removeMapLayerin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the layer was removed successfully, otherwisefalse
-
removeMapLayerAt
public L removeMapLayerAt(int index)
Description copied from interface:GISLayerContainerRemove the map layer inside this container.- Specified by:
removeMapLayerAtin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
index- the index.- Returns:
- the removed map layer
-
moveLayerUp
public boolean moveLayerUp(MapLayer layer)
Description copied from interface:GISLayerContainerMove 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:
moveLayerUpin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the layer was moved. otherwisefalse
-
moveLayerUp
public boolean moveLayerUp(int index)
Description copied from interface:GISLayerContainerMove 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:
moveLayerUpin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
index- the index.- Returns:
trueif the layer was moved. otherwisefalse
-
moveLayerDown
public boolean moveLayerDown(MapLayer layer)
Description copied from interface:GISLayerContainerMove 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:
moveLayerDownin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the layer was moved. otherwisefalse
-
moveLayerDown
public boolean moveLayerDown(int index)
Description copied from interface:GISLayerContainerMove 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:
moveLayerDownin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
index- the index.- Returns:
trueif the layer was moved. otherwisefalse
-
getMapLayerAt
@Pure public final L getMapLayerAt(int index)
Description copied from interface:GISLayerContainerReplies the map layer at the specified index.- Specified by:
getMapLayerAtin 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:GISLayerContainerReplies the map layers.- Specified by:
getAllMapLayersin interfaceGISLayerContainer<L extends MapLayer>- Returns:
- the map layers
-
clear
public void clear()
Description copied from interface:GISLayerContainerRemove all the children.- Specified by:
clearin interfaceGISLayerContainer<L extends MapLayer>
-
isBottomLayer
@Pure public boolean isBottomLayer(MapLayer layer)
Description copied from interface:GISLayerContainerReplies if the specified layer is the bottom-most inside this container.- Specified by:
isBottomLayerin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the given layer is the bottom-most layer in this container, otherwisefalse
-
isTopLayer
@Pure public boolean isTopLayer(MapLayer layer)
Description copied from interface:GISLayerContainerReplies if the specified layer is the top-most inside this container.- Specified by:
isTopLayerin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
trueif the given layer is the top-most layer in this container, otherwisefalse
-
reverseIterator
@Pure public final Iterator<L> reverseIterator()
Description copied from interface:GISLayerContainerReplies a reverse iterator (from bottom to top).- Specified by:
reverseIteratorin 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:GISLayerContainerReplies a bottom-up iterator.- Specified by:
getBottomUpIteratorin 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:GISLayerContainerReplies a top-down iterator.- Specified by:
getTopDownIteratorin 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:MapLayerInvoked when the attribute's value changed.- Specified by:
onAttributeChangeEventin interfaceAttributeChangeListener- Overrides:
onAttributeChangeEventin 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:GISTreeBrowsableReplies the parent that contains this element, ornull.- Specified by:
getParentin interfaceGISTreeBrowsable<L extends MapLayer>- Returns:
- the parent element.
-
getChildCount
@Pure public final int getChildCount()
Description copied from interface:GISTreeBrowsableReplies count of children.- Specified by:
getChildCountin interfaceGISTreeBrowsable<L extends MapLayer>- Returns:
- count of children.
-
getChildAt
@Pure public L getChildAt(int childIndex)
Description copied from interface:GISTreeBrowsableReplies the child at the specified index.- Specified by:
getChildAtin 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:GISLayerContainerReplies the index of the given layer in this container.- Specified by:
indexOfin interfaceGISLayerContainer<L extends MapLayer>- Parameters:
layer- the layer.- Returns:
- the index of the layer or
-1if not found
-
-