public class TLcdImageDecoder extends Object implements ILcdTileDecoder, ImageObserver
TLcdImageDecoder
is an ILcdTileDecoder
for images
supported by the platform's native implementation
of the Toolkit, i.e., Toolkit.getDefaultToolkit()
.
There is no guarantee to the type of images supported
by a given toolkit.
Therefore, using TLcdImageDecoder
makes your application
platform specific to the extent that a format may be supported
by one toolkit implementation, but not by the other. This class is not thread safe. Create a new instance in every separate thread.
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TLcdImageDecoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
imageUpdate(Image img,
int infoflags,
int x,
int y,
int width,
int height)
The following flags are checked:
WIDTH and
HEIGHT . |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
ILcdTileInfo |
readTile(String aFileName,
int aImageIndex,
int aSubTileWidth,
int aSubTileHeight,
int aRowIndex,
int aColumnIndex,
ILcdBuffer aBuffer)
Reads a sub-tile from a file.
|
ILcdTileInfo |
readTile(URL aURL,
int aImageIndex,
int aSubTileWidth,
int aSubTileHeight,
int aRowIndex,
int aColumnIndex,
ILcdBuffer aBuffer)
Reads a sub-tile from a URL.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public ILcdTileInfo readTile(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ILcdTileDecoder
readTile
in interface ILcdTileDecoder
aFileName
- the name of the file containing the tile.aImageIndex
- the index of the tile in the given file (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aRowIndex
- the row number of the sub-tile to be decoded.aColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.public ILcdTileInfo readTile(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ILcdTileDecoder
readTile
in interface ILcdTileDecoder
aURL
- the URL containing the tile.aImageIndex
- the index of the tile in the given URL (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aRowIndex
- the row number of the sub-tile to be decoded.aColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
WIDTH
and
HEIGHT
.imageUpdate
in interface ImageObserver