public interface IlvTileLoader extends IlvPersistentObject
IlvTileController
or an IlvTiledLayer
.
The following example shows a tile loader that fills a tile with a generated list of graphic objects.
class SimpleTileLoader implements IlvTileLoader { public void load(IlvTile tile) { IlvRect rect = new IlvRect(); tile.boundingBox(rect); IlvPoint p = new IlvPoint(); p.x = rect.x; for (int i = 0; i < 10; i++) { p.y = rect.y; for (int j = 0; j < 10; j++) { tile.addObject(new IlvMarker(p, IlvMarker.IlvMarkerPlus), null); p.y += rect.height / 10; } p.x += rect.width / 10; } tile.loadComplete(); } public void release(IlvTile tile) { tile.deleteAll(); } public boolean isPersistent() { return false; } public void write(IlvOutputStream stream) { // do nothing } }
IlvTileController.setTileLoader(ilog.views.tiling.IlvTileLoader)
,
IlvTiledLayer.setTileLoader(ilog.views.tiling.IlvTileLoader)
Modifier and Type | Method and Description |
---|---|
boolean |
isPersistent()
Returns true if the object must be saved by a tile controller.
|
void |
load(IlvTile tile)
Function called when a tile has to be loaded.
|
void |
release(IlvTile tile)
Function called when a tile has to be released.
|
void |
write(IlvOutputStream stream)
Writes the tile loader to an
IlvOutputStream |
void load(IlvTile tile) throws Exception
IlvTile.loadComplete
to notify the
tile listeners.Exception
void release(IlvTile tile)
boolean isPersistent()
void write(IlvOutputStream stream) throws IOException
IlvOutputStream
write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.