public abstract class ImageryLayer extends Layer
Modifier and Type | Class and Description |
---|---|
private static class |
ImageryLayer.ApplyOffsetAction |
class |
ImageryLayer.OffsetAction |
static interface |
ImageryLayer.OffsetMenuEntry
An additional menu entry in the imagery offset menu.
|
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 ImageryFilterSettings |
filterSettings |
protected javax.swing.Icon |
icon |
private java.util.List<ImageProcessor> |
imageProcessors |
protected ImageryInfo |
info |
static IntegerProperty |
PROP_SHARPEN_LEVEL
The default value for the sharpen filter for each imagery layer.
|
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
Constructor and Description |
---|
ImageryLayer(ImageryInfo info)
Constructs a new
ImageryLayer . |
Modifier and Type | Method and Description |
---|---|
boolean |
addImageProcessor(ImageProcessor processor)
This method adds the
ImageProcessor to this Layer if it is not null . |
java.awt.image.BufferedImage |
applyImageProcessors(java.awt.image.BufferedImage img)
Applies all the chosen
ImageProcessor s to the image |
static ImageryLayer |
create(ImageryInfo info)
Create a new imagery layer
|
static ImageProcessor |
createImageProcessor(java.awt.image.BufferedImageOp op,
boolean inPlace)
Wraps a
BufferedImageOp to be used as ImageProcessor . |
protected javax.swing.JComponent |
createTextField(java.lang.String text) |
protected abstract javax.swing.Action |
getAdjustAction() |
java.lang.String |
getChangesetSourceTag()
Get the source for the layer
|
ImageryFilterSettings |
getFilterSettings()
Gets the settings for the filter that is applied to this layer.
|
javax.swing.Icon |
getIcon()
Return a representative small image for this layer.
|
java.util.List<ImageProcessor> |
getImageProcessors()
This method gets all
ImageProcessor s of the layer |
ImageryInfo |
getInfo()
Returns imagery info.
|
java.lang.Object |
getInfoComponent()
Gets the layer information to display to the user.
|
protected abstract java.util.List<ImageryLayer.OffsetMenuEntry> |
getOffsetMenuEntries() |
javax.swing.JMenuItem |
getOffsetMenuItem()
Create the menu item that should be added to the offset menu.
|
javax.swing.JComponent |
getOffsetMenuItem(javax.swing.JComponent subMenu)
Create the submenu or the menu item to set the offset of the layer.
|
double |
getPPD() |
boolean |
isMergable(Layer other) |
void |
mergeFrom(Layer from)
Merges the given layer into this layer.
|
boolean |
removeImageProcessor(ImageProcessor processor)
This method removes given
ImageProcessor from this layer |
java.lang.String |
toString() |
addPropertyChangeListener, checkSaveConditions, createAndOpenSaveFileChooser, destroy, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getBaseColorProperty, getColorProperty, getDefaultLayerPosition, getMenuEntries, getName, getOpacity, getToolTipText, getViewProjectionBounds, hookUpMapView, isBackgroundLayer, isInfoResizable, isProjectionSupported, isRenamed, isSavable, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible, visitBoundingBox
addInvalidationListener, attachToMapView, createMapViewPainter, invalidate, removeInvalidationListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
paint
public static final IntegerProperty PROP_SHARPEN_LEVEL
private final java.util.List<ImageProcessor> imageProcessors
protected final ImageryInfo info
protected javax.swing.Icon icon
private final ImageryFilterSettings filterSettings
public ImageryLayer(ImageryInfo info)
ImageryLayer
.info
- imagery infopublic double getPPD()
public ImageryInfo getInfo()
public javax.swing.Icon getIcon()
Layer
public boolean isMergable(Layer other)
isMergable
in class Layer
other
- The other layer that is tested to be mergable with this.public void mergeFrom(Layer from)
Layer
public java.lang.Object getInfoComponent()
Layer
getInfoComponent
in class Layer
Component
describing the layer.protected javax.swing.JComponent createTextField(java.lang.String text)
public static ImageryLayer create(ImageryInfo info)
info
- The imagery info to use as basepublic javax.swing.JMenuItem getOffsetMenuItem()
public javax.swing.JComponent getOffsetMenuItem(javax.swing.JComponent subMenu)
subMenu
- The subMenu to useprotected abstract javax.swing.Action getAdjustAction()
protected abstract java.util.List<ImageryLayer.OffsetMenuEntry> getOffsetMenuEntries()
public ImageryFilterSettings getFilterSettings()
public boolean addImageProcessor(ImageProcessor processor)
ImageProcessor
to this Layer if it is not null
.processor
- that processes the imagepublic boolean removeImageProcessor(ImageProcessor processor)
ImageProcessor
from this layerprocessor
- which is needed to be removedpublic static ImageProcessor createImageProcessor(java.awt.image.BufferedImageOp op, boolean inPlace)
BufferedImageOp
to be used as ImageProcessor
.op
- the BufferedImageOp
inPlace
- true to apply filter in place, i.e., not create a new BufferedImage
for the result
(the op
needs to support this!)ImageProcessor
wrapperpublic java.util.List<ImageProcessor> getImageProcessors()
ImageProcessor
s of the layerpublic java.awt.image.BufferedImage applyImageProcessors(java.awt.image.BufferedImage img)
ImageProcessor
s to the imageimg
- - image which should be changedpublic java.lang.String getChangesetSourceTag()
Layer
getChangesetSourceTag
in class Layer
null