Class GeographicalMap.LayerCreator

java.lang.Object
org.ka2ddo.yaac.gui.GeographicalMap.LayerCreator
All Implemented Interfaces:
Comparable<GeographicalMap.LayerCreator>
Enclosing class:
GeographicalMap

public abstract static class GeographicalMap.LayerCreator extends Object implements Comparable<GeographicalMap.LayerCreator>
This abstract class provides the infrastructure for adding a layer to the map, so that YAAC plugins can insert other layers at appropriate Z-levels into this map.
Author:
Andrew Pavlin, KA2DDO
  • Constructor Details

    • LayerCreator

      protected LayerCreator(int layerZOrder)
      Create a LayerCreator object with the specified Z order value.
      Parameters:
      layerZOrder - int Z order value, arbitrary value with higher numbers added later to the map
  • Method Details

    • getLayer

      public abstract com.bbn.openmap.Layer getLayer(com.bbn.openmap.MapBean mapBean, GeographicalMap geoMap, com.bbn.openmap.MouseDelegator mouseDelegator, Preferences prefs)
      Create a layer object using the specified context values.
      Parameters:
      mapBean - MapBean which will contain the generated Layer
      geoMap - GeographicalMap object containing the MapBean
      mouseDelegator - MouseDelegator for the MapBean
      prefs - Preferences object for this profile of YAAC
      Returns:
      a Layer to append to the MapHandler in its z order
    • doPostProcForLayer

      public void doPostProcForLayer(com.bbn.openmap.MapBean mapBean, com.bbn.openmap.Layer newlyCreatedLayer)
      Does any post-processing needed after the Layer obtained from the getLayer(com.bbn.openmap.MapBean, GeographicalMap, com.bbn.openmap.MouseDelegator, java.util.prefs.Preferences) method is added to the MapHandler. By default, this does nothing.
      Parameters:
      mapBean - MapBean newly containing the Layer
      newlyCreatedLayer - the newly added Layer
    • compareTo

      public final int compareTo(GeographicalMap.LayerCreator o)
      Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Specified by:
      compareTo in interface Comparable<GeographicalMap.LayerCreator>
      Parameters:
      o - the object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Throws:
      ClassCastException - if the specified object's type prevents it from being compared to this object.
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.