ilog.views.tiling
Interface IlvTileLoader

All Superinterfaces:
IlvPersistentObject
All Known Implementing Classes:
IlvDefaultObjectSDOTileLoader, IlvDefaultSDOTileLoader, IlvImageTileLoader, IlvImageTileLoader, IlvMapTileLoader, IlvMultiTileLoader, IlvRasterSubsamplingLoader, IlvRasterTileLoader, IlvRegionOfInterestTileLoader, IlvSDOTileLoader, IlvShapeFileTileLoader, IlvThreadedTileLoader

public interface IlvTileLoader
extends IlvPersistentObject

This interface is used to load a tile for an 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 
    }
  }
 

Since:
ILOG JViews 3.0
See Also:
IlvTileController.setTileLoader(ilog.views.tiling.IlvTileLoader), IlvTiledLayer.setTileLoader(ilog.views.tiling.IlvTileLoader)

Method Summary
 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
 

Method Detail

load

void load(IlvTile tile)
          throws Exception
Function called when a tile has to be loaded. When the tile loader has finished its operation, it should call the function IlvTile.loadComplete to notify the tile listeners.

Throws:
Exception

release

void release(IlvTile tile)
Function called when a tile has to be released.


isPersistent

boolean isPersistent()
Returns true if the object must be saved by a tile controller.


write

void write(IlvOutputStream stream)
           throws IOException
Writes the tile loader to an IlvOutputStream

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.