Class AbstractMapOverlay
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.sink.openstreetmapviewer.AbstractMapOverlay
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractPositionableMapOverlay
,MultiMapOverlay
,NullMapOverlay
public abstract class AbstractMapOverlay extends adams.core.option.AbstractOptionHandler
Ancestor for classes that paint an overlay on aJMapViewer
.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Enabled
whether the overlay is enabled.
-
Constructor Summary
Constructors Constructor Description AbstractMapOverlay()
-
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 void
doPaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Performs the actual painting.String
enabledTipText()
Returns the tip text for this property.boolean
isEnabled()
Returns whether the overlay is enabledvoid
paintOverlay(OpenStreetMapViewer viewer, Graphics g)
Paints the overlay.protected void
postPaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Gets executed after the actual painting.protected void
prePaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Gets executed before the actual painting.void
setEnabled(boolean value)
Sets whether the overlay is enabled.-
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
-
-
-
-
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
-
setEnabled
public void setEnabled(boolean value)
Sets whether the overlay is enabled.- Parameters:
value
- true if enabled
-
isEnabled
public boolean isEnabled()
Returns whether the overlay is enabled- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
prePaintOverlay
protected void prePaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Gets executed before the actual painting.
Default implementation does nothing.- Parameters:
viewer
- the associated viewerg
- the graphics context
-
doPaintOverlay
protected abstract void doPaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Performs the actual painting.- Parameters:
viewer
- the associated viewerg
- the graphics context
-
postPaintOverlay
protected void postPaintOverlay(OpenStreetMapViewer viewer, Graphics g)
Gets executed after the actual painting.
Default implementation does nothing.- Parameters:
viewer
- the associated viewerg
- the graphics context
-
paintOverlay
public void paintOverlay(OpenStreetMapViewer viewer, Graphics g)
Paints the overlay.- Parameters:
viewer
- the associated viewerg
- the graphics context
-
-