Class AbstractMapPolygonGenerator

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, Serializable
    Direct Known Subclasses:
    SimplePolygonGenerator

    public abstract class AbstractMapPolygonGenerator
    extends AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
    Ancestor for generators that generate MapPolygon objects.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Coordinates

        protected adams.data.spreadsheet.SpreadSheetColumnRange m_Coordinates
        the columns for the polygon coordinates.
      • m_CoordinatesIndices

        protected int[] m_CoordinatesIndices
        the actual indices of the columns.
    • Constructor Detail

      • AbstractMapPolygonGenerator

        public AbstractMapPolygonGenerator()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
      • setCoordinates

        public void setCoordinates​(adams.data.spreadsheet.SpreadSheetColumnRange value)
        Sets the range of columns containing the GPS objects for the polygons.
        Parameters:
        value - the column range
      • getCoordinates

        public adams.data.spreadsheet.SpreadSheetColumnRange getCoordinates()
        Returns the range of columns containing the GPS objects for the polygons.
        Returns:
        the column range
      • coordinatesTipText

        public String coordinatesTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generates

        public Class generates()
        Returns the type of data the generator creates.
        Specified by:
        generates in class AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
        Returns:
        the data type(s)
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
        Returns:
        null if no info available, otherwise short string
      • check

        protected void check​(adams.data.spreadsheet.SpreadSheet sheet)
        Checks the spreadsheet and throws an exception if it fails.
        Overrides:
        check in class AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
        Parameters:
        sheet - the spreadsheet to check
      • init

        protected void init​(adams.data.spreadsheet.SpreadSheet sheet)
        Initializes the internal state with the given spreadsheet.
        Overrides:
        init in class AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapPolygon>
        Parameters:
        sheet - the spreadsheet to initialize with