public class IlvImageTileLoader extends IlvMapTileLoader
IlvTileLoader
specialized
for loading a set of images, each image representing a tile
in a tiled data set.
Additionally, this tile loader uses the following policy to find
files whose names are used to create this tile loader:
IlvMapDataPathManager
.
IlvInputStream
,
the path names are considered relative to the document base of
the input stream.
IlvMapDataPathManager
,
IlvInputStream.getDocumentBase()
,
Serialized FormConstructor and Description |
---|
IlvImageTileLoader(IlvInputStream stream)
Constructs an
IlvImageTileLoader by reading
an IlvInputStream . |
IlvImageTileLoader(String pattern,
String colFormatString,
String rowFormatString)
Creates an
IlvImageTileLoader by specifying
a pattern and two formats used to construct a URL string for
a given IlvTile . |
Modifier and Type | Method and Description |
---|---|
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns an
IlvFeatureRenderer used to render
an image. |
IlvMapFeatureIterator |
getFeatureIterator(IlvTile tile)
Returns an
IlvMapFeatureIterator used to load
the tile tile. |
protected String |
getFileName(IlvTile tile)
Returns the file name corresponding to the tile tile.
|
boolean |
isPersistent()
Returns
true since this reader is persistent. |
void |
write(IlvOutputStream stream)
Writes this tile loader in an
IlvOutputStream . |
getFeatureRenderer, isAttachingAttributes, load, release, setAttachingAttributes, setFeatureRenderer
public IlvImageTileLoader(String pattern, String colFormatString, String rowFormatString)
IlvImageTileLoader
by specifying
a pattern and two formats used to construct a URL string for
a given IlvTile
.
DecimalFormat
which are used to format the tile row and column.
ADirectory/file_%c_%r_image.jpg
" and the
colFormatString is "000" and the colFormatString
is "0000", the resulting file name for the tile at (12, 34) will be
"ADirectory/file_0034_012_image.jpg
".pattern
- The file name pattern, containing one %c
and one %r
.colFormatString
- A string used to construct a
DecimalFormat
for the column specifier.rowFormatString
- A string used to construct a
DecimalFormat
for the row specifier.public IlvImageTileLoader(IlvInputStream stream) throws IlvReadFileException
IlvImageTileLoader
by reading
an IlvInputStream
.stream
- The IlvInputStream
to read from.IlvReadFileException
public IlvFeatureRenderer getDefaultFeatureRenderer()
IlvFeatureRenderer
used to render
an image.getDefaultFeatureRenderer
in class IlvMapTileLoader
IlvFeatureRenderer
.public IlvMapFeatureIterator getFeatureIterator(IlvTile tile) throws Exception
IlvMapFeatureIterator
used to load
the tile tile.
IlvImageReader
based on the result of getFileName(IlvTile tile)
.
getFileName()
can be
interpreted as a URL, an IlvImageReader
reading
the image from the URL is returned.
getFileName()
cannot be
interpreted as a URL, an IlvImageReader
reading
the image from the file name returned by getFileName()
is returned.getFeatureIterator
in class IlvMapTileLoader
tile
- The IlvTile
to be loaded.IlvMapFeatureIterator
.Exception
getFileName(ilog.views.tiling.IlvTile)
public boolean isPersistent()
true
since this reader is persistent.isPersistent
in interface IlvTileLoader
isPersistent
in class IlvMapTileLoader
protected String getFileName(IlvTile tile) throws ParseException
tile
- The tile to be loaded.ParseException
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in interface IlvTileLoader
write
in class IlvMapTileLoader
stream
- The IlvOutputStream
.IOException
- thrown when an exception occurs during
the write operation for this object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.