public class LayerManager extends java.lang.Object implements java.util.Collection<Layer>, EditChangeListener, SelectionListener, java.beans.PropertyChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
LayerManager.Entry |
Constructor and Description |
---|
LayerManager(MapCanvas canvas) |
LayerManager(MapCanvas canvas, java.util.Collection<? extends Layer> lm)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Layer layer)
Inserts the specified layer at the end of this list.
|
boolean |
add(Layer layer, java.lang.Integer position)
Inserts the specified layer at the end of the specified position in this list.
|
boolean |
addAll(java.util.Collection<? extends Layer> c) |
void |
addChangeListener(javax.swing.event.ChangeListener l) |
void |
addEditChangeListener(EditChangeListener l) |
boolean |
addFirst(Layer layer)
Inserts the specified layer at the begining of this list.
|
boolean |
addFirst(Layer layer, java.lang.Integer position)
Inserts the specified layer at the begining of the specified position in this list.
|
boolean |
addLast(Layer layer)
Inserts the specified layer at the end of this list.
|
boolean |
addLast(Layer layer, java.lang.Integer position)
Inserts the specified layer at the end of the specified position in this list.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener) |
void |
addSelectionListener(SelectionListener l) |
void |
clear() |
void |
clearAllHover() |
void |
clearAllSelections() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
java.util.Iterator<LayerManager.Entry> |
descendingEntryIterator() |
java.util.Iterator<Layer> |
descendingLayerIterator() |
void |
editStateChanged(javax.swing.event.ChangeEvent e)
Invoked when the layer has changed as a result of editing it's objects
|
java.util.Iterator<LayerManager.Entry> |
entryIterator() |
java.util.ListIterator<LayerManager.Entry> |
entryIterator(java.lang.Integer position) |
java.util.ListIterator<LayerManager.Entry> |
entryIterator(Layer layer) |
boolean |
equals(java.lang.Object o) |
LayerManager |
filterSet(Filter<Layer> filter) |
LayerManager |
filterSet(Filter<Layer> filter, int stopAt) |
LayerManager |
filterSetByTags(java.lang.String[] tags) |
Layer |
get(int i)
Gets the layer at the given position
|
java.util.List<GeoObject> |
getAllSelections() |
Layer |
getFirst()
Returns the first layer from this list, or
null if this list is empty. |
Layer |
getFirst(java.lang.Integer position)
Returns the first layer from the specified position in the list, or
null if there are no layers at that position. |
Layer |
getLast()
Returns the last layer from this list, or
null if this list is empty. |
Layer |
getLast(java.lang.Integer position)
Returns the last layer from the specified position in the list, or
null if there are no layers at that position. |
Layer |
getLayerByName(java.lang.String name) |
Layer |
getLayerByPosition(java.lang.Integer position) |
Layer |
getLayerByTag(java.lang.String tag) |
MapCanvas |
getMapCanvas() |
java.lang.Integer |
getPosition(Layer layer)
Gets the layer position
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners() |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName) |
java.util.Collection<java.lang.String> |
getTags(Layer layer)
Returns the layer tags
|
LayerManager |
headSet(java.lang.Integer toPosition) |
LayerManager |
headSet(java.lang.Integer toPosition, boolean inclusive) |
boolean |
isEmpty() |
java.util.Iterator<Layer> |
iterator() |
java.util.Iterator<Layer> |
layerIterator() |
java.util.ListIterator<Layer> |
layerIterator(java.lang.Integer position) |
java.util.ListIterator<Layer> |
layerIterator(Layer layer) |
java.lang.Integer |
moveDown(Layer layer, boolean crossPositions) |
java.lang.Integer |
moveUp(Layer layer, boolean crossPositions) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
void |
removeChangeListener(javax.swing.event.ChangeListener l) |
void |
removeEditChangeListener(EditChangeListener l) |
Layer |
removeFirst()
Removes and returns the first layer from this list, or
null if this list is empty. |
Layer |
removeFirst(java.lang.Integer position)
Removes and returns the first layer from the specified position in the list, or
null if there are no layers at that position. |
Layer |
removeLast()
Removes and returns the last layer from this list, or
null if this list is empty. |
Layer |
removeLast(java.lang.Integer position)
Removes and returns the last layer from the specified position in the list, or
null if there are no layers at that position. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener) |
void |
removeSelectionListener(SelectionListener l) |
boolean |
retainAll(java.util.Collection<?> c) |
void |
selectionChanged(SelectionEvent evt)
This method is called when a selection event is fired.
|
void |
setMapCanvas(MapCanvas canvas) |
java.lang.Integer |
setPositionFirst(Layer layer, java.lang.Integer position) |
java.lang.Integer |
setPositionLast(Layer layer, java.lang.Integer position) |
int |
size() |
LayerManager |
subSet(java.lang.Integer fromPosition, boolean fromInclusive, java.lang.Integer toPosition, boolean toInclusive) |
LayerManager |
subSet(java.lang.Integer fromPosition, java.lang.Integer toPosition) |
boolean |
tag(Layer layer, java.lang.String tag)
Adds a a tag to the given layer
|
boolean |
tag(Layer layer, java.lang.String[] tags)
Adds tags to the given layer
|
LayerManager |
tailSet(java.lang.Integer fromPosition) |
LayerManager |
tailSet(java.lang.Integer fromPosition, boolean inclusive) |
Layer[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString()
For debugging purposes
|
org.w3c.dom.Element |
toXMLElement() |
boolean |
untag(Layer layer, java.lang.String tag)
Removes the tag from the given layer
|
boolean |
untag(Layer layer, java.lang.String[] tags)
Removes tags from the given layer
|
boolean |
untag(java.lang.String tag)
Removes the given tag from all the layers
|
getClass, hashCode, notify, notifyAll, wait, wait, wait
public LayerManager(MapCanvas canvas)
public boolean add(Layer layer)
This method is equivalent to addLast(Layer)
add
in interface java.util.Collection<Layer>
layer
- layer to be insertedCollection.add(E)
)public boolean add(Layer layer, java.lang.Integer position)
This method is equivalent to addLast(Layer, Integer)
layer
- layer to be insertedposition
- position at the end of which the specified layer is to be insertedpublic boolean addFirst(Layer layer)
layer
- layer to be insertedCollection.add(E)
)public boolean addFirst(Layer layer, java.lang.Integer position)
layer
- layer to be insertedposition
- position at the begining of which the specified layer is to be insertedCollection.add(E)
)public boolean addLast(Layer layer)
layer
- layer to be insertedCollection.add(E)
)public boolean addLast(Layer layer, java.lang.Integer position)
layer
- layer to be insertedposition
- position at the end of which the specified layer is to be insertedCollection.add(E)
)public Layer removeFirst()
null
if this list is empty.null
if emptypublic Layer removeFirst(java.lang.Integer position)
null
if there are no layers at that position.null
public Layer removeLast()
null
if this list is empty.null
if emptypublic Layer removeLast(java.lang.Integer position)
null
if there are no layers at that position.null
public Layer get(int i)
i
-public Layer getFirst()
null
if this list is empty.null
if emptypublic Layer getFirst(java.lang.Integer position)
null
if there are no layers at that position.null
public Layer getLast()
null
if this list is empty.null
if emptypublic Layer getLast(java.lang.Integer position)
null
if there are no layers at that position.null
public boolean addAll(java.util.Collection<? extends Layer> c)
addAll
in interface java.util.Collection<Layer>
public boolean tag(Layer layer, java.lang.String tag)
layer
-tag
-public boolean tag(Layer layer, java.lang.String[] tags)
layer
-tags
-public boolean untag(java.lang.String tag)
tag
-public boolean untag(Layer layer, java.lang.String tag)
layer
-tag
-public boolean untag(Layer layer, java.lang.String[] tags)
layer
-tags
-public java.lang.Integer getPosition(Layer layer)
layer
-public java.util.Collection<java.lang.String> getTags(Layer layer)
layer
-public java.lang.Integer setPositionFirst(Layer layer, java.lang.Integer position)
public java.lang.Integer setPositionLast(Layer layer, java.lang.Integer position)
public java.lang.Integer moveUp(Layer layer, boolean crossPositions)
public java.lang.Integer moveDown(Layer layer, boolean crossPositions)
public LayerManager filterSet(Filter<Layer> filter, int stopAt)
public LayerManager filterSet(Filter<Layer> filter)
public LayerManager filterSetByTags(java.lang.String[] tags)
public Layer getLayerByTag(java.lang.String tag)
public Layer getLayerByName(java.lang.String name)
public Layer getLayerByPosition(java.lang.Integer position)
public java.util.ListIterator<LayerManager.Entry> entryIterator(java.lang.Integer position)
public java.util.ListIterator<Layer> layerIterator(java.lang.Integer position)
public java.util.ListIterator<LayerManager.Entry> entryIterator(Layer layer)
public java.util.Iterator<LayerManager.Entry> entryIterator()
public java.util.Iterator<Layer> layerIterator()
public java.util.Iterator<LayerManager.Entry> descendingEntryIterator()
public java.util.Iterator<Layer> descendingLayerIterator()
public java.util.Iterator<Layer> iterator()
public LayerManager subSet(java.lang.Integer fromPosition, boolean fromInclusive, java.lang.Integer toPosition, boolean toInclusive)
public LayerManager subSet(java.lang.Integer fromPosition, java.lang.Integer toPosition)
public LayerManager headSet(java.lang.Integer toPosition)
public LayerManager headSet(java.lang.Integer toPosition, boolean inclusive)
public LayerManager tailSet(java.lang.Integer fromPosition)
public LayerManager tailSet(java.lang.Integer fromPosition, boolean inclusive)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<Layer>
equals
in class java.lang.Object
public void clear()
clear
in interface java.util.Collection<Layer>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<Layer>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<Layer>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<Layer>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<Layer>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<Layer>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<Layer>
public int size()
size
in interface java.util.Collection<Layer>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<Layer>
public void clearAllHover()
public void clearAllSelections()
public java.util.List<GeoObject> getAllSelections()
public org.w3c.dom.Element toXMLElement()
public java.lang.String toString()
toString
in class java.lang.Object
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void selectionChanged(SelectionEvent evt)
SelectionListener
selectionChanged
in interface SelectionListener
public void addSelectionListener(SelectionListener l)
public void removeSelectionListener(SelectionListener l)
public void editStateChanged(javax.swing.event.ChangeEvent e)
EditChangeListener
editStateChanged
in interface EditChangeListener
e
- a ChangeEvent objectpublic void addEditChangeListener(EditChangeListener l)
public void removeEditChangeListener(EditChangeListener l)
public void addChangeListener(javax.swing.event.ChangeListener l)
public void removeChangeListener(javax.swing.event.ChangeListener l)
public MapCanvas getMapCanvas()
public void setMapCanvas(MapCanvas canvas)