Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jimi.core
Class JimiDecodingController

    java.lang.Object
      |
      +--com.sun.jimi.core.JimiDecodingController

public class JimiDecodingController
extends java.lang.Object

JimiDecodingController is the object used to control image decoding from outside the decoder itself. Because Jimi's loading model supports fully asynchronous operation, the JimiDecodingController is used to coordinate with the decoder to meet certain checkpoints, such as making image dimensions available, or decoding all pixel information. JimiDecodingController gives fine grained control, being in charge of deciding when pixel data should actually be decoded. Decoder implementations will be blocked from storing their pixel information until either: - An ImageConsumer has been registered with the JimiImage provided by a JimiDecodingController or - Decoding has been explicitly requested using the requestDecoding() method of JimiDecodingController. This setup supports multicasting pixel information directly to the first ImageConsumer by allowing it to be registered before driving the decoder, as well as having pixels decoded into a JimiImage independently of ImageConsumers. The JimiImage registered with a JimiDecodingController is typically a JimiImageHandle acting as a Future for the image which the decoder will create to enable completely asynchronous operation.

See Also:
  `JimiImageHandle`

Field Summary
`protected boolean` | `decodingAllowed`
`protected JimiImage` | `jimiImage` the JimiImage being decoded
`protected ProgressListener` | `progressListener`

Constructor Summary
`JimiDecodingController(JimiImage ji)`

Method Summary
`JimiImage` | `getJimiImage()`
`ProgressListener` | `getProgressListener()` Get the progress listener.
`boolean` | `hasProgressListener()` Check whether there is a progress listener monitoring decoding.
`void` | `requestDecoding()` Request that decoding begin.
`void` | `setProgressListener(ProgressListener listener)` Set a progress listener to monitor the decoding.
`void` | `waitDecodingRequest()` Wait until a request for decoding is received.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### jimiImage

    protected JimiImage jimiImage

  the JimiImage being decoded

### progressListener

    protected ProgressListener progressListener

### decodingAllowed

    protected boolean decodingAllowed

Constructor Detail

### JimiDecodingController

    public JimiDecodingController(JimiImage ji)

Method Detail

### getJimiImage

    public JimiImage getJimiImage()

### waitDecodingRequest

    public void waitDecodingRequest()

  Wait until a request for decoding is received.

### requestDecoding

    public void requestDecoding()

  Request that decoding begin.

### setProgressListener

    public void setProgressListener(ProgressListener listener)

  Set a progress listener to monitor the decoding.
  Parameters:
    `listener` - the listener

### getProgressListener

    public ProgressListener getProgressListener()

  Get the progress listener.
  Returns:
    the listener, or null if not set

### hasProgressListener

    public boolean hasProgressListener()

  Check whether there is a progress listener monitoring decoding.
  Returns:
    true if a progress listener is set

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD