## org.autoplot.pngwalk.WalkImage

A class to manage an image for the PNGWalk tool. Handles downloading and thumbnail generation.

## WalkImage( java.net.URI uri, boolean haveThumbs400 )

## PROP_STATUS_CHANGE

## PROP_BADGE_CHANGE

## THUMB_SIZE

## addObserver

addObserver( org.autoplot.pngwalk.PngWalkView obs ) → void

mark this image as one which is being used.

### Parameters

obs - a PngWalkView

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void [view source]

## getCaption

getCaption( ) → String

the text displayed along with the image

### Returns:

a String
[search for examples] [view on GitHub] [view on old javadoc]

## getDatumRange

getDatumRange( ) → DatumRange

get the time range for the image, or null if the timerange cannot be inferred.

### Returns:

a DatumRange
[search for examples] [view on GitHub] [view on old javadoc]

## getImage

getImage( ) → java.awt.image.BufferedImage

return the image, or the missing image should the image be missing.

### Returns:

a java.awt.image.BufferedImage
[search for examples] [view on GitHub] [view on old javadoc]

## getInitLoadBirthTime

getInitLoadBirthTime( ) → long

get the time that the image load was triggered.

### Returns:

the time in millis, to be compared to System.currentTimeMillis.
[search for examples] [view on GitHub] [view on old javadoc]
getSquishedThumbnail( ) → java.awt.image.BufferedImage [view source]
getSquishedThumbnail( boolean loadIfNeeded ) → java.awt.image.BufferedImage [view source]
getStatus( ) → org.autoplot.pngwalk.WalkImage.Status [view source]
getThumbnail( ) → java.awt.image.BufferedImage [view source]

## getThumbnail

getThumbnail( int w, int h, boolean waitOk ) → java.awt.image.BufferedImage

returns the thumbnail if available, or if waitOk is true then it computes it. Otherwise PngWalkView.loadingImage is returned.

### Parameters

w - width in pixels of the thumbnail image
h - height in pixels of the thumbnail image
waitOk - if true, block execution until image is ready. Otherwise a loading image might be returned.

### Returns:

image or PngWalkView.loadingImage
[search for examples] [view on GitHub] [view on old javadoc]
getThumbnail( boolean loadIfNeeded ) → java.awt.image.BufferedImage [view source]
getThumbnailDimension( boolean loadIfNeeded ) → java.awt.Dimension [view source]

## getThumbnailImmediately

getThumbnailImmediately( ) → void

attempt to create the thumbnail on the current thread. If there is no "thumbs400" directory and the image is not yet loaded, then no action takes place.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]
getUri( ) → java.net.URI [view source]

## hasObservers

hasObservers( ) → boolean

true if some view can see this image's thumbnail or the image.

### Returns:

a boolean
[search for examples] [view on GitHub] [view on old javadoc]

## readImage

readImage( java.io.File f ) → java.awt.image.BufferedImage

return a file, that is never type=0. This was a bug on Windows.

### Parameters

f - a File

### Returns:

a java.awt.image.BufferedImage
[search for examples] [view on GitHub] [view on old javadoc]

## removeObserver

removeObserver( org.autoplot.pngwalk.PngWalkView obs ) → void

remove this observer from the list of observers

### Parameters

obs - a PngWalkView

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void [view source]

## rotateImage

rotateImage( java.awt.image.BufferedImage img, int angle ) → java.awt.image.BufferedImage

rotate an image, unlike the rotate found in ImageDataSource, this will resize the image when the rotation is 90 degrees.

### Parameters

img - the image
angle - the angle to rotate clockwise, in degrees.

### Returns:

the rotated image.
[search for examples] [view on GitHub] [view on old javadoc]
setCaption( String caption ) → void [view source]
setDatumRange( DatumRange dr ) → void [view source]
toString( ) → String [view source]

## waitForImage

waitForImage( ) → java.awt.image.BufferedImage

contain logic which will wait for the image to load.

### Returns:

the image, or missingImage.
[search for examples] [view on GitHub] [view on old javadoc]