Package org.openstreetmap.josm.gui.layer
Interface MapViewPaintable
-
- All Known Implementing Classes:
AbstractCachedTileSourceLayer
,AbstractMapViewPaintable
,AbstractModifiableLayer
,AbstractOsmDataLayer
,AbstractTileSourceLayer
,AdvancedPreference.UnclearableOsmDataLayer
,CorrelationSupportLayer
,DrawAction
,ExtrudeAction
,GeoImageLayer
,GpxLayer
,GpxRouteLayer
,ImageryLayer
,Layer
,MarkerLayer
,MVTLayer
,NoteLayer
,OsmDataLayer
,ParallelWayAction.ParallelWayLayer
,SelectionManager.SelectionHintLayer
,TMSLayer
,ValidatorLayer
,WikimediaCommonsLayer
,WMSLayer
,WMTSLayer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MapViewPaintable
This is a component that can be painted on the map view.You might want to extend
AbstractMapViewPaintable
to ease implementation of this.That class allows you to listen to paintable change events. Those methods may be moved here some time in the future.
- Since:
- 608 (creation), 10600 (functional interface)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MapViewPaintable.LayerPainter
Gets a new LayerPainter that paints thisMapViewPaintable
to the given map view.static class
MapViewPaintable.MapViewEvent
A event that is fired whenever the map view is attached or detached from any layer.static class
MapViewPaintable.PaintableInvalidationEvent
This event is fired whenever the paintable got invalidated and needs repainting some time in the future.static interface
MapViewPaintable.PaintableInvalidationListener
This is a listener that listens toMapViewPaintable.PaintableInvalidationEvent
s
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addInvalidationListener(MapViewPaintable.PaintableInvalidationListener l)
Adds a new paintable invalidation listener.void
paint(java.awt.Graphics2D g, MapView mv, Bounds bbox)
Paint the dataset using the engine set.default void
removeInvalidationListener(MapViewPaintable.PaintableInvalidationListener l)
Removes an added paintable invalidation listener.
-
-
-
Method Detail
-
paint
void paint(java.awt.Graphics2D g, MapView mv, Bounds bbox)
Paint the dataset using the engine set.- Parameters:
g
- Graphicsmv
- The object that can translate GeoPoints to screen coordinates.bbox
- Bounding box
-
addInvalidationListener
default void addInvalidationListener(MapViewPaintable.PaintableInvalidationListener l)
Adds a new paintable invalidation listener.- Parameters:
l
- The listener to add.- Since:
- 12107
-
removeInvalidationListener
default void removeInvalidationListener(MapViewPaintable.PaintableInvalidationListener l)
Removes an added paintable invalidation listener. May throw an exception if the listener is added twice.- Parameters:
l
- The listener to remove.- Since:
- 12107
-
-