Package org.ka2ddo.yaac.gui
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 Summary
ModifierConstructorDescriptionprotected
LayerCreator
(int layerZOrder) Create a LayerCreator object with the specified Z order value. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
Compares this object with the specified object for order.void
doPostProcForLayer
(com.bbn.openmap.MapBean mapBean, com.bbn.openmap.Layer newlyCreatedLayer) Does any post-processing needed after the Layer obtained from thegetLayer(com.bbn.openmap.MapBean, GeographicalMap, com.bbn.openmap.MouseDelegator, java.util.prefs.Preferences)
method is added to the MapHandler.boolean
Indicates whether some other object is "equal to" this one.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.
-
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 LayergeoMap
- GeographicalMap object containing the MapBeanmouseDelegator
- MouseDelegator for the MapBeanprefs
- 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 thegetLayer(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 LayernewlyCreatedLayer
- the newly added Layer
-
compareTo
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 interfaceComparable<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
Indicates whether some other object is "equal to" this one.
-