Interface GISElementContainer<T extends MapElement>

    • Method Detail

      • getMapElementCount

        int getMapElementCount()
        Replies the count of map elements.
        Returns:
        the count of map elements.
      • getMapElementAt

        T getMapElementAt​(int index)
        Replies the map element at the specified index.
        Parameters:
        index - the index.
        Returns:
        the element at the given index
        Throws:
        IndexOutOfBoundsException - in case of error.
      • getAllMapElements

        Collection<T> getAllMapElements()
        Replies the map elements as an array.
        Returns:
        all the elements.
      • addMapElements

        boolean addMapElements​(Collection<? extends T> elements)
        Add map elements inside this container.
        Parameters:
        elements - the new elements.
        Returns:
        true if at least one element was added, otherwise false
      • addMapElement

        boolean addMapElement​(T element)
        Add a map element inside this container.
        Parameters:
        element - the new element.
        Returns:
        true if the element was added successfully, otherwise false
      • removeMapElement

        boolean removeMapElement​(MapElement element)
        Remove a map element from this container.
        Parameters:
        element - the element to remove.
        Returns:
        true if the element was removed successfully, otherwise false
      • removeAllMapElements

        boolean removeAllMapElements()
        Remove all the map elements from this container.
        Returns:
        true if container has changed, otherwise false
        Since:
        4.0
      • onMapElementGraphicalAttributeChanged

        void onMapElementGraphicalAttributeChanged()
        Invoked when one of the graphical attributes of this element has changed, including those that change the bounding box.
      • getElementGeometrySourceURL

        URL getElementGeometrySourceURL()
        Replies the URL from which the geometry of the elements in this container were read.

        Basically, the replied URL may be the URL of a ESRI Shape file.

        Returns:
        the URL of the source of the geometry of the elements, or null if no known source.
      • getElementAttributeSourceURL

        URL getElementAttributeSourceURL()
        Replies the URL from which the attributes of the elements in this container were read.

        Basically, the replied URL may be the URL of a dBase file.

        Returns:
        the URL of the source of the attributes of the elements, or null if no known source.
      • setElementAttributeSourceURL

        void setElementAttributeSourceURL​(URL url)
        Set the URL from which the attributes of the elements in this container were read.

        Basically, the URL may be the URL of a dBase file.

        Parameters:
        url - is the URL of the source of the attributes of the elements, or null if no known source.
      • setElementGeometrySource

        void setElementGeometrySource​(URL url,
                                      MapMetricProjection mapProjection)
        Set the URL from which the geometry of the elements in this container were read.

        Basically, the URL may be the URL of a ESRI Shape file.

        Parameters:
        url - is the URL of the source of the geometry of the elements, or null if no known source.
        mapProjection - is the map projection used to describe the data inside the file with the given URL.
        Since:
        4.1
      • iterator

        @Pure
        Iterator<T> iterator​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Iterates on the elements that intersect the specified bounds.
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        Returns:
        an iterator on the map elements.
        Since:
        14.0