@Deprecated public abstract class ALcdTileProvider extends Object implementsILcdTileProvider
ILcdTileProvider
.
Extensions of this class should only implement the createTileSourceName(int, int)
method to complete
this tile provider.
A SoftReference
is kept to tiles that are already decoded.
Modifier and Type | Field and Description |
---|---|
static String |
NO_OF_TILE_COLUMNS
Deprecated.
Name of the property holding the number of columns for this
ALcdTileProvider . |
static String |
NO_OF_TILE_ROWS
Deprecated.
Name of the property holding the number of rows for this
ALcdTileProvider . |
Constructor and Description |
---|
ALcdTileProvider()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String |
createTileSourceName(int aRow,
int aColumn)
Deprecated.
Returns the full tile source name for the specified row and column, or
null if no tile exists for the
specified (row, column) combination. |
String |
getBasePath()
Deprecated.
Returns the directory to be used as base path for the source files that contain the data of the tiles.
|
int |
getNoOfCols()
Deprecated.
Returns the number of columns in this tile provider.
|
int |
getNoOfRows()
Deprecated.
Returns the number of rows in this tile provider.
|
ILcd2DBoundsInteractable |
getTile(int aRow,
int aCol)
Deprecated.
Returns the tile at the specified row and column.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
loadProperties(String aPrefix,
Properties aProperties)
Deprecated.
Initializes this tile provider with the specified properties.
|
void |
setBasePath(String aBasePath)
Deprecated.
Sets the directory to be used as base path for the source files that contain the data of the tiles.
|
void |
setTileDecoder(ILcdTileDecoder aTileDecoder)
Deprecated.
Sets the tile decoder to use for decoding the tiles from the source files.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
public static final String NO_OF_TILE_ROWS
ALcdTileProvider
.public static final String NO_OF_TILE_COLUMNS
ALcdTileProvider
.public boolean isTraceOn()
true
if tracing is enabled for this class.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 void setBasePath(String aBasePath)
setBasePath
in interface ILcdTileProvider
aBasePath
- the directory that is the base path for the source files containing the data of the tiles.getBasePath()
public String getBasePath()
setBasePath(java.lang.String)
public void setTileDecoder(ILcdTileDecoder aTileDecoder)
ILcdTileProvider
setTileDecoder
in interface ILcdTileProvider
aTileDecoder
- the decoder to use for decoding an individual tile.public int getNoOfRows()
ILcdTileProvider
getNoOfRows
in interface ILcdTileProvider
public int getNoOfCols()
ILcdTileProvider
getNoOfCols
in interface ILcdTileProvider
public ILcd2DBoundsInteractable getTile(int aRow, int aCol)
ILcdTileProvider
null
is returned.getTile
in interface ILcdTileProvider
aRow
- the row number of the tile to be returned.aCol
- the column number of the tile to be returned.public void loadProperties(String aPrefix, Properties aProperties)
This abstract implementation only gets the properties that specify the number of
rows and the number of columns. Overwrite this method to load properties
that are specific to your ILcdTileProvider
implementation.
First call super.loadProperties
to get the number of rows and
columns.
loadProperties
in interface ILcdTileProvider
aPrefix
- a prefix that is used for the properties of this tile provider.aProperties
- the properties to initialize this tile provider with.protected abstract String createTileSourceName(int aRow, int aColumn)
null
if no tile exists for the
specified (row, column) combination.aRow
- the row number of the tile.aColumn
- the column number of the tile.null
if no tile exists for the
specified (row, column) combination..