## 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

addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void

### Parameters

listener - a PropertyChangeListener

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## 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

getSquishedThumbnail( ) → java.awt.image.BufferedImage

### Returns:

java.awt.image.BufferedImage
[search for examples] [view on GitHub] [view on old javadoc]
getSquishedThumbnail( boolean loadIfNeeded ) → java.awt.image.BufferedImage [view source]

## getStatus

getStatus( ) → org.autoplot.pngwalk.WalkImage.Status

### Returns:

org.autoplot.pngwalk.WalkImage.Status
[search for examples] [view on GitHub] [view on old javadoc]

## getThumbnail

getThumbnail( ) → java.awt.image.BufferedImage

### Returns:

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

## 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

getThumbnailDimension( boolean loadIfNeeded ) → java.awt.Dimension

### Parameters

loadIfNeeded - a boolean

### Returns:

java.awt.Dimension
[search for examples] [view on GitHub] [view on old javadoc]

## 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

getUri( ) → java.net.URI

### Returns:

java.net.URI
[search for examples] [view on GitHub] [view on old javadoc]

## 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

removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void

### Parameters

listener - a PropertyChangeListener

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## 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

setCaption( String caption ) → void

### Parameters

caption - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## setDatumRange

setDatumRange( DatumRange dr ) → void

### Parameters

dr - a DatumRange

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## toString

toString( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc]

## 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]