Class AbstractMapClickListener

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.db.AbstractDatabaseConnection m_DatabaseConnection
      the database connection in use.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected adams.db.AbstractDatabaseConnection getDatabaseConnection​(adams.flow.core.Actor actor)
      Determines the database connection in the flow.
      void mapClicked​(MapClickEvent e)
      Gets called when user clicks on a JMapViewer.
      protected abstract boolean processClick​(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, MouseEvent e)
      Performs the processing of the mouse click.
      abstract boolean requiresDatabaseConnection()
      Returns whether a database connection is required.
      AbstractMapClickListener shallowCopy()
      Returns a shallow copy of itself.
      AbstractMapClickListener shallowCopy​(boolean expand)
      Returns a shallow copy of itself.
      void updateDatabaseConnection​(adams.flow.core.Actor actor)
      Updates, if necessary, its database connection using the specified actor as starting point.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_DatabaseConnection

        protected transient adams.db.AbstractDatabaseConnection m_DatabaseConnection
        the database connection in use.
    • Constructor Detail

      • AbstractMapClickListener

        public AbstractMapClickListener()
    • Method Detail

      • requiresDatabaseConnection

        public abstract boolean requiresDatabaseConnection()
        Returns whether a database connection is required.
        Returns:
        true if connection required
      • getDatabaseConnection

        protected adams.db.AbstractDatabaseConnection getDatabaseConnection​(adams.flow.core.Actor actor)
        Determines the database connection in the flow.

        Derived classes can override this method if different database connection objects need to be located.
        Parameters:
        actor - the actor to use for looking up database connection
        Returns:
        the database connection to use
      • updateDatabaseConnection

        public void updateDatabaseConnection​(adams.flow.core.Actor actor)
        Updates, if necessary, its database connection using the specified actor as starting point.
        Parameters:
        actor - the actor to use for lookin up database connection
        See Also:
        getDatabaseConnection(Actor)
      • processClick

        protected abstract boolean processClick​(org.openstreetmap.gui.jmapviewer.JMapViewer viewer,
                                                MouseEvent e)
        Performs the processing of the mouse click.
        Parameters:
        viewer - the associated viewer
        e - the associated mouse event
        Returns:
        true if mouse event should get consumed
      • shallowCopy

        public AbstractMapClickListener shallowCopy​(boolean expand)
        Returns a shallow copy of itself.
        Specified by:
        shallowCopy in interface adams.core.ShallowCopySupporter<AbstractMapClickListener>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy