Class OvalMapOverlay
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.sink.openstreetmapviewer.AbstractMapOverlay
-
- adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlay
-
- adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlayWithDimensions
-
- adams.flow.sink.openstreetmapviewer.OvalMapOverlay
-
- 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
public class OvalMapOverlay extends AbstractPositionableMapOverlayWithDimensions
Paints an oval at the specified location.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-enabled <boolean> (property: enabled) If enabled, the overlay gets painted. default: true
-x <int> (property: x) The X position of the overlay (>=0: absolute, -1: left, -2: center, -3: right). default: -3 minimum: -3
-y <int> (property: y) The Y position of the overlay (>=0: absolute, -1: top, -2: center, -3: bottom ). default: -1 minimum: -3
-width <int> (property: width) The width of the oval. default: 100 minimum: -1
-height <int> (property: height) The height of the oval. default: 20 minimum: -1
-border-enabled <boolean> (property: borderEnabled) If enabled, the border gets painted. default: true
-border-color <java.awt.Color> (property: borderColor) The color of the border. default: #000000
-fill-enabled <boolean> (property: fillEnabled) If enabled, the oval gets filled. default: true
-fill-color <java.awt.Color> (property: fillColor) The fill color. default: #32646464
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_BorderColor
the color of the border.protected boolean
m_BorderEnabled
whether the border gets painted.protected Color
m_FillColor
the fill color.protected boolean
m_FillEnabled
whether filling is enbaled.-
Fields inherited from class adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlayWithDimensions
m_Height, m_Width
-
Fields inherited from class adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlay
m_X, m_Y
-
Fields inherited from class adams.flow.sink.openstreetmapviewer.AbstractMapOverlay
m_Enabled
-
-
Constructor Summary
Constructors Constructor Description OvalMapOverlay()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
borderColorTipText()
Returns the tip text for this property.String
borderEnabledTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected void
doPaintOverlay(OpenStreetMapViewer viewer, Graphics g, int x, int y)
Performs the actual painting.String
fillColorTipText()
Returns the tip text for this property.String
fillEnabledTipText()
Returns the tip text for this property.Color
getBorderColor()
Returns the color for the border.boolean
getBorderEnabled()
Returns whether the border gets painted.protected int
getDefaultHeight()
Returns the default height for the overlay.protected int
getDefaultWidth()
Returns the default width for the overlay.Color
getFillColor()
Returns the fill color.boolean
getFillEnabled()
Returns whether the oval is filled.String
globalInfo()
Returns a string describing the object.String
heightTipText()
Returns the tip text for this property.void
setBorderColor(Color value)
Sets the color for the border.void
setBorderEnabled(boolean value)
Sets whether to paint the border.void
setFillColor(Color value)
Sets the fill color.void
setFillEnabled(boolean value)
Sets whether to fill the oval.String
widthTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlayWithDimensions
doPaintOverlay, getHeight, getWidth, setHeight, setWidth
-
Methods inherited from class adams.flow.sink.openstreetmapviewer.AbstractPositionableMapOverlay
getDefaultX, getDefaultY, getX, getY, setX, setY, xTipText, yTipText
-
Methods inherited from class adams.flow.sink.openstreetmapviewer.AbstractMapOverlay
enabledTipText, isEnabled, paintOverlay, postPaintOverlay, prePaintOverlay, setEnabled
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractPositionableMapOverlayWithDimensions
-
getDefaultHeight
protected int getDefaultHeight()
Returns the default height for the overlay.- Specified by:
getDefaultHeight
in classAbstractPositionableMapOverlayWithDimensions
- Returns:
- the default height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Specified by:
heightTipText
in classAbstractPositionableMapOverlayWithDimensions
- 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 overlay.- Specified by:
getDefaultWidth
in classAbstractPositionableMapOverlayWithDimensions
- Returns:
- the default width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Specified by:
widthTipText
in classAbstractPositionableMapOverlayWithDimensions
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBorderEnabled
public void setBorderEnabled(boolean value)
Sets whether to paint the border.- Parameters:
value
- true if to paint border
-
getBorderEnabled
public boolean getBorderEnabled()
Returns whether the border gets painted.- Returns:
- true if border painted
-
borderEnabledTipText
public String borderEnabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBorderColor
public void setBorderColor(Color value)
Sets the color for the border.- Parameters:
value
- the border color
-
getBorderColor
public Color getBorderColor()
Returns the color for the border.- Returns:
- the border color
-
borderColorTipText
public String borderColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFillEnabled
public void setFillEnabled(boolean value)
Sets whether to fill the oval.- Parameters:
value
- true if to fill
-
getFillEnabled
public boolean getFillEnabled()
Returns whether the oval is filled.- Returns:
- true if filled
-
fillEnabledTipText
public String fillEnabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFillColor
public void setFillColor(Color value)
Sets the fill color.- Parameters:
value
- the fill color
-
getFillColor
public Color getFillColor()
Returns the fill color.- Returns:
- the fill color
-
fillColorTipText
public String fillColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doPaintOverlay
protected void doPaintOverlay(OpenStreetMapViewer viewer, Graphics g, int x, int y)
Performs the actual painting.- Specified by:
doPaintOverlay
in classAbstractPositionableMapOverlayWithDimensions
- Parameters:
viewer
- the associated viewerg
- the graphics contextx
- the actual x coordinatey
- the actual y coordinate
-
-