Class AbstractMapObjectHitListenerWithDialog<T extends Dialog>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.sink.openstreetmapviewer.AbstractMapObjectHitListener
-
- adams.flow.sink.openstreetmapviewer.AbstractMapObjectHitListenerWithDialog<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.SizeOfHandler
,MapObjectHitListener
,Serializable
- Direct Known Subclasses:
SimpleMapObjectHitListener
,TableMapObjectHitListener
public abstract class AbstractMapObjectHitListenerWithDialog<T extends Dialog> extends AbstractMapObjectHitListener
Ancestor for dialog-based hit listeners.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractMapObjectHitListenerWithDialog()
-
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
doProcessHits(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, List<org.openstreetmap.gui.jmapviewer.interfaces.MapObject> hits)
Performs the actual processing of the hits, 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 void
processHits(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, List<org.openstreetmap.gui.jmapviewer.interfaces.MapObject> hits)
Performs the processing of the hits.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.AbstractMapObjectHitListener
getMetaDataKeys, mapObjectsHit
-
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.
-
doProcessHits
protected abstract T doProcessHits(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, List<org.openstreetmap.gui.jmapviewer.interfaces.MapObject> hits)
Performs the actual processing of the hits, returns the generated dialog.- Parameters:
viewer
- the associated viewerhits
- the objects that were "hit"- Returns:
- the generated dialog
-
processHits
protected void processHits(org.openstreetmap.gui.jmapviewer.JMapViewer viewer, List<org.openstreetmap.gui.jmapviewer.interfaces.MapObject> hits)
Performs the processing of the hits.- Specified by:
processHits
in classAbstractMapObjectHitListener
- Parameters:
viewer
- the associated viewerhits
- the objects that were "hit"
-
-