Package adams.data.conversion.mapobject
Class SimpleDotMarkerGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.mapobject.AbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapMarker>
-
- adams.data.conversion.mapobject.AbstractMapMarkerGenerator
-
- adams.data.conversion.mapobject.SimpleDotMarkerGenerator
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,Serializable
public class SimpleDotMarkerGenerator extends AbstractMapMarkerGenerator
Generates dot markers.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-layer <java.lang.String> (property: layer) The name of the layer. default: Default
-gps <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: GPS) The index of the column containing the GPS objects. default: example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-radius <int> (property: radius) The radius of the dot in pixels. default: 5 minimum: 1
-name <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: name) The index of the column containing the name (optional). default: example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-timestamp <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: timestamp) The column to obtain the timestamp from for the map object (optional). default: example: An index is a number starting with 1; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-additional-attributes <adams.data.spreadsheet.SpreadSheetColumnRange> (property: additionalAttributes) The range of column to add to the map object as well. default: example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; apart from column names (case-sensitive), the following placeholders can be used as well: first, second, third, last_2, last_1, last
-dot-color <java.awt.Color> (property: dotColor) The dot color for the point. default: #ffc800
-fill-color <java.awt.Color> (property: fillColor) The fill color for the point. default: #32646464
-font <java.awt.Font> (property: font) The font to use for the text. default: helvetica-PLAIN-12
- 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_DotColor
the color of the dot.protected Color
m_FillColor
the fill color of the circle.protected Font
m_Font
the font to use.protected adams.data.spreadsheet.SpreadSheetColumnIndex
m_Name
the index of the column with the name information (optional).protected int
m_NameIndex
the actual index of the name column.protected int
m_Radius
the radius in pixels.-
Fields inherited from class adams.data.conversion.mapobject.AbstractMapMarkerGenerator
m_GPS, m_GPSIndex
-
Fields inherited from class adams.data.conversion.mapobject.AbstractMapObjectGenerator
m_AdditionalAttributes, m_AdditionalAttributesIndices, m_Layer, m_Timestamp, m_TimestampIndex
-
-
Constructor Summary
Constructors Constructor Description SimpleDotMarkerGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
check(adams.data.spreadsheet.SpreadSheet sheet)
Checks the spreadsheet and throws an exception if it fails.void
defineOptions()
Adds options to the internal list of options.protected org.openstreetmap.gui.jmapviewer.interfaces.MapMarker[]
doGenerate(adams.data.spreadsheet.SpreadSheet sheet)
Performs the actual generation of the layer.String
dotColorTipText()
Returns the tip text for this property.String
fillColorTipText()
Returns the tip text for this property.String
fontTipText()
Returns the tip text for this property.Color
getDotColor()
Returns the dot color for the dot.Color
getFillColor()
Returns the fill color for the circle.Font
getFont()
Returns the font for the text.adams.data.spreadsheet.SpreadSheetColumnIndex
getName()
Returns the index of the column containing the name.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.int
getRadius()
Returns the radius of the dot.String
globalInfo()
Returns a string describing the object.protected void
init(adams.data.spreadsheet.SpreadSheet sheet)
Initializes the internal state with the given spreadsheet.String
nameTipText()
Returns the tip text for this property.String
radiusTipText()
Returns the tip text for this property.void
setDotColor(Color value)
Sets the dot color for the dot.void
setFillColor(Color value)
Sets the fill color for the circle.void
setFont(Font value)
Sets the font for the text.void
setName(adams.data.spreadsheet.SpreadSheetColumnIndex value)
Sets the index of the column containing the name.void
setRadius(int value)
Sets the radius of the dot.-
Methods inherited from class adams.data.conversion.mapobject.AbstractMapMarkerGenerator
generates, getGPS, GPSTipText, setGPS
-
Methods inherited from class adams.data.conversion.mapobject.AbstractMapObjectGenerator
additionalAttributesTipText, addMetaData, addTimestamp, generate, getAdditionalAttributes, getDefaultLayer, getLayer, getTimestamp, initialize, layerTipText, postProcess, setAdditionalAttributes, setLayer, setTimestamp, shallowCopy, shallowCopy, timestampTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Radius
protected int m_Radius
the radius in pixels.
-
m_Name
protected adams.data.spreadsheet.SpreadSheetColumnIndex m_Name
the index of the column with the name information (optional).
-
m_NameIndex
protected int m_NameIndex
the actual index of the name column.
-
m_FillColor
protected Color m_FillColor
the fill color of the circle.
-
m_Font
protected Font m_Font
the font to use.
-
m_DotColor
protected Color m_DotColor
the color of the dot.
-
-
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 classAbstractMapMarkerGenerator
-
setRadius
public void setRadius(int value)
Sets the radius of the dot.- Parameters:
value
- the radius in pixels
-
getRadius
public int getRadius()
Returns the radius of the dot.- Returns:
- the radius in pixels
-
radiusTipText
public String radiusTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setName
public void setName(adams.data.spreadsheet.SpreadSheetColumnIndex value)
Sets the index of the column containing the name.- Parameters:
value
- the column index
-
getName
public adams.data.spreadsheet.SpreadSheetColumnIndex getName()
Returns the index of the column containing the name.- Returns:
- the column index
-
nameTipText
public String nameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setDotColor
public void setDotColor(Color value)
Sets the dot color for the dot.- Parameters:
value
- the dot color
-
getDotColor
public Color getDotColor()
Returns the dot color for the dot.- Returns:
- the dot color
-
dotColorTipText
public String dotColorTipText()
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 for the circle.- Parameters:
value
- the fill color
-
getFillColor
public Color getFillColor()
Returns the fill color for the circle.- 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.
-
setFont
public void setFont(Font value)
Sets the font for the text.- Parameters:
value
- the font
-
getFont
public Font getFont()
Returns the font for the text.- Returns:
- the font
-
fontTipText
public String fontTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractMapMarkerGenerator
- Returns:
- null if no info available, otherwise short string
-
check
protected void check(adams.data.spreadsheet.SpreadSheet sheet)
Checks the spreadsheet and throws an exception if it fails.- Overrides:
check
in classAbstractMapMarkerGenerator
- Parameters:
sheet
- the spreadsheet to check
-
init
protected void init(adams.data.spreadsheet.SpreadSheet sheet)
Initializes the internal state with the given spreadsheet.- Overrides:
init
in classAbstractMapMarkerGenerator
- Parameters:
sheet
- the spreadsheet to initialize with
-
doGenerate
protected org.openstreetmap.gui.jmapviewer.interfaces.MapMarker[] doGenerate(adams.data.spreadsheet.SpreadSheet sheet)
Performs the actual generation of the layer.- Specified by:
doGenerate
in classAbstractMapObjectGenerator<org.openstreetmap.gui.jmapviewer.interfaces.MapMarker>
- Parameters:
sheet
- the spreadsheet to use- Returns:
- the generated layer
-
-