public class ValidatorLayer extends Layer implements LayerManager.LayerChangeListener
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
AbstractMapViewPaintable.CompatibilityModeLayerPainter
MapViewPaintable.LayerPainter, MapViewPaintable.MapViewEvent, MapViewPaintable.PaintableInvalidationEvent, MapViewPaintable.PaintableInvalidationListener
Modifier and Type | Field and Description |
---|---|
private java.lang.Runnable |
invalidator |
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
Constructor and Description |
---|
ValidatorLayer()
Constructs a new Validator layer
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called, when the layer is removed from the mapview and is going to be destroyed.
|
LayerPositionStrategy |
getDefaultLayerPosition()
Gets the strategy that specifies where this layer should be inserted in a layer list.
|
javax.swing.Icon |
getIcon()
Return a static icon.
|
java.lang.Object |
getInfoComponent() |
javax.swing.Action[] |
getMenuEntries()
Returns list of actions.
|
java.lang.String |
getToolTipText() |
boolean |
isMergable(Layer other) |
void |
layerAdded(LayerManager.LayerAddEvent e)
Notifies this listener that a layer has been added.
|
void |
layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
Notifies this listener that the order of layers was changed.
|
void |
layerRemoving(LayerManager.LayerRemoveEvent e)
If layer is the OSM Data layer, remove all errors
|
void |
mergeFrom(Layer from)
Merges the given layer into this layer.
|
void |
paint(java.awt.Graphics2D g,
MapView mv,
Bounds bounds)
Draw all primitives in this layer but do not draw modified ones (they
are drawn by the edit layer).
|
void |
visitBoundingBox(BoundingXYVisitor v) |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getBaseColorProperty, getColorProperty, getName, getOpacity, getViewProjectionBounds, hookUpMapView, isBackgroundLayer, isChanged, isInfoResizable, isProjectionSupported, isRenamed, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, toString
addInvalidationListener, attachToMapView, createMapViewPainter, invalidate, removeInvalidationListener
private final java.lang.Runnable invalidator
public ValidatorLayer()
public javax.swing.Icon getIcon()
public void paint(java.awt.Graphics2D g, MapView mv, Bounds bounds)
paint
in interface MapViewPaintable
g
- Graphicsmv
- The object that can translate GeoPoints to screen coordinates.bounds
- Bounding boxpublic java.lang.String getToolTipText()
getToolTipText
in class Layer
public void mergeFrom(Layer from)
Layer
public boolean isMergable(Layer other)
isMergable
in class Layer
other
- The other layer that is tested to be mergable with this.public void visitBoundingBox(BoundingXYVisitor v)
visitBoundingBox
in class Layer
public java.lang.Object getInfoComponent()
getInfoComponent
in class Layer
public javax.swing.Action[] getMenuEntries()
Layer
Layer.SeparatorLayerAction.INSTANCE
instead of new JSeparatorgetMenuEntries
in class Layer
public void layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerOrderChanged
in interface LayerManager.LayerChangeListener
e
- The order change event.public void layerAdded(LayerManager.LayerAddEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method.
layerAdded
in interface LayerManager.LayerChangeListener
e
- The new added layer eventpublic void layerRemoving(LayerManager.LayerRemoveEvent e)
layerRemoving
in interface LayerManager.LayerChangeListener
e
- The layer to be removed (as event)public LayerPositionStrategy getDefaultLayerPosition()
Layer
getDefaultLayerPosition
in class Layer
public void destroy()
Layer
destroy
in interface Destroyable
destroy
in class Layer