public abstract class ImageContainer
extends java.lang.Object
implements android.view.View.OnTouchListener, android.view.GestureDetector.OnGestureListener, android.view.ScaleGestureDetector.OnScaleGestureListener, android.view.View.OnLayoutChangeListener
Modifier and Type | Field and Description |
---|---|
static java.io.FilenameFilter |
JPEG_FilenameFilter |
static java.io.FilenameFilter |
NITF_FilenameFilter |
static java.util.Comparator<NITFGraphics> |
NITF_Z_Comparator |
Modifier | Constructor and Description |
---|---|
protected |
ImageContainer(android.content.Context context,
MapView view)
The context in this case is required to also be an activity.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected android.content.Context |
getContext() |
abstract java.lang.String |
getCurrentImageUID() |
abstract java.lang.String |
getCurrentImageURI() |
protected java.util.concurrent.ExecutorService |
getExecutor() |
protected java.lang.String |
getFormattedLocation(GeoPoint loc) |
protected android.view.LayoutInflater |
getInflater() |
protected android.view.View |
getLayout() |
protected MapView |
getMapView() |
protected static android.graphics.Bitmap |
getOrientedImage(android.graphics.Bitmap bmp,
TiffImageMetadata exif) |
android.view.View |
getView() |
boolean |
nextImage() |
protected abstract boolean |
nextImageImpl() |
protected static int |
nextPowerOf2(int v) |
boolean |
onDown(android.view.MotionEvent e) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float vX,
float vY) |
void |
onLayoutChange(android.view.View view,
int left,
int top,
int right,
int bottom,
int oldLeft,
int oldTop,
int oldRight,
int oldBottom) |
void |
onLongPress(android.view.MotionEvent e) |
boolean |
onScale(android.view.ScaleGestureDetector detector) |
boolean |
onScaleBegin(android.view.ScaleGestureDetector detector) |
void |
onScaleEnd(android.view.ScaleGestureDetector detector) |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float dX,
float dY) |
void |
onShowPress(android.view.MotionEvent e) |
boolean |
onSingleTapUp(android.view.MotionEvent e) |
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event) |
protected void |
populateEXIFData(android.view.View layout,
java.io.File bmpFile) |
protected void |
populateEXIFData(android.view.View layout,
TiffImageMetadata exif) |
protected void |
populateNITFMetadata(android.view.View layout,
Dataset nitf) |
boolean |
prevImage() |
protected abstract boolean |
prevImageImpl() |
static android.graphics.Bitmap |
readNITF(java.io.File nitfFile) |
static android.graphics.Bitmap |
readNITF(java.io.File nitfFile,
int maxPixels)
Read in a NITF file w/ overlays and convert to a single bitmap
|
protected abstract void |
refreshView() |
protected void |
removeSensorFOV() |
protected void |
runOnUiThread(java.lang.Runnable r) |
abstract boolean |
setCurrentImageByUID(java.lang.String imageUID)
Tries to set the current image to one having the supplied UID.
|
abstract boolean |
setCurrentImageByURI(java.lang.String imageURI)
Tries to set the current image to one having the supplied URI.
|
protected void |
setTouchListener(android.widget.ImageView viewer) |
void |
stop() |
public static final java.io.FilenameFilter JPEG_FilenameFilter
public static final java.io.FilenameFilter NITF_FilenameFilter
public static final java.util.Comparator<NITFGraphics> NITF_Z_Comparator
protected ImageContainer(android.content.Context context, MapView view)
public void dispose()
public abstract java.lang.String getCurrentImageUID()
public abstract java.lang.String getCurrentImageURI()
public android.view.View getView()
public boolean nextImage()
public boolean prevImage()
public static android.graphics.Bitmap readNITF(java.io.File nitfFile, int maxPixels)
nitfFile
- NITF filemaxPixels
- Maximum pixels to read in/outputpublic static android.graphics.Bitmap readNITF(java.io.File nitfFile)
public abstract boolean setCurrentImageByUID(java.lang.String imageUID)
imageUID
- UID of image to set as the current image.public abstract boolean setCurrentImageByURI(java.lang.String imageURI)
imageURI
- URI of image to set as the current image.public void stop()
protected android.content.Context getContext()
protected java.util.concurrent.ExecutorService getExecutor()
protected android.view.LayoutInflater getInflater()
protected android.view.View getLayout()
protected MapView getMapView()
protected void runOnUiThread(java.lang.Runnable r)
protected static android.graphics.Bitmap getOrientedImage(android.graphics.Bitmap bmp, TiffImageMetadata exif)
protected abstract boolean nextImageImpl()
protected static int nextPowerOf2(int v)
protected void populateEXIFData(android.view.View layout, java.io.File bmpFile)
protected void populateEXIFData(android.view.View layout, TiffImageMetadata exif)
protected void populateNITFMetadata(android.view.View layout, Dataset nitf)
protected java.lang.String getFormattedLocation(GeoPoint loc)
protected abstract boolean prevImageImpl()
protected abstract void refreshView()
protected void removeSensorFOV()
protected void setTouchListener(android.widget.ImageView viewer)
public void onLayoutChange(android.view.View view, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
onLayoutChange
in interface android.view.View.OnLayoutChangeListener
public boolean onTouch(android.view.View v, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
public void onShowPress(android.view.MotionEvent e)
onShowPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp
in interface android.view.GestureDetector.OnGestureListener
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float dX, float dY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float vX, float vY)
onFling
in interface android.view.GestureDetector.OnGestureListener
public boolean onScale(android.view.ScaleGestureDetector detector)
onScale
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public boolean onScaleBegin(android.view.ScaleGestureDetector detector)
onScaleBegin
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public void onScaleEnd(android.view.ScaleGestureDetector detector)
onScaleEnd
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public void onLongPress(android.view.MotionEvent e)
onLongPress
in interface android.view.GestureDetector.OnGestureListener