ilog.views.maps.format.cadrg
Class IlvCADRGLayer

java.lang.Object
  extended by ilog.views.IlvIndexedSet
      extended by ilog.views.IlvManagerLayer
          extended by ilog.views.tiling.IlvTiledLayer
              extended by ilog.views.maps.format.cadrg.IlvCADRGLayer
All Implemented Interfaces:
IlvPersistentObject, Serializable

public class IlvCADRGLayer
extends IlvTiledLayer

This class implements a CADRG layer that displays a CADRG coverage using the load-on-demand mechanism. This layer reads a CADRG coverage and loads automatically the frames that are visible in the views associated with its manager. It unloads the frames that are not visible.

IlvCADRGLayer works only with a geographic coordinate system.

Since:
ILOG JViews 3.0
See Also:
IlvGeographicCoordinateSystem, Serialized Form

Constructor Summary
IlvCADRGLayer(IlvCADRGCoverage coverage)
          Creates an instance of IlvCADRGLayer.
IlvCADRGLayer(IlvCADRGCoverage coverage, IlvTileCache cache)
          Creates an instance of IlvCADRGLayer.
IlvCADRGLayer(IlvInputStream stream)
          Reads the layer from the specified input stream.
 
Method Summary
 IlvFeatureRenderer getImageRenderer()
          Returns the feature renderer used for creating graphic objects representing the CADRG subframes.
 float getPreferredScale()
          Returns the scale at which a pixel on the screen corresponds to a pixel on a CADRG image.
 boolean isTransparencyEnabled()
          Returns true if the frame reader creates transparent pixels.
 void setImageRenderer(IlvFeatureRenderer renderer)
          Sets the feature renderer used for creating graphic objects representing the CADRG subframes.
 void setTransparencyEnabled(boolean transparency)
          If true, the CADRG frame reader creates transparent pixels.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.tiling.IlvTiledLayer
computeBBox, disconnect, draw, fitTransformerToTile, fitTransformerToTile, getDebugView, getSize, getTileController, getTileLoader, ignoreView, initTileOrigin, isIgnoringView, isVisible, setDebugView, setDebugView, setManager, setSize, setTileLoader
 
Methods inherited from class ilog.views.IlvManagerLayer
addVisibilityFilter, drawImpl, getAlpha, getIndex, getManager, getName, getNamedProperty, getProperty, getVisibilityFilters, isSelectable, isTemporarilyHidden, isVisible, print, removeNamedProperty, removeVisibilityFilter, setAlpha, setName, setNamedProperty, setProperty, writeIt
 
Methods inherited from class ilog.views.IlvIndexedSet
addObject, afterUpdate, beforeUpdate, collectObjects, deleteAll, getCardinal, getElements, getIndex, getManagers, getManagersCount, getObject, getObject, getSubsequentRemoveThreshold, isQuadtreeEnabled, map, mapInside, mapInside, mapIntersects, mapIntersects, removeObject, setIndex, setQuadtreeEnabled, setSubsequentRemoveThreshold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvCADRGLayer

public IlvCADRGLayer(IlvCADRGCoverage coverage)
Creates an instance of IlvCADRGLayer. This constructor uses a cache that will be shared by all the IlvCADRGLayer instances initialized by means of this default constructor.

Parameters:
coverage - The coverage of the layer

IlvCADRGLayer

public IlvCADRGLayer(IlvCADRGCoverage coverage,
                     IlvTileCache cache)
Creates an instance of IlvCADRGLayer.

Parameters:
coverage - The coverage of the layer
cache - The cache managing the release operations for the unused frames.

IlvCADRGLayer

public IlvCADRGLayer(IlvInputStream stream)
              throws IlvReadFileException
Reads the layer from the specified input stream.

Parameters:
stream - The input stream
Throws:
IlvReadFileException - if an error occurs while reading the data.
Method Detail

setTransparencyEnabled

public void setTransparencyEnabled(boolean transparency)
If true, the CADRG frame reader creates transparent pixels.


isTransparencyEnabled

public boolean isTransparencyEnabled()
Returns true if the frame reader creates transparent pixels.


setImageRenderer

public void setImageRenderer(IlvFeatureRenderer renderer)
Sets the feature renderer used for creating graphic objects representing the CADRG subframes. The image renderer must support the IlvMapImage geometry.

Parameters:
renderer - The feature renderer to be used

getImageRenderer

public IlvFeatureRenderer getImageRenderer()
Returns the feature renderer used for creating graphic objects representing the CADRG subframes. By default, it is a IlvDefaultImageRenderer.


getPreferredScale

public float getPreferredScale()
Returns the scale at which a pixel on the screen corresponds to a pixel on a CADRG image.


write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvTiledLayer
Parameters:
stream - the output stream
Throws:
IOException - if an errors occurs while writing the data.


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