Class LayerManager

    • Field Detail

      • positionStartMap

        protected java.util.TreeMap<java.lang.Integer,​oracle.spatial.network.nfe.vis.maps.core.LayerManager.LinkedEntry<java.lang.Integer,​Layer>> positionStartMap
      • entries

        protected java.util.HashMap<Layer,​oracle.spatial.network.nfe.vis.maps.core.LayerManager.LinkedEntry<java.lang.Integer,​Layer>> entries
      • header

        protected oracle.spatial.network.nfe.vis.maps.core.LayerManager.LinkedEntry<java.lang.Integer,​Layer> header
      • listenerList

        protected javax.swing.event.EventListenerList listenerList
      • propChangeSupport

        protected java.beans.PropertyChangeSupport propChangeSupport
    • Constructor Detail

      • LayerManager

        public LayerManager​(MapCanvas canvas)
      • LayerManager

        public 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
        Parameters:
        lm -
    • Method Detail

      • add

        public boolean add​(Layer layer)
        Inserts the specified layer at the end of this list. If the list is not empty the layer will be assigned the same position of the layer previously at the end, or the default position of 1 if the list was empty.

        This method is equivalent to addLast(Layer)

        Specified by:
        add in interface java.util.Collection<Layer>
        Parameters:
        layer - layer to be inserted
        Returns:
        true (as specified by Collection.add(E))
      • add

        public boolean add​(Layer layer,
                           java.lang.Integer position)
        Inserts the specified layer at the end of the specified position in this list. If there are other layers with the same position, this will be placed after them.

        This method is equivalent to addLast(Layer, Integer)

        Parameters:
        layer - layer to be inserted
        position - position at the end of which the specified layer is to be inserted
        Returns:
      • addFirst

        public boolean addFirst​(Layer layer)
        Inserts the specified layer at the begining of this list. If the list is not empty the layer will be assigned the same position of the layer previously at the begining, or the default position of 1 if the list was empty.
        Parameters:
        layer - layer to be inserted
        Returns:
        true (as specified by Collection.add(E))
      • addFirst

        public boolean addFirst​(Layer layer,
                                java.lang.Integer position)
        Inserts the specified layer at the begining of the specified position in this list. If there are other layers with the same position, this will be placed before them.
        Parameters:
        layer - layer to be inserted
        position - position at the begining of which the specified layer is to be inserted
        Returns:
        true (as specified by Collection.add(E))
      • addLast

        public boolean addLast​(Layer layer)
        Inserts the specified layer at the end of this list. If the list is not empty the layer will be assigned the same position of the layer previously at the end, or the default position of 1 if the list was empty.
        Parameters:
        layer - layer to be inserted
        Returns:
        true (as specified by Collection.add(E))
      • addLast

        public boolean addLast​(Layer layer,
                               java.lang.Integer position)
        Inserts the specified layer at the end of the specified position in this list. If there are other layers with the same position, this will be placed after them.
        Parameters:
        layer - layer to be inserted
        position - position at the end of which the specified layer is to be inserted
        Returns:
        true (as specified by Collection.add(E))
      • removeFirst

        public Layer removeFirst()
        Removes and returns the first layer from this list, or null if this list is empty.
        Returns:
        the first layer from this list or null if empty
      • removeFirst

        public 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.
        Returns:
        the first layer at the position or null
      • removeLast

        public Layer removeLast()
        Removes and returns the last layer from this list, or null if this list is empty.
        Returns:
        the last layer from this list or null if empty
      • removeLast

        public 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.
        Returns:
        the last layer at the position or null
      • get

        public Layer get​(int i)
        Gets the layer at the given position
        Parameters:
        i -
        Returns:
      • getFirst

        public Layer getFirst()
        Returns the first layer from this list, or null if this list is empty.
        Returns:
        the first layer from this list or null if empty
      • getFirst

        public 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.
        Returns:
        the first layer at the position or null
      • getLast

        public Layer getLast()
        Returns the last layer from this list, or null if this list is empty.
        Returns:
        the last layer from this list or null if empty
      • getLast

        public 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.
        Returns:
        the last layer at the position or null
      • addAll

        public boolean addAll​(java.util.Collection<? extends Layer> c)
        Specified by:
        addAll in interface java.util.Collection<Layer>
      • tag

        public boolean tag​(Layer layer,
                           java.lang.String tag)
        Adds a a tag to the given layer
        Parameters:
        layer -
        tag -
        Returns:
      • tag

        public boolean tag​(Layer layer,
                           java.lang.String[] tags)
        Adds tags to the given layer
        Parameters:
        layer -
        tags -
        Returns:
      • untag

        public boolean untag​(java.lang.String tag)
        Removes the given tag from all the layers
        Parameters:
        tag -
        Returns:
      • untag

        public boolean untag​(Layer layer,
                             java.lang.String tag)
        Removes the tag from the given layer
        Parameters:
        layer -
        tag -
        Returns:
      • untag

        public boolean untag​(Layer layer,
                             java.lang.String[] tags)
        Removes tags from the given layer
        Parameters:
        layer -
        tags -
        Returns:
      • getPosition

        public java.lang.Integer getPosition​(Layer layer)
        Gets the layer position
        Parameters:
        layer -
        Returns:
      • getTags

        public java.util.Collection<java.lang.String> getTags​(Layer layer)
        Returns the layer tags
        Parameters:
        layer -
        Returns:
      • setPositionFirst

        public java.lang.Integer setPositionFirst​(Layer layer,
                                                  java.lang.Integer position)
      • setPositionLast

        public java.lang.Integer setPositionLast​(Layer layer,
                                                 java.lang.Integer position)
      • moveUp

        public java.lang.Integer moveUp​(Layer layer,
                                        boolean crossPositions)
      • moveDown

        public java.lang.Integer moveDown​(Layer layer,
                                          boolean crossPositions)
      • filterSetByTags

        public LayerManager filterSetByTags​(java.lang.String[] tags)
      • getLayerByTag

        public Layer getLayerByTag​(java.lang.String tag)
      • getLayerByName

        public Layer getLayerByName​(java.lang.String name)
      • getLayerByPosition

        public Layer getLayerByPosition​(java.lang.Integer position)
      • entryIterator

        public java.util.ListIterator<LayerManager.Entry> entryIterator​(java.lang.Integer position)
      • layerIterator

        public java.util.ListIterator<Layer> layerIterator​(java.lang.Integer position)
      • layerIterator

        public java.util.ListIterator<Layer> layerIterator​(Layer layer)
      • layerIterator

        public java.util.Iterator<Layer> layerIterator()
      • descendingEntryIterator

        public java.util.Iterator<LayerManager.Entry> descendingEntryIterator()
      • descendingLayerIterator

        public java.util.Iterator<Layer> descendingLayerIterator()
      • iterator

        public java.util.Iterator<Layer> iterator()
        Specified by:
        iterator in interface java.util.Collection<Layer>
        Specified by:
        iterator in interface java.lang.Iterable<Layer>
      • subSet

        public LayerManager subSet​(java.lang.Integer fromPosition,
                                   boolean fromInclusive,
                                   java.lang.Integer toPosition,
                                   boolean toInclusive)
      • subSet

        public LayerManager subSet​(java.lang.Integer fromPosition,
                                   java.lang.Integer toPosition)
      • headSet

        public LayerManager headSet​(java.lang.Integer toPosition)
      • headSet

        public LayerManager headSet​(java.lang.Integer toPosition,
                                    boolean inclusive)
      • tailSet

        public LayerManager tailSet​(java.lang.Integer fromPosition)
      • tailSet

        public LayerManager tailSet​(java.lang.Integer fromPosition,
                                    boolean inclusive)
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<Layer>
        Overrides:
        equals in class java.lang.Object
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<Layer>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<Layer>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<Layer>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<Layer>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<Layer>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<Layer>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<Layer>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<Layer>
      • toArray

        public Layer[] toArray()
        Specified by:
        toArray in interface java.util.Collection<Layer>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<Layer>
      • clearAllHover

        public void clearAllHover()
      • clearAllSelections

        public void clearAllSelections()
      • getAllSelections

        public java.util.List<GeoObject> getAllSelections()
      • toXMLElement

        public org.w3c.dom.Element toXMLElement()
      • toString

        public java.lang.String toString()
        For debugging purposes
        Overrides:
        toString in class java.lang.Object
        Returns:
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent evt)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener listener)
      • getPropertyChangeListeners

        public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
      • getPropertyChangeListeners

        public java.beans.PropertyChangeListener[] getPropertyChangeListeners​(java.lang.String propertyName)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener listener)
      • removeSelectionListener

        public void removeSelectionListener​(SelectionListener l)
      • fireSelectionChanged

        protected void fireSelectionChanged​(SelectionEvent evt)
      • editStateChanged

        public void editStateChanged​(javax.swing.event.ChangeEvent e)
        Description copied from interface: EditChangeListener
        Invoked when the layer has changed as a result of editing it's objects
        Specified by:
        editStateChanged in interface EditChangeListener
        Parameters:
        e - a ChangeEvent object
      • removeEditChangeListener

        public void removeEditChangeListener​(EditChangeListener l)
      • fireEditStateChanged

        protected void fireEditStateChanged​(javax.swing.event.ChangeEvent evt)
      • addChangeListener

        public void addChangeListener​(javax.swing.event.ChangeListener l)
      • removeChangeListener

        public void removeChangeListener​(javax.swing.event.ChangeListener l)
      • fireStateChanged

        protected void fireStateChanged​(javax.swing.event.ChangeEvent event)
      • getMapCanvas

        public MapCanvas getMapCanvas()
      • setMapCanvas

        public void setMapCanvas​(MapCanvas canvas)