Package com.bc.ceres.glevel.support
Class AbstractMultiLevelSource
java.lang.Object
com.bc.ceres.glevel.support.AbstractMultiLevelSource
- All Implemented Interfaces:
MultiLevelSource
- Direct Known Subclasses:
DefaultMultiLevelSource,FileMultiLevelSource,GenericMultiLevelSource
@Deprecated
public abstract class AbstractMultiLevelSource
extends Object
implements MultiLevelSource
Deprecated.
An abstract base class for
MultiLevelSource implementations.
Level images are cached unless reset() is called.
Subclasses are asked to implement createImage(int).-
Field Summary
Fields inherited from interface com.bc.ceres.glevel.MultiLevelSource
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMultiLevelSource(MultiLevelModel multiLevelModel) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckLevel(int level) Deprecated.Utility method which checks if a given level is valid.protected abstract RenderedImagecreateImage(int level) Deprecated.Called bygetImage(int)if a level image is requested for the first time.getImage(int level) Deprecated.Gets theRenderedImageat the given resolution level.getImageShape(int level) Deprecated.Gets the shape of the area where this image's raster data contains valid pixels at the given resolution level.getModel()Deprecated.Gets the layout model for the multi-resolution image supported by thisLevelImageSource.voidreset()Deprecated.Removes all cached level images and also disposes anyPlanarImages among them.
-
Constructor Details
-
AbstractMultiLevelSource
Deprecated.
-
-
Method Details
-
getModel
Deprecated.Description copied from interface:MultiLevelSourceGets the layout model for the multi-resolution image supported by thisLevelImageSource.- Specified by:
getModelin interfaceMultiLevelSource- Returns:
- the multi-resolution image model.
-
getImage
Deprecated.Gets theRenderedImageat the given resolution level. Unlessreset()is called, the method will always return the same image instance at the same resolution level. If a level image is requested for the first time, the method callscreateImage(int)in order to retrieve the actual image instance.- Specified by:
getImagein interfaceMultiLevelSource- Parameters:
level- The resolution level.- Returns:
- The
RenderedImageat the given resolution level.
-
getImageShape
Deprecated.Description copied from interface:MultiLevelSourceGets the shape of the area where this image's raster data contains valid pixels at the given resolution level. The method returnsnull, if the entire image raster contains valid pixels.- Specified by:
getImageShapein interfaceMultiLevelSource- Parameters:
level- The resolution level.- Returns:
- The shape of the area where the image has data, can be
null.
-
createImage
Deprecated.Called bygetImage(int)if a level image is requested for the first time. Note that images created via this method will bedisposedwhenreset()is called on this multi-level image source. SeegetImage(int).The dimension of the level image created must be the same as that obtained from {DefaultMultiLevelSource.getLevelImageBounds(Rectangle sourceBounds, double scale)} for the scale associated with the given resolution level.
- Parameters:
level- The resolution level.- Returns:
- An instance of a
RenderedImagefor the given resolution level.
-
reset
public void reset()Deprecated.Removes all cached level images and also disposes anyPlanarImages among them.Overrides should always call
super.reset().- Specified by:
resetin interfaceMultiLevelSource
-
checkLevel
protected void checkLevel(int level) Deprecated.Utility method which checks if a given level is valid.- Parameters:
level- The resolution level.- Throws:
IllegalArgumentException- iflevel < 0 || level >= getModel().getLevelCount()
-