Class AbstractMapClickListenerWithDialog<T extends Dialog>

  • Type Parameters:
    T - the type of dialog in use
    All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<AbstractMapClickListener>, adams.core.SizeOfHandler, adams.db.DatabaseConnectionUser, MapClickListener, Serializable
    Direct Known Subclasses:
    ShowPositionMapClickListener

    public abstract class AbstractMapClickListenerWithDialog<T extends Dialog>
    extends AbstractMapClickListener
    Ancestor for dialog-based click listeners.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_Height
      the height of the dialog.
      protected String m_Title
      the title.
      protected int m_Width
      the width of the dialog.
      protected int m_X
      the X position of the dialog.
      protected int m_Y
      the Y position of the dialog.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

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

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Field Detail

      • m_Title

        protected String m_Title
        the title.
      • m_Width

        protected int m_Width
        the width of the dialog.
      • m_Height

        protected int m_Height
        the height of the dialog.
      • m_X

        protected int m_X
        the X position of the dialog.
      • m_Y

        protected int m_Y
        the Y position of the dialog.
    • Constructor Detail

      • AbstractMapClickListenerWithDialog

        public AbstractMapClickListenerWithDialog()
    • 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 adams.core.option.AbstractOptionHandler
      • getDefaultTitle

        protected String getDefaultTitle()
        Returns the default title for the dialog.
        Returns:
        the default title
      • setTitle

        public void setTitle​(String value)
        Sets the title of the dialog.
        Parameters:
        value - the title
      • getTitle

        public String getTitle()
        Returns the currently set title of the dialog.
        Returns:
        the title
      • titleTipText

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

        protected int getDefaultWidth()
        Returns the default width for the dialog.
        Returns:
        the default width
      • setWidth

        public void setWidth​(int value)
        Sets the width of the dialog.
        Parameters:
        value - the width
      • getWidth

        public int getWidth()
        Returns the currently set width of the dialog.
        Returns:
        the width
      • widthTipText

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

        protected int getDefaultHeight()
        Returns the default height for the dialog.
        Returns:
        the default height
      • setHeight

        public void setHeight​(int value)
        Sets the height of the dialog.
        Parameters:
        value - the height
      • getHeight

        public int getHeight()
        Returns the currently set height of the dialog.
        Returns:
        the height
      • heightTipText

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

        protected int getDefaultX()
        Returns the default X position for the dialog.
        Returns:
        the default X position
      • setX

        public void setX​(int value)
        Sets the X position of the dialog.
        Parameters:
        value - the X position
      • getX

        public int getX()
        Returns the currently set X position of the dialog.
        Returns:
        the X position
      • xTipText

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

        protected int getDefaultY()
        Returns the default Y position for the dialog.
        Returns:
        the default Y position
      • setY

        public void setY​(int value)
        Sets the Y position of the dialog.
        Parameters:
        value - the Y position
      • getY

        public int getY()
        Returns the currently set Y position of the dialog.
        Returns:
        the Y position
      • yTipText

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

        protected abstract T doProcessClick​(org.openstreetmap.gui.jmapviewer.JMapViewer viewer,
                                            MouseEvent e)
        Performs the actual processing of the click, returns the generated dialog.
        Parameters:
        viewer - the associated viewer
        e - the associated event
        Returns:
        the generated dialog, null if none created
      • processClick

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