ilog.views.tiling
Class IlvFreeTile

java.lang.Object
  extended by ilog.views.tiling.IlvTile
      extended by ilog.views.tiling.IlvFreeTile
All Implemented Interfaces:
IlvPersistentObject
Direct Known Subclasses:
IlvMapFreeTile

public class IlvFreeTile
extends IlvTile
implements IlvPersistentObject

A tile represents an elementary rectangular area that is loaded or released when needed by the application. Tiles are managed by an IlvTileController.

The tile controller has two modes: grid mode or free mode. In grid mode, the tiles are organized in rows and columns. Tiles of class IlvTile are allocated automatically in this mode as needed. In free mode, the tiles have no special organization but are just a collection of rectangles. In free mode, tiles of class IlvFreeTile must be added to the tile controller before the tiling can starts.

Since the IlvFreeTile is only used in free mode of the tile controller, the row and column index of the tile has no meaning.

Since:
JViews 7.5
See Also:
IlvTile, IlvTileController, IlvTiledLayer

Field Summary
 
Fields inherited from class ilog.views.tiling.IlvTile
CACHED, EMPTY, LOCKED
 
Constructor Summary
IlvFreeTile(IlvInputStream stream)
          Constructs a tile from an IlvInputStream..
IlvFreeTile(Point2D tileP1, Point2D tileP2, IlvTileController controller)
          Constructs a free tile whose bounds are specified.
IlvFreeTile(Point2D tileP1, Point2D tileP2, IlvTileController controller, int row, int column)
          Constructs a free tile whose bounds are specified.
 
Method Summary
 void boundingBox(IlvRect rect)
          Returns the bounding box of the tile in the manager coordinate system.
 void boundingPoints(Point2D.Double p1, Point2D.Double p2)
          Sets the bounding box of the tile.
 void deleteAll()
          Empties the tile except for the objects that are shared by another non empty tile.
 boolean equals(Object o)
          Returns true if the tile is equal to the object.
 int hashCode()
          Returns the hash code of the tile.
 boolean isObjectShared(IlvGraphic object)
          Returns true if the object is shared by other tiles.
 boolean isPersistent()
          Returns true if the object must be saved by a tile controller.
 void reDraw()
          Redraws a tile.
 String toString()
          Returns the tile description
 void write(IlvOutputStream stream)
          Writes the tile loader to an IlvOutputStream
 
Methods inherited from class ilog.views.tiling.IlvTile
addObject, getColumn, getController, getLocks, getObject, getRow, getStatus, isLoadComplete, loadComplete, notifyError, removeObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvFreeTile

public IlvFreeTile(Point2D tileP1,
                   Point2D tileP2,
                   IlvTileController controller)
Constructs a free tile whose bounds are specified. The tile is created to be used with the specified tile controller.


IlvFreeTile

public IlvFreeTile(Point2D tileP1,
                   Point2D tileP2,
                   IlvTileController controller,
                   int row,
                   int column)
Constructs a free tile whose bounds are specified. The tile is created to be used with the specified tile controller.


IlvFreeTile

public IlvFreeTile(IlvInputStream stream)
            throws IlvReadFileException
Constructs a tile from an IlvInputStream..

Throws:
IlvReadFileException
Method Detail

boundingBox

public void boundingBox(IlvRect rect)
Returns the bounding box of the tile in the manager coordinate system.

Overrides:
boundingBox in class IlvTile

boundingPoints

public void boundingPoints(Point2D.Double p1,
                           Point2D.Double p2)
Sets the bounding box of the tile.

Parameters:
p1 - a point defining x and y min of the box
p2 - a point defining x and y max of the box

equals

public boolean equals(Object o)
Returns true if the tile is equal to the object.

Overrides:
equals in class IlvTile
Parameters:
o - The object to compare with the tile

hashCode

public int hashCode()
Returns the hash code of the tile.

Overrides:
hashCode in class IlvTile

deleteAll

public void deleteAll()
Empties the tile except for the objects that are shared by another non empty tile. This method must be called only if the tile controller is attached to a layer.

Overrides:
deleteAll in class IlvTile

reDraw

public void reDraw()
Redraws a tile. Should be called only if the tile is attached to a layer.

Overrides:
reDraw in class IlvTile

isObjectShared

public boolean isObjectShared(IlvGraphic object)
Returns true if the object is shared by other tiles. This method must be called only if the tile controller is attached to a layer.

Overrides:
isObjectShared in class IlvTile
Parameters:
object - The graphic object

toString

public String toString()
Returns the tile description

Overrides:
toString in class IlvTile

isPersistent

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


write

public 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.   . All Rights Reserved.