public abstract class ImageryLayer extends Layer
Modifier and Type | Class and Description |
---|---|
(package private) class |
ImageryLayer.ApplyOffsetAction |
private static class |
ImageryLayer.ColorfulFilter |
static class |
ImageryLayer.ColorfulImageProcessor
Adds or removes the colorfulness of the image.
|
static class |
ImageryLayer.GammaImageProcessor
An image processor which adjusts the gamma value of an image.
|
class |
ImageryLayer.OffsetAction |
static class |
ImageryLayer.SharpenImageProcessor
Sharpens or blurs the image, depending on the sharpen value.
|
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 ImageryAdjustAction |
adjustAction |
protected ImageryLayer.ColorfulImageProcessor |
collorfulnessImageProcessor |
protected double |
dx |
protected double |
dy |
protected ImageryLayer.GammaImageProcessor |
gammaImageProcessor |
protected javax.swing.Icon |
icon |
private java.util.List<ImageProcessor> |
imageProcessors |
protected ImageryInfo |
info |
static IntegerProperty |
PROP_FADE_AMOUNT |
static ColorProperty |
PROP_FADE_COLOR |
static IntegerProperty |
PROP_SHARPEN_LEVEL |
protected ImageryLayer.SharpenImageProcessor |
sharpenImageProcessor |
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) |
static ImageProcessor |
createImageProcessor(java.awt.image.BufferedImageOp op,
boolean inPlace)
Wraps a
BufferedImageOp to be used as ImageProcessor . |
void |
destroy()
Called, when the layer is removed from the mapview and is going to be destroyed.
|
void |
displace(double dx,
double dy) |
double |
getColorfulness()
Gets the colorfulness of this image.
|
double |
getDx() |
double |
getDy() |
static java.awt.Color |
getFadeColor() |
static java.awt.Color |
getFadeColorWithAlpha() |
double |
getGamma()
Returns the currently set gamma value.
|
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() |
javax.swing.JMenuItem |
getOffsetMenuItem() |
javax.swing.JComponent |
getOffsetMenuItem(javax.swing.JComponent subMenu) |
double |
getPPD() |
double |
getSharpenLevel()
Gets the current sharpen level.
|
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 |
void |
setColorfulness(double colorfulness)
Sets the colorfulness of this image.
|
void |
setGamma(double gamma)
Sets a new gamma value,
1 stands for no correction. |
void |
setOffset(double dx,
double dy)
Sets the displacement offset of this layer.
|
void |
setSharpenLevel(double sharpenLevel)
Sets the sharpen level for the layer.
|
addPropertyChangeListener, checkLayerMemoryDoesNotExceedMaximum, checkSaveConditions, createAndOpenSaveFileChooser, estimateMemoryUsage, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getDefaultLayerPosition, getMenuEntries, getName, getOpacity, getToolTipText, getViewProjectionBounds, hookUpMapView, isBackgroundLayer, isChanged, 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, toString, wait, wait, wait
paint
public static final ColorProperty PROP_FADE_COLOR
public static final IntegerProperty PROP_FADE_AMOUNT
public static final IntegerProperty PROP_SHARPEN_LEVEL
private final java.util.List<ImageProcessor> imageProcessors
protected final ImageryInfo info
protected javax.swing.Icon icon
protected double dx
protected double dy
protected ImageryLayer.GammaImageProcessor gammaImageProcessor
protected ImageryLayer.SharpenImageProcessor sharpenImageProcessor
protected ImageryLayer.ColorfulImageProcessor collorfulnessImageProcessor
private final ImageryAdjustAction adjustAction
public ImageryLayer(ImageryInfo info)
ImageryLayer
.info
- imagery infopublic static java.awt.Color getFadeColor()
public static java.awt.Color getFadeColorWithAlpha()
public double getPPD()
public double getDx()
public double getDy()
public void setOffset(double dx, double dy)
dx
- The x offsetdy
- The y offsetpublic void displace(double dx, double dy)
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()
getInfoComponent
in class Layer
public static ImageryLayer create(ImageryInfo info)
public javax.swing.JMenuItem getOffsetMenuItem()
public javax.swing.JComponent getOffsetMenuItem(javax.swing.JComponent subMenu)
public double getGamma()
public void setGamma(double gamma)
1
stands for no correction.gamma
- new gamma valuepublic double getSharpenLevel()
public void setSharpenLevel(double sharpenLevel)
1
means no change in sharpness.
Values in range 0..1 blur the image.
Values above 1 are used to sharpen the image.sharpenLevel
- The sharpen level.public double getColorfulness()
public void setColorfulness(double colorfulness)
colorfulness
- The colorfulness.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 void destroy()
Layer
destroy
in interface Destroyable
destroy
in class Layer