Class AbstractMapClickListenerWithDialog<T extends Dialog>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.sink.openstreetmapviewer.AbstractMapClickListener
-
- adams.flow.sink.openstreetmapviewer.AbstractMapClickListenerWithDialog<T>
-
- 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.flow.sink.openstreetmapviewer.AbstractMapClickListener
m_DatabaseConnection
-
-
Constructor Summary
Constructors Constructor Description AbstractMapClickListenerWithDialog()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected abstract T
doProcessClick(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, MouseEvent e)
Performs the actual processing of the click, returns the generated dialog.protected int
getDefaultHeight()
Returns the default height for the dialog.protected String
getDefaultTitle()
Returns the default title for the dialog.protected int
getDefaultWidth()
Returns the default width for the dialog.protected int
getDefaultX()
Returns the default X position for the dialog.protected int
getDefaultY()
Returns the default Y position for the dialog.int
getHeight()
Returns the currently set height of the dialog.String
getTitle()
Returns the currently set title of the dialog.int
getWidth()
Returns the currently set width of the dialog.int
getX()
Returns the currently set X position of the dialog.int
getY()
Returns the currently set Y position of the dialog.String
heightTipText()
Returns the tip text for this property.protected boolean
processClick(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, MouseEvent e)
Performs the processing of the click.void
setHeight(int value)
Sets the height of the dialog.void
setTitle(String value)
Sets the title of the dialog.void
setWidth(int value)
Sets the width of the dialog.void
setX(int value)
Sets the X position of the dialog.void
setY(int value)
Sets the Y position of the dialog.String
titleTipText()
Returns the tip text for this property.String
widthTipText()
Returns the tip text for this property.String
xTipText()
Returns the tip text for this property.String
yTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.sink.openstreetmapviewer.AbstractMapClickListener
getDatabaseConnection, mapClicked, requiresDatabaseConnection, shallowCopy, shallowCopy, updateDatabaseConnection
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, 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
-
-
-
-
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.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.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 viewere
- 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 classAbstractMapClickListener
- Parameters:
viewer
- the associated viewere
- the associated event- Returns:
- true if mouse event should get consumed
-
-