Package viewer.base

Class ListLayer

java.lang.Object
viewer.base.Layer
viewer.base.ListLayer

public class ListLayer
extends Layer
This class represents a layer that can be displayed in a Map.
Author:
Jan-Henrik Haunert
  • Field Summary

    Fields inherited from class viewer.base.Layer

    extent, mySymbolFactory
  • Constructor Summary

    Constructors 
    Constructor Description
    ListLayer()
    Constructs a new empty Layer
    ListLayer​(java.util.List<Feature> features)
    Constructs a new Layer with specified features
    ListLayer​(SymbolFactory factory)
    Constructs a new empty Layer
  • Method Summary

    Modifier and Type Method Description
    void add​(Feature f)
    Adds a GeometryFeature to this Layer.
    void clearLayer()
    Removes all symbols from the layer and resets the extend.
    java.util.List<Symbol> getSymbols()  
    boolean isEmpty()
    Is the ListLayeer empty?
    java.util.List<Symbol> query​(Envelope searchEnv)
    Returns the symbols of this layer that intersect a specified envelope.
    boolean remove​(Symbol s)
    Removes the specified Symbol from this Layer.
    void setSymbolFactory​(SymbolFactory factory)
    sets symbol factory
    TreeLayer toTreeLayer()
    Converts the current ListLayer to a TreeLayer

    Methods inherited from class viewer.base.Layer

    getExtent, setExtent, toCachedLayer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ListLayer

      public ListLayer()
      Constructs a new empty Layer
    • ListLayer

      public ListLayer​(SymbolFactory factory)
      Constructs a new empty Layer
      Parameters:
      factory - symbol factory
    • ListLayer

      public ListLayer​(java.util.List<Feature> features)
      Constructs a new Layer with specified features
      Parameters:
      features - specified features
  • Method Details

    • add

      public void add​(Feature f)
      Adds a GeometryFeature to this Layer.
      Parameters:
      f - the feature to be added
    • remove

      public boolean remove​(Symbol s)
      Removes the specified Symbol from this Layer.
      Parameters:
      s - the symbol to be added
      Returns:
      if the symbol got removed successfully
    • clearLayer

      public void clearLayer()
      Removes all symbols from the layer and resets the extend.
    • getSymbols

      public java.util.List<Symbol> getSymbols()
    • query

      public java.util.List<Symbol> query​(Envelope searchEnv)
      Returns the symbols of this layer that intersect a specified envelope.
      Specified by:
      query in class Layer
      Parameters:
      searchEnv - the query envelope
      Returns:
      the symbols of this layer that intersect the envelope
    • toTreeLayer

      public TreeLayer toTreeLayer()
      Converts the current ListLayer to a TreeLayer
      Returns:
      converted TreeLayer
    • isEmpty

      public boolean isEmpty()
      Is the ListLayeer empty?
      Returns:
      boolean value for the empty test
    • setSymbolFactory

      public void setSymbolFactory​(SymbolFactory factory)
      sets symbol factory
      Parameters:
      factory - symbol factory to be set