public class ImageLayer extends Layer
Modifier and Type | Class and Description |
---|---|
static class |
ImageLayer.Type |
Modifier and Type | Field and Description |
---|---|
static Color |
DEFAULT_BORDER_COLOR |
static boolean |
DEFAULT_BORDER_SHOWN |
static double |
DEFAULT_BORDER_WIDTH |
static Color |
DEFAULT_PIXEL_BORDER_COLOR |
static Boolean |
DEFAULT_PIXEL_BORDER_SHOWN |
static double |
DEFAULT_PIXEL_BORDER_WIDTH |
static String |
PROPERTY_NAME_BORDER_COLOR |
static String |
PROPERTY_NAME_BORDER_SHOWN |
static String |
PROPERTY_NAME_BORDER_WIDTH |
static String |
PROPERTY_NAME_MULTI_LEVEL_SOURCE |
static String |
PROPERTY_NAME_PIXEL_BORDER_COLOR |
static String |
PROPERTY_NAME_PIXEL_BORDER_SHOWN |
static String |
PROPERTY_NAME_PIXEL_BORDER_WIDTH |
Constructor and Description |
---|
ImageLayer(ImageLayer.Type layerType,
MultiLevelSource multiLevelSource,
PropertySet configuration) |
ImageLayer(MultiLevelSource multiLevelSource)
Constructs a multi-resolution-level image layer.
|
ImageLayer(RenderedImage image)
Constructs a single-resolution-level image layer.
|
ImageLayer(RenderedImage image,
AffineTransform imageToModelTransform,
int levelCount)
Constructs a multi-resolution-level image layer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
disposeLayer()
Disposes the layer.
|
Color |
getBorderColor() |
double |
getBorderWidth() |
RenderedImage |
getImage() |
RenderedImage |
getImage(int level) |
AffineTransform |
getImageToModelTransform() |
AffineTransform |
getImageToModelTransform(int level) |
protected Rectangle2D |
getLayerModelBounds()
Gets the bounds (bounding box) of this layer in model coordinates.
|
static int |
getLevel(MultiLevelModel model,
Viewport vp) |
int |
getLevel(Viewport vp) |
AffineTransform |
getModelToImageTransform() |
AffineTransform |
getModelToImageTransform(int level) |
MultiLevelSource |
getMultiLevelSource() |
Color |
getPixelBorderColor() |
double |
getPixelBorderWidth() |
boolean |
isBorderShown() |
boolean |
isPixelBorderShown() |
void |
regenerate()
Regenerates the layer.
|
protected void |
renderLayer(Rendering rendering)
Renders the layer.
|
void |
setMultiLevelSource(MultiLevelSource multiLevelSource) |
addListener, dispose, disposeChildren, fireLayerDataChanged, fireLayerPropertyChanged, fireLayerPropertyChanged, fireLayersAdded, fireLayersRemoved, getChildIndex, getChildren, getChildrenModelBounds, getComposite, getConfiguration, getConfigurationProperty, getId, getLayerType, getListeners, getModelBounds, getName, getParent, getSwipePercent, getTransparency, isCollectionLayer, isVisible, removeListener, render, render, renderChildren, setComposite, setId, setName, setSwipePercent, setTransparency, setVisible, toString
getExtension
public static final String PROPERTY_NAME_MULTI_LEVEL_SOURCE
public static final String PROPERTY_NAME_BORDER_SHOWN
public static final String PROPERTY_NAME_BORDER_WIDTH
public static final String PROPERTY_NAME_BORDER_COLOR
public static final String PROPERTY_NAME_PIXEL_BORDER_SHOWN
public static final String PROPERTY_NAME_PIXEL_BORDER_WIDTH
public static final String PROPERTY_NAME_PIXEL_BORDER_COLOR
public static final boolean DEFAULT_BORDER_SHOWN
public static final Color DEFAULT_BORDER_COLOR
public static final double DEFAULT_BORDER_WIDTH
public static final Boolean DEFAULT_PIXEL_BORDER_SHOWN
public static final Color DEFAULT_PIXEL_BORDER_COLOR
public static final double DEFAULT_PIXEL_BORDER_WIDTH
public ImageLayer(RenderedImage image)
image
- the imagepublic ImageLayer(RenderedImage image, AffineTransform imageToModelTransform, int levelCount)
image
- the imageimageToModelTransform
- the transformation from image to model CSlevelCount
- the number of resolution levelspublic ImageLayer(MultiLevelSource multiLevelSource)
multiLevelSource
- the multi-resolution-level imagepublic ImageLayer(ImageLayer.Type layerType, MultiLevelSource multiLevelSource, PropertySet configuration)
public void regenerate()
Layer
regenerate
in class Layer
public RenderedImage getImage()
public MultiLevelSource getMultiLevelSource()
public void setMultiLevelSource(MultiLevelSource multiLevelSource)
public AffineTransform getImageToModelTransform()
public AffineTransform getModelToImageTransform()
public RenderedImage getImage(int level)
public AffineTransform getImageToModelTransform(int level)
public AffineTransform getModelToImageTransform(int level)
public int getLevel(Viewport vp)
public static int getLevel(MultiLevelModel model, Viewport vp)
protected Rectangle2D getLayerModelBounds()
Layer
Layer.getModelBounds()
.
The default implementation returns null
.getLayerModelBounds
in class Layer
null
if this layer
has no specified boundary.protected void renderLayer(Rendering rendering)
Layer
Layer.render(com.bc.ceres.grender.Rendering)
.
The default implementation does nothing.renderLayer
in class Layer
rendering
- The rendering to which the layer will be rendered.protected void disposeLayer()
Layer
Layer.dispose()
.
The default implementation does nothing.disposeLayer
in class Layer
public boolean isBorderShown()
public double getBorderWidth()
public Color getBorderColor()
public boolean isPixelBorderShown()
public double getPixelBorderWidth()
public Color getPixelBorderColor()
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.