Interface TileRequest


public interface TileRequest
Interface representing a TileScheduler request to compute a specific set of tiles for a given image with optional monitoring by TileComputationListeners.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Status value indicating that the tile computation has been cancelled.
    static final int
    Status value indicating that the tile has been computed successfully.
    static final int
    Status value indicating that the tile computation failed.
    static final int
    Status value indicating that the tile has yet to be processed.
    static final int
    Status value indicating that the tile has is being processed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancelTiles(Point[] tileIndices)
    Issues a request to the TileScheduler which generated this TileRequest to cancel all tiles in the supplied parameter array which are associated with this request.
    Returns the image associated with the request.
    Returns the tile indices of all tiles associated with the request.
    Returns the array of TileComputationListeners specified as monitoring the request.
    int
    getTileStatus(int tileX, int tileY)
    Returns one of the TILE_STATUS_* constants defined in this interface to indicate the status of the specified tile (optional operation).
    boolean
    Whether this TileRequest implementation supports the getTileStatus() method.
  • Field Details

    • TILE_STATUS_PENDING

      static final int TILE_STATUS_PENDING
      Status value indicating that the tile has yet to be processed.
      See Also:
    • TILE_STATUS_PROCESSING

      static final int TILE_STATUS_PROCESSING
      Status value indicating that the tile has is being processed.
      See Also:
    • TILE_STATUS_COMPUTED

      static final int TILE_STATUS_COMPUTED
      Status value indicating that the tile has been computed successfully.
      See Also:
    • TILE_STATUS_CANCELLED

      static final int TILE_STATUS_CANCELLED
      Status value indicating that the tile computation has been cancelled.
      See Also:
    • TILE_STATUS_FAILED

      static final int TILE_STATUS_FAILED
      Status value indicating that the tile computation failed.
      See Also:
  • Method Details

    • getImage

      PlanarImage getImage()
      Returns the image associated with the request. This is the image which is actually specified to the TileScheduler. For most PlanarImages (including OpImages) this will be the image on which queueTiles() was invoked; for RenderedOp nodes this will be the rendering of the node.
    • getTileIndices

      Point[] getTileIndices()
      Returns the tile indices of all tiles associated with the request.
    • getTileListeners

      TileComputationListener[] getTileListeners()
      Returns the array of TileComputationListeners specified as monitoring the request. The returned value should be null if there are no such listeners.
    • isStatusAvailable

      boolean isStatusAvailable()
      Whether this TileRequest implementation supports the getTileStatus() method.
    • getTileStatus

      int getTileStatus(int tileX, int tileY)
      Returns one of the TILE_STATUS_* constants defined in this interface to indicate the status of the specified tile (optional operation). Implementations for which status is available, i.e., for which isStatusAvailable() returns true, may but are not required to support all status levels defined by this interface. The status levels must however be a subset of those herein defined.
      Parameters:
      tileX - The X index of the tile in the tile array.
      tileY - The Y index of the tile in the tile array.
      Throws:
      UnsupportedOperationException - if isStatusAvailable() returns false.
      IllegalArgumentException - if the specified tile is not associated with this request.
    • cancelTiles

      void cancelTiles(Point[] tileIndices)
      Issues a request to the TileScheduler which generated this TileRequest to cancel all tiles in the supplied parameter array which are associated with this request. Any tiles in the array which are not associated with this request will be ignored. If the parameter is null a request to cancel all tiles in the request will be issued. This method should merely be a convenience wrapper around the cancelTiles() method of the TileScheduler which created the TileRequest.