com.partnersoft.v3x.apps.MapBrowser.image
Class TiledImageStore

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.image.TiledImageStore
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FileSystemImageStore

public abstract class TiledImageStore
extends java.lang.Object
implements java.io.Serializable

A TiledImageStore is responsible for locating and returning Images based on their SheetCoord. Implementations can perform this in a variety of ways and pull their data from a variety of sources. It also encapsulates the knowledge of the database's extents - for any given SheetCoord, it knows whether an image exists.

See Also:
Serialized Form

Constructor Summary
TiledImageStore()
           
 
Method Summary
 void convertFromSourceDataUnits()
          Converts the ImageStore to think in terms of destination (i.e.
 void convertToSourceDataUnits()
          Converts the ImageStore to think in terms of source data units by applying the sourceDataScalingFactor to each rendered scale.
 int getCacheSize()
           
 java.awt.Image getImage(SheetCoord coord)
          Returns the Image associated with a SheetCoord.
abstract  java.awt.Image getImageImpl(SheetCoord coords)
          For subclasses; fetch an Image however appropriate (but avoid caching if possible; this class handles that for you!
 java.lang.String getPath()
          The base path.
 java.util.ArrayList getRenderedScales()
           
 double getSourceDataScalingFactor()
          Amount to multiply dimensions and scales by to match original source data (e.g.
abstract  boolean imageExists(SheetCoord coords)
          Returns true if an image is available for the given SheetCoord.
 int indexFor(Scale scaley)
          Return the index for the scale given.
 boolean isPreloading()
           
 RenderedScale renderedScaleAt(int index)
          Return the RenderedScale for the given index.
 void setCacheSize(int newSize)
           
 void setPath(java.lang.String newPath)
          The base path.
 void setPreloading(boolean tizit)
           
 void setRenderedScales(java.util.ArrayList newScales)
           
 void setSourceDataScalingFactor(double newFactor)
           
 SheetPixelCoord sheetPixelContaining(Coord3D coord, int scaleIndex)
          Return the SheetPixelCoord for the given ground coordinate at the given scale and content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TiledImageStore

public TiledImageStore()
Method Detail

getImage

public java.awt.Image getImage(SheetCoord coord)
Returns the Image associated with a SheetCoord.


getImageImpl

public abstract java.awt.Image getImageImpl(SheetCoord coords)
For subclasses; fetch an Image however appropriate (but avoid caching if possible; this class handles that for you!


imageExists

public abstract boolean imageExists(SheetCoord coords)
Returns true if an image is available for the given SheetCoord.


sheetPixelContaining

public SheetPixelCoord sheetPixelContaining(Coord3D coord,
                                            int scaleIndex)
Return the SheetPixelCoord for the given ground coordinate at the given scale and content.


indexFor

public int indexFor(Scale scaley)
Return the index for the scale given.


renderedScaleAt

public RenderedScale renderedScaleAt(int index)
Return the RenderedScale for the given index.


convertToSourceDataUnits

public void convertToSourceDataUnits()
Converts the ImageStore to think in terms of source data units by applying the sourceDataScalingFactor to each rendered scale. Use with caution.


convertFromSourceDataUnits

public void convertFromSourceDataUnits()
Converts the ImageStore to think in terms of destination (i.e. FieldDesigner) units by reversing the process used for convertToSourceDataUnits()


getPath

public java.lang.String getPath()
The base path.


setPath

public void setPath(java.lang.String newPath)
The base path.


getRenderedScales

public java.util.ArrayList getRenderedScales()

setRenderedScales

public void setRenderedScales(java.util.ArrayList newScales)

getCacheSize

public int getCacheSize()

setCacheSize

public void setCacheSize(int newSize)

isPreloading

public boolean isPreloading()

setPreloading

public void setPreloading(boolean tizit)

setSourceDataScalingFactor

public void setSourceDataScalingFactor(double newFactor)

getSourceDataScalingFactor

public double getSourceDataScalingFactor()
Amount to multiply dimensions and scales by to match original source data (e.g. AutoCAD DWGs). Use this to do things like inch-foot conversions (a scaling factor of 12) or meter-foot conversions (a scaling factor of 0.3048 or 0.3048006096012 depending on your source data, see http://www.wsdot.wa.gov/Metrics/ftmtr2.htm). Default is 1.