Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.views.styledmap.painter
Class InstanceMarker

java.lang.Object
  extended by de.fhg.igd.mapviewer.marker.AbstractMarker<T>
      extended by de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
          extended by eu.esdihumboldt.hale.ui.views.styledmap.painter.InstanceMarker
All Implemented Interfaces:
de.fhg.igd.mapviewer.marker.Marker<InstanceWaypoint>
Direct Known Subclasses:
StyledInstanceMarker

public class InstanceMarker
extends de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>

Instance marker painter.

Author:
Simon Templer

Constructor Summary
InstanceMarker()
           
 
Method Summary
protected  boolean applyStroke(Graphics2D g, InstanceWaypoint context)
           
protected  void areaReset()
          Reset the marker areas.
protected  de.fhg.igd.mapviewer.marker.area.Area doPaintMarker(Graphics2D g, InstanceWaypoint context, org.jdesktop.swingx.mapviewer.PixelConverter converter, int zoom, int minX, int minY, int maxX, int maxY, Rectangle gBounds, boolean calulateArea)
           
protected  Color getBorderColor(InstanceWaypoint context)
           
protected  de.fhg.igd.mapviewer.marker.Marker<? super InstanceWaypoint> getFallbackMarker(InstanceWaypoint context)
           
protected  Stroke getLineStroke(InstanceWaypoint context)
          Get the stroke for drawing lines.
protected  Color getPaintColor(InstanceWaypoint context)
           
protected  de.fhg.igd.mapviewer.marker.area.Area paintGeometry(Graphics2D g, CRSDefinition crsDefinition, com.vividsolutions.jts.geom.Geometry geometry, InstanceWaypoint context, org.jdesktop.swingx.mapviewer.PixelConverter converter, int zoom, boolean singleGeometry, Rectangle gBounds, org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS, boolean calculateArea)
          Paint a geometry.
protected  de.fhg.igd.mapviewer.marker.area.Area paintLine(com.vividsolutions.jts.geom.LineString geometry, Graphics2D g, CRSDefinition crsDefinition, InstanceWaypoint context, org.jdesktop.swingx.mapviewer.PixelConverter converter, int zoom, org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS, boolean calculateArea)
          Paint a line string geometry.
protected  de.fhg.igd.mapviewer.marker.area.Area paintPoint(com.vividsolutions.jts.geom.Point geometry, Graphics2D g, CRSDefinition crsDefinition, InstanceWaypoint context, org.jdesktop.swingx.mapviewer.PixelConverter converter, int zoom, org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS, boolean calculateArea)
          Paint a point geometry.
protected  de.fhg.igd.mapviewer.marker.area.Area paintPolygon(com.vividsolutions.jts.geom.Polygon geometry, Graphics2D g, CRSDefinition crsDefinition, InstanceWaypoint context, org.jdesktop.swingx.mapviewer.PixelConverter converter, int zoom, org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS, boolean calculateArea)
          Paint a polygon geometry.
 void reset()
           
 
Methods inherited from class de.fhg.igd.mapviewer.marker.BoundingBoxMarker
applyFill, isToSmall, paintFallback, paintMarker
 
Methods inherited from class de.fhg.igd.mapviewer.marker.AbstractMarker
getArea, paint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceMarker

public InstanceMarker()
Method Detail

reset

public void reset()
Specified by:
reset in interface de.fhg.igd.mapviewer.marker.Marker<InstanceWaypoint>
Overrides:
reset in class de.fhg.igd.mapviewer.marker.AbstractMarker<InstanceWaypoint>
See Also:
AbstractMarker.reset()

areaReset

protected void areaReset()
Reset the marker areas.


doPaintMarker

protected de.fhg.igd.mapviewer.marker.area.Area doPaintMarker(Graphics2D g,
                                                              InstanceWaypoint context,
                                                              org.jdesktop.swingx.mapviewer.PixelConverter converter,
                                                              int zoom,
                                                              int minX,
                                                              int minY,
                                                              int maxX,
                                                              int maxY,
                                                              Rectangle gBounds,
                                                              boolean calulateArea)
Overrides:
doPaintMarker in class de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
See Also:
BoundingBoxMarker.doPaintMarker(Graphics2D, SelectableWaypoint, PixelConverter, int, int, int, int, int, Rectangle, boolean)

paintGeometry

protected de.fhg.igd.mapviewer.marker.area.Area paintGeometry(Graphics2D g,
                                                              CRSDefinition crsDefinition,
                                                              com.vividsolutions.jts.geom.Geometry geometry,
                                                              InstanceWaypoint context,
                                                              org.jdesktop.swingx.mapviewer.PixelConverter converter,
                                                              int zoom,
                                                              boolean singleGeometry,
                                                              Rectangle gBounds,
                                                              org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS,
                                                              boolean calculateArea)
Paint a geometry.

Parameters:
g - the graphics to paint on
crsDefinition - the CRS definition associated with the geometry
geometry - the geometry
context - the context
converter - the pixel converter
zoom - the zoom level
singleGeometry - if this is the only geometry associated to the marker
gBounds - the graphics bounds
mapCRS - the map coordinate reference system
calculateArea - if the area representing the marker should be calculated, if false is given here the return value is ignored and should be null
Returns:
the area the geometry occupies (in pixel coordinates), or null if nothing has been painted

paintPoint

protected de.fhg.igd.mapviewer.marker.area.Area paintPoint(com.vividsolutions.jts.geom.Point geometry,
                                                           Graphics2D g,
                                                           CRSDefinition crsDefinition,
                                                           InstanceWaypoint context,
                                                           org.jdesktop.swingx.mapviewer.PixelConverter converter,
                                                           int zoom,
                                                           org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS,
                                                           boolean calculateArea)
Paint a point geometry.

Parameters:
geometry - the point
g - the graphics object to paint on
crsDefinition - the CRS definition associated to the geometry
context - the context
converter - the pixel converter
zoom - the zoom level
mapCRS - the map coordinate reference system
calculateArea - if the area representing the marker should be calculated, if false is given here the return value is ignored and should be null
Returns:
the point marker area or null if painting failed

paintPolygon

protected de.fhg.igd.mapviewer.marker.area.Area paintPolygon(com.vividsolutions.jts.geom.Polygon geometry,
                                                             Graphics2D g,
                                                             CRSDefinition crsDefinition,
                                                             InstanceWaypoint context,
                                                             org.jdesktop.swingx.mapviewer.PixelConverter converter,
                                                             int zoom,
                                                             org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS,
                                                             boolean calculateArea)
Paint a polygon geometry.

Parameters:
geometry - the polygon
g - the graphics object to paint on
crsDefinition - the CRS definition associated to the geometry
context - the context
converter - the pixel converter
zoom - the zoom level
mapCRS - the map coordinate reference system
calculateArea - if the area representing the marker should be calculated, if false is given here the return value is ignored and should be null
Returns:
the polygon area or null if painting failed

paintLine

protected de.fhg.igd.mapviewer.marker.area.Area paintLine(com.vividsolutions.jts.geom.LineString geometry,
                                                          Graphics2D g,
                                                          CRSDefinition crsDefinition,
                                                          InstanceWaypoint context,
                                                          org.jdesktop.swingx.mapviewer.PixelConverter converter,
                                                          int zoom,
                                                          org.opengis.referencing.crs.CoordinateReferenceSystem mapCRS,
                                                          boolean calculateArea)
Paint a line string geometry.

Parameters:
geometry - the line string
g - the graphics object to paint on
crsDefinition - the CRS definition associated to the geometry
context - the context
converter - the pixel converter
zoom - the zoom level
mapCRS - the map coordinate reference system
calculateArea - if the area representing the marker should be calculated, if false is given here the return value is ignored and should be null
Returns:
the polygon area or null if painting failed

getFallbackMarker

protected de.fhg.igd.mapviewer.marker.Marker<? super InstanceWaypoint> getFallbackMarker(InstanceWaypoint context)
Specified by:
getFallbackMarker in class de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
See Also:
BoundingBoxMarker.getFallbackMarker(SelectableWaypoint)

getPaintColor

protected Color getPaintColor(InstanceWaypoint context)
Specified by:
getPaintColor in class de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
See Also:
BoundingBoxMarker.getPaintColor(SelectableWaypoint)

getLineStroke

protected Stroke getLineStroke(InstanceWaypoint context)
Get the stroke for drawing lines.

Parameters:
context - the context
Returns:
the stroke

applyStroke

protected boolean applyStroke(Graphics2D g,
                              InstanceWaypoint context)
Overrides:
applyStroke in class de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
See Also:
BoundingBoxMarker.applyStroke(Graphics2D, SelectableWaypoint)

getBorderColor

protected Color getBorderColor(InstanceWaypoint context)
Specified by:
getBorderColor in class de.fhg.igd.mapviewer.marker.BoundingBoxMarker<InstanceWaypoint>
See Also:
BoundingBoxMarker.getBorderColor(SelectableWaypoint)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d