|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.joglutils.msg.test.BasicFetcher<IDENT>
public class BasicFetcher<IDENT>
Basic implementation of Fetcher using ImageIO and a single-threaded ExecutorService.
Constructor Summary | |
---|---|
BasicFetcher()
|
Method Summary | |
---|---|
void |
addProgressListener(ProgressListener listener)
Adds a progress listener to this Fetcher. |
void |
cancelDownload(Object imageDescriptor,
IDENT clientIdentifier,
int requestedImageSize)
Cancels a previously-registered download request from this Fetcher -- one which resulted in null being returned from getImage(). |
BufferedImage |
getImage(Object imageDescriptor,
IDENT clientIdentifier,
int requestedImageSize)
Requests the particular image associated with the given element (of arbitrary type) from the ListModel of the ImageBrowser. |
void |
removeProgressListener(ProgressListener listener)
Removes a progress listener from this Fetcher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicFetcher()
Method Detail |
---|
public BufferedImage getImage(Object imageDescriptor, IDENT clientIdentifier, int requestedImageSize)
Fetcher
requestedImageSize
parameter
indicates the desired maximum dimension (width or height) of
the returned image. Passing a negative number for this
parameter results in always fetching the full-size image.
Fetchers that perform their work asynchronously will return
null if the image is not available immediately. In this case,
progress callbacks will be fired promptly to allow the caller
to display an indication of download progress.
getImage
in interface Fetcher<IDENT>
public void cancelDownload(Object imageDescriptor, IDENT clientIdentifier, int requestedImageSize)
Fetcher
cancelDownload
in interface Fetcher<IDENT>
public void addProgressListener(ProgressListener listener)
Fetcher
addProgressListener
in interface Fetcher<IDENT>
public void removeProgressListener(ProgressListener listener)
Fetcher
removeProgressListener
in interface Fetcher<IDENT>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |