Package org.eclipse.imagen
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStatus value indicating that the tile computation has been cancelled.static final intStatus value indicating that the tile has been computed successfully.static final intStatus value indicating that the tile computation failed.static final intStatus value indicating that the tile has yet to be processed.static final intStatus value indicating that the tile has is being processed. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelTiles(Point[] tileIndices) Issues a request to theTileSchedulerwhich generated thisTileRequestto cancel all tiles in the supplied parameter array which are associated with this request.getImage()Returns the image associated with the request.Point[]Returns the tile indices of all tiles associated with the request.Returns the array ofTileComputationListeners specified as monitoring the request.intgetTileStatus(int tileX, int tileY) Returns one of theTILE_STATUS_*constants defined in this interface to indicate the status of the specified tile (optional operation).booleanWhether thisTileRequestimplementation supports thegetTileStatus()method.
-
Field Details
-
TILE_STATUS_PENDING
static final int TILE_STATUS_PENDINGStatus value indicating that the tile has yet to be processed.- See Also:
-
TILE_STATUS_PROCESSING
static final int TILE_STATUS_PROCESSINGStatus value indicating that the tile has is being processed.- See Also:
-
TILE_STATUS_COMPUTED
static final int TILE_STATUS_COMPUTEDStatus value indicating that the tile has been computed successfully.- See Also:
-
TILE_STATUS_CANCELLED
static final int TILE_STATUS_CANCELLEDStatus value indicating that the tile computation has been cancelled.- See Also:
-
TILE_STATUS_FAILED
static final int TILE_STATUS_FAILEDStatus 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 theTileScheduler. For mostPlanarImages (includingOpImages) this will be the image on whichqueueTiles()was invoked; forRenderedOpnodes 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 ofTileComputationListeners specified as monitoring the request. The returned value should benullif there are no such listeners. -
isStatusAvailable
boolean isStatusAvailable()Whether thisTileRequestimplementation supports thegetTileStatus()method. -
getTileStatus
int getTileStatus(int tileX, int tileY) Returns one of theTILE_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 whichisStatusAvailable()returnstrue, 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- ifisStatusAvailable()returnsfalse.IllegalArgumentException- if the specified tile is not associated with this request.
-
cancelTiles
Issues a request to theTileSchedulerwhich generated thisTileRequestto 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 isnulla request to cancel all tiles in the request will be issued. This method should merely be a convenience wrapper around thecancelTiles()method of theTileSchedulerwhich created theTileRequest.
-