Java Doc for JAI.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.JAI

JAI
final public class JAI (Code)
A convenience class for instantiating operations.

This class allows programmers to use the syntax:

 import javax.media.jai.JAI;
 RenderedOp im = JAI.create("convolve", paramBlock, renderHints);
 
to create new images or collections by applying operators. The create() method returns a RenderedOp encapsulating the operation name, parameter block, and rendering hints. Additionally, it performs validity checking on the operation parameters. Programmers may also refer to JAI.createCollection("opname", paramBlock, renderHints), JAI.createRenderable("opname", paramBlock, renderHints), and JAI.createRenderableCollection("opname", paramBlock, renderHints).

If the OperationDescriptor associated with the named operation returns true from its isImmediate() method, the JAI.createNS() method will ask the RenderedOp it constructs to render itself immediately. If this rendering is null, createNS() will itself return null rather than returning an instance of RenderedOp as it normally does.

It is possible to create new instances of theJAIclass in order to control each instance's registry, tile cache, and tile scheduler individually. Most users will want to use only the static methods of this class, which perform all operations on a default instance, which in turn makes use of a default registry. To create a new image or collection on a non-default JAI instance, the createNS() and createCollectionNS (NS being short for "non-static") methods are used.

The JAI class contains convenience methods for a number of common argument list formats. These methods perform the work of constructing a ParameterBlock automatically. The convenience methods are available only in static form and make use of the default instance. When operating with a specific instance, the general, non-static functions createNS() and createCollectionNS() should be used. All of the convenience methods operate by calling createNS() on the default JAI instance, and thus inherit the semantics of that method with regard to immediate rendering.

The registry being used by a particular instance may be retrieved or set using the getOperationRegistry() and setOperationRegistry() methods, respectively. Only advanced users should attempt to set the registry. The tile cache and tile scheduler being used by a particular instance may likewise be set or retrieved using the methods setTileCache(), setTileScheduler(), getTileCache(), or getTileScheduler().

Each instance of JAI contains a set of rendering hints which will be used for all image or collection creations. These hints are merged with any hints supplied to the create method; directly supplied hints take precedence over the common hints. When a new JAI instance is constructed, its hints are initialized to a copy of the hints associated with the default instance. When the default instance is constructed, hints for the default registry, tile cache, and tile scheduler are added to the set of common rendering hints. Similarly, invoking setOperationRegistry(), setTileCache(), or setTileScheduler() on a JAI instance will cause the respective entity to be added to the common rendering hints. The hints associated with any instance, including the default instance, may be manipulated using the getRenderingHints(), setRenderingHints(), and clearRenderingHints() methods.

An ImagingListener will reside in each instance of JAI. It can be used to listen to (and process) the exceptional situations that occur in the operations and JAI. A default ImagingListener is initially registered which re-throws RuntimeExceptions and prints the error message and the stack trace of other types to System.err. To override this default behavior an instance of an alternate ImagingListener implementation should be registered using JAI.setImagingListener .

An ImagingListener also can be attached to a node as a rendering hint, which maps the key KEY_IMAGING_LISTENER. The Throwables which arise in the creation and the rendering of this node will be sent to this ImagingListener (note that those thrown at the top levels such as node creation failure will be handled by the listener registered to the JAI instead.) The default value for this hint will be the one registered to the instance of JAI.


See Also:   OperationRegistry
See Also:   RenderingHints
See Also:   TileScheduler
See Also:   TileCache
See Also:   ImagingListener

Inner Class :static class RenderingKey extends RenderingHints.Key

Field Summary
public static  RenderingHints.KeyKEY_BORDER_EXTENDER
     Key for BorderExtender object values.
public static  RenderingHints.KeyKEY_CACHED_TILE_RECYCLING_ENABLED
     Key for Boolean object values which specify whether automatic recycling of application-visible tiles should occur.
public static  RenderingHints.KeyKEY_COLOR_MODEL_FACTORY
     Key for ColorModelFactory object values.
public static  RenderingHints.KeyKEY_DEFAULT_COLOR_MODEL_ENABLED
     Key for enabling default ColorModel initialization when a valid ColorModel may not be derived by inheritance.
public static  RenderingHints.KeyKEY_DEFAULT_COLOR_MODEL_METHOD
     Key for specifying a method to be used as for default ColorModel initialization.
final public static  RenderingHints.KeyKEY_DEFAULT_RENDERING_SIZE
     Key for the dimensions of a RenderedImage created by invoking createDefaultRendering() on a node of type RenderableOp in a renderable processing chain.
public static  RenderingHints.KeyKEY_IMAGE_LAYOUT
     Key for ImageLayout object values.
public static  RenderingHints.KeyKEY_IMAGING_LISTENER
     Key for the ImagingListener registered to a rendering node.
public static  RenderingHints.KeyKEY_INTERPOLATION
     Key for Interpolation object values.
public static  RenderingHints.KeyKEY_NEGOTIATION_PREFERENCES
     Key for the negotiation preferences to be used to negotiate capabilities to be used in the remote communication.
public static  RenderingHints.KeyKEY_NUM_RETRIES
     Key for the number of retries to be used for dealing with network errors during remote imaging.
public static  RenderingHints.KeyKEY_OPERATION_BOUND
     Key for Integer object values representing whether the operation is compute, network, or I/O bound.
public static  RenderingHints.KeyKEY_OPERATION_REGISTRY
     Key for OperationRegistry object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getOperationRegistry().
public static  RenderingHints.KeyKEY_REPLACE_INDEX_COLOR_MODEL
     Key for enabling changing of destination image's ColorModel to a ComponentColorModel, when the source image has an IndexColorModel.
public static  RenderingHints.KeyKEY_RETRY_INTERVAL
     Key for the retry interval value to be used for dealing with network errors during remote imaging.
public static  RenderingHints.KeyKEY_SERIALIZE_DEEP_COPY
     Key for specifying whether a deep copy of the image data should be used when serializing images.
public static  RenderingHints.KeyKEY_TILE_CACHE
     Key for TileCache object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getTileCache().
public static  RenderingHints.KeyKEY_TILE_CACHE_METRIC
     Key for Tile ordering metric.
public static  RenderingHints.KeyKEY_TILE_CODEC_FORMAT
     Key for specifying the default format to be used for tile serialization via TileCodecs.
public static  RenderingHints.KeyKEY_TILE_DECODING_PARAM
     Key for specifying the default decoding parameters to be used for tile serialization via TileCodecs.
public static  RenderingHints.KeyKEY_TILE_ENCODING_PARAM
     Key for specifying the default encoding parameters to be used for tile serialization via TileCodecs.
public static  RenderingHints.KeyKEY_TILE_FACTORY
     Key for TileFactory object values. The common RenderingHints contain a RecyclingTileFactory -valued hint corresponding to this key.
public static  RenderingHints.KeyKEY_TILE_RECYCLER
     Key for TileRecycler object values. The common RenderingHints contain a RecyclingTileFactory -valued hint corresponding to this key.
public static  RenderingHints.KeyKEY_TILE_SCHEDULER
     Key for TileScheduler object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getTileScheduler().
public static  RenderingHints.KeyKEY_TRANSFORM_ON_COLORMAP
     Key that indicates whether the ColormapOpImage s do the transform on the color map or on the pixels when the source image and destination images are all color-indexed.

Constructor Summary
public  JAI()
     Returns a new instance of theJAIclass.

Method Summary
public  voidclearRenderingHints()
     Clears the RenderingHints associated with this JAI instance.
public static  RenderedOpcreate(String opName, ParameterBlock args, RenderingHints hints)
     Creates a RenderedOp which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination.
public static  RenderedOpcreate(String opName, ParameterBlock args)
     Creates a RenderedOp with null rendering hints.
public static  RenderedOpcreate(String opName, Object param)
     Creates a RenderedOp that takes 1 Object parameter.
public static  RenderedOpcreate(String opName, Object param1, Object param2)
     Creates a RenderedOp that takes 2 Object parameters.
public static  RenderedOpcreate(String opName, Object param1, int param2)
    
public static  RenderedOpcreate(String opName, Object param1, Object param2, Object param3)
     Creates a RenderedOp that takes 3 Object parameters.
public static  RenderedOpcreate(String opName, int param1, int param2, Object param3)
    
public static  RenderedOpcreate(String opName, Object param1, Object param2, Object param3, Object param4)
     Creates a RenderedOp that takes 4 Object parameters.
public static  RenderedOpcreate(String opName, Object param1, int param2, Object param3, int param4)
     Creates a RenderedOp that takes 2 Object and 2 int parameters.
public static  RenderedOpcreate(String opName, RenderedImage src)
     Creates a RenderedOp that takes 1 RenderedImage source.
public static  RenderedOpcreate(String opName, Collection srcCol)
     Creates a RenderedOp that takes 1 Collection source.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param)
     Creates a RenderedOp that takes 1 RenderedImage source and 1 Object parameter.
public static  RenderedOpcreate(String opName, RenderedImage src, int param)
     Creates a RenderedOp that takes 1 RenderedImage source and 1 int parameter.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2)
     Creates a RenderedOp that takes 1 RenderedImage source and 2 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, float param2)
     Creates a RenderedOp that takes 1 RenderedImage source, 1 Object and 1 float parameter.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2, Object param3)
     Creates a RenderedOp that takes 1 RenderedImage source and 3 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, int param2, int param3)
     Creates a RenderedOp that takes 1 RenderedImage source, 1 Object and 2 int parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, float param1, float param2, Object param3)
     Creates a RenderedOp that takes 1 RenderedImage source, 2 float and 1 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4)
     Creates a RenderedOp that takes 1 RenderedImage source and 4 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2, int param3, int param4)
    
public static  RenderedOpcreate(String opName, RenderedImage src, int param1, int param2, int param3, int param4)
     Creates a RenderedOp that takes 1 RenderedImage source and 4 int parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, float param1, float param2, float param3, Object param4)
     Creates a RenderedOp that takes 1 RenderedImage source, 3 float and 1 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4, Object param5)
     Creates a RenderedOp that takes 1 RenderedImage source and 5 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, float param1, float param2, float param3, float param4, Object param5)
     Creates a RenderedOp that takes 1 RenderedImage source, 4 float parameters and one Object parameter.
public static  RenderedOpcreate(String opName, RenderedImage src, float param1, int param2, float param3, float param4, Object param5)
     Creates a RenderedOp that takes 1 RenderedImage source, 3 float parameters, 1 int parameter and 1 Object parameter.
public static  RenderedOpcreate(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6)
     Creates a RenderedOp that takes 1 RenderedImage source and 6 Object parameters.
public static  RenderedOpcreate(String opName, RenderedImage src, int param1, int param2, int param3, int param4, int param5, Object param6)
     Creates a RenderedOp that takes 1 RenderedImage source, 5 int parameters and 1 Object parameter.
public static  RenderedOpcreate(String opName, RenderedImage src1, RenderedImage src2)
     Creates a RenderedOp that takes 2 RenderedImage sources.
public static  RenderedOpcreate(String opName, RenderedImage src1, RenderedImage src2, Object param1, Object param2, Object param3, Object param4)
     Creates a RenderedOp that takes 2 RenderedImage sources and 4 Object parameters.
public static  CollectioncreateCollection(String opName, ParameterBlock args, RenderingHints hints)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination.
public static  CollectioncreateCollection(String opName, ParameterBlock args)
     Creates a Collection with null rendering hints.
public  CollectioncreateCollectionNS(String opName, ParameterBlock args, RenderingHints hints)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination.
public  RenderedOpcreateNS(String opName, ParameterBlock args, RenderingHints hints)
     Creates a RenderedOp which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination.
public static  RenderableOpcreateRenderable(String opName, ParameterBlock args, RenderingHints hints)
     Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public static  RenderableOpcreateRenderable(String opName, ParameterBlock args)
     Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public static  CollectioncreateRenderableCollection(String opName, ParameterBlock args, RenderingHints hints)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public static  CollectioncreateRenderableCollection(String opName, ParameterBlock args)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public  CollectioncreateRenderableCollectionNS(String opName, ParameterBlock args)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public  CollectioncreateRenderableCollectionNS(String opName, ParameterBlock args, RenderingHints hints)
     Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public  RenderableOpcreateRenderableNS(String opName, ParameterBlock args, RenderingHints hints)
     Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public  RenderableOpcreateRenderableNS(String opName, ParameterBlock args)
     Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock.
public static  TileCachecreateTileCache(int tileCapacity, long memCapacity)
     The default implementation constructs a TileCache with the given memory capacity in bytes.
public static  TileCachecreateTileCache(long memCapacity)
     Constructs a TileCache with the given memory capacity in bytes.
public static  TileCachecreateTileCache()
     Constructs a TileCache with the default memory capacity in bytes.
public static  TileSchedulercreateTileScheduler()
     Constructs a TileScheduler with the default parallelism and priorities.
final public static  voiddisableDefaultTileCache()
     Disable use of default tile cache.
final public static  voidenableDefaultTileCache()
     Enable use of default tile cache.
final public static  StringgetBuildVersion()
    
public static  JAIgetDefaultInstance()
     Returns the defaultJAIinstance.
final public static  DimensiongetDefaultRenderingSize()
     Retrieves a copy of the default rendering size.
final public static  DimensiongetDefaultTileSize()
     Retrieves the clone of the default tile dimensions.
public  ImagingListenergetImagingListener()
     Gets the ImagingListener object from this JAI.
public  OperationRegistrygetOperationRegistry()
     Returns theOperationRegistry being used by thisJAIinstance.
public  ObjectgetRenderingHint(RenderingHints.Key key)
     Returns the hint value associated with a given key in this JAI instance, or null if no value is associated with the given key.
public  RenderingHintsgetRenderingHints()
     Returns the RenderingHints associated with this JAI instance.
public  TileCachegetTileCache()
     Returns the TileCache being used by thisJAIinstance.
public  TileSchedulergetTileScheduler()
     Returns the TileScheduler being used by thisJAIinstance.
static  RenderingHintsmergeRenderingHints(RenderingHints defaultHints, RenderingHints hints)
     Merge one RenderingHints into another.
public  voidremoveRenderingHint(RenderingHints.Key key)
     Removes the hint value associated with a given key in this JAI instance.
final public static  voidsetDefaultRenderingSize(Dimension defaultSize)
     Sets the default size of the rendering created by invoking createDefaultRendering() on a RenderableOp. This default size may be overruled by setting a hint with key KEY_DEFAULT_RENDERING_SIZE on the node. If null there are no default dimensions. Either dimension may be non-positive in which case the other dimension and the renderable aspect ratio will be used to compute the rendered image size.
final public static  voidsetDefaultTileSize(Dimension tileDimensions)
     Sets the default tile dimensions to the clone of the provided parameter. If null there are no default dimensions.
Parameters:
  tileDimensions - The default tile dimensions or null.
public  voidsetImagingListener(ImagingListener listener)
     Sets an ImagingListener object on this JAI.
Parameters:
  imagingListener - The ImagingListener to be used.
public  voidsetOperationRegistry(OperationRegistry operationRegistry)
     Sets theOperationRegistry to be used by thisJAIinstance.
public  voidsetRenderingHint(RenderingHints.Key key, Object value)
     Sets the hint value associated with a given key in this JAI instance.
public  voidsetRenderingHints(RenderingHints hints)
     Sets the RenderingHints associated with this JAI instance.
public  voidsetTileCache(TileCache tileCache)
     Sets the TileCache to be used by thisJAI instance.
public  voidsetTileScheduler(TileScheduler tileScheduler)
     Sets the TileScheduler to be used by thisJAI instance.

Field Detail
KEY_BORDER_EXTENDER
public static RenderingHints.Key KEY_BORDER_EXTENDER(Code)
Key for BorderExtender object values. The common RenderingHints do not contain a default hint corresponding to this key.



KEY_CACHED_TILE_RECYCLING_ENABLED
public static RenderingHints.Key KEY_CACHED_TILE_RECYCLING_ENABLED(Code)
Key for Boolean object values which specify whether automatic recycling of application-visible tiles should occur. The common RenderingHints contain a FALSE-valued hint corresponding to this key.
See Also:   OpImage.OpImage(VectorImageLayoutMapboolean)
since:
   JAI 1.1.2



KEY_COLOR_MODEL_FACTORY
public static RenderingHints.Key KEY_COLOR_MODEL_FACTORY(Code)
Key for ColorModelFactory object values. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   OpImage.OpImage
since:
   JAI 1.1.2



KEY_DEFAULT_COLOR_MODEL_ENABLED
public static RenderingHints.Key KEY_DEFAULT_COLOR_MODEL_ENABLED(Code)
Key for enabling default ColorModel initialization when a valid ColorModel may not be derived by inheritance. The corresponding object must be a Boolean. The common RenderingHints do not contain a default hint corresponding to this key which is equivalent to its being set to TRUE.
See Also:   OpImage.OpImage
since:
   JAI 1.1



KEY_DEFAULT_COLOR_MODEL_METHOD
public static RenderingHints.Key KEY_DEFAULT_COLOR_MODEL_METHOD(Code)
Key for specifying a method to be used as for default ColorModel initialization. The corresponding object must be a java.lang.reflect.Method which is static and accepts a single SampleModel parameter and returns a ColorModel or null. The common RenderingHints do not contain a default hint corresponding to this key which is equivalent to its being set to the Method corresponding to PlanarImage.createColorModel(SampleModel) .
See Also:   OpImage.OpImage
since:
   JAI 1.1



KEY_DEFAULT_RENDERING_SIZE
final public static RenderingHints.Key KEY_DEFAULT_RENDERING_SIZE(Code)
Key for the dimensions of a RenderedImage created by invoking createDefaultRendering() on a node of type RenderableOp in a renderable processing chain. The type of the associated value is java.awt.Dimension.
See Also:   RenderableOp.createDefaultRendering
since:
   JAI 1.1



KEY_IMAGE_LAYOUT
public static RenderingHints.Key KEY_IMAGE_LAYOUT(Code)
Key for ImageLayout object values. The common RenderingHints do not contain a default hint corresponding to this key.



KEY_IMAGING_LISTENER
public static RenderingHints.Key KEY_IMAGING_LISTENER(Code)
Key for the ImagingListener registered to a rendering node. The default mapping of this key in each JAI instance rethrows RuntimeExceptions and prints the error message and stack trace of other exceptions to System.err.
since:
   JAI 1.1.2



KEY_INTERPOLATION
public static RenderingHints.Key KEY_INTERPOLATION(Code)
Key for Interpolation object values. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   MultiResolutionRenderableImage.createScaledRendering
See Also:   MultiResolutionRenderableImage.createRendering



KEY_NEGOTIATION_PREFERENCES
public static RenderingHints.Key KEY_NEGOTIATION_PREFERENCES(Code)
Key for the negotiation preferences to be used to negotiate capabilities to be used in the remote communication. The corresponding object must be a NegotiableCapabilitySet. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   javax.media.jai.remote.RemoteJAI
since:
   JAI 1.1



KEY_NUM_RETRIES
public static RenderingHints.Key KEY_NUM_RETRIES(Code)
Key for the number of retries to be used for dealing with network errors during remote imaging. The corresponding object must be an Integer. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   javax.media.jai.remote.RemoteJAI
since:
   JAI 1.1



KEY_OPERATION_BOUND
public static RenderingHints.Key KEY_OPERATION_BOUND(Code)
Key for Integer object values representing whether the operation is compute, network, or I/O bound. The values come from the constants OpImage.OP_COMPUTE_BOUND, OpImage.OP_IO_BOUND, and OpImage.OP_NETWORK_BOUND. The common RenderingHints do not contain a default hint corresponding to this key.



KEY_OPERATION_REGISTRY
public static RenderingHints.Key KEY_OPERATION_REGISTRY(Code)
Key for OperationRegistry object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getOperationRegistry(). The hint is automatically set by setOperationRegistry().



KEY_REPLACE_INDEX_COLOR_MODEL
public static RenderingHints.Key KEY_REPLACE_INDEX_COLOR_MODEL(Code)
Key for enabling changing of destination image's ColorModel to a ComponentColorModel, when the source image has an IndexColorModel. The corresponding object must be a Boolean. If the source image has an IndexColorModel, and the user or the operation itself does not set the ColorModel of the destination image, the destination image's ColorModel would be copied from the source and would therefore also be an IndexColorModel. A Boolean.TRUE value set for this key causes the destination image's ColorModel to be changed to a ComponentColorModel. The advantage of changing the destination's ColorModel comes in the usage of RasterAccessor. When a RasterAccessor is created using this source and destination pair, the source IndexColorModel will be automatically expanded, allowing operations that depend on the pixel value (as opposed to the index into the ColorModel) to function correctly. Note that the JAI provided dithering operations (errordiffusion, ordereddither) along with the color quantization operator, colorquantizer can be used for the inverse operation, i.e. converting from an RGB image to an indexed image. The common RenderingHints do not contain a default hint corresponding to this key which is equivalent to its being set to FALSE. Certain operators, however, change the default for themselves to Boolean.TRUE.
See Also:   javax.media.jai.OpImage.OpImage
See Also:   javax.media.jai.RasterAccessor
See Also:   javax.media.jai.operator.ColorQuantizerDescriptor
since:
   JAI 1.1.2



KEY_RETRY_INTERVAL
public static RenderingHints.Key KEY_RETRY_INTERVAL(Code)
Key for the retry interval value to be used for dealing with network errors during remote imaging. The corresponding object must be an Integer. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   javax.media.jai.remote.RemoteJAI
since:
   JAI 1.1



KEY_SERIALIZE_DEEP_COPY
public static RenderingHints.Key KEY_SERIALIZE_DEEP_COPY(Code)
Key for specifying whether a deep copy of the image data should be used when serializing images. The corresponding object must be a Boolean. The common RenderingHints do not contain a default hint corresponding to this key.
since:
   JAI 1.1



KEY_TILE_CACHE
public static RenderingHints.Key KEY_TILE_CACHE(Code)
Key for TileCache object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getTileCache(). The hint is automatically set by setTileCache().
See Also:   JAI.createTileCache(long)
See Also:   JAI.createTileCache()
See Also:   OpImage.OpImage



KEY_TILE_CACHE_METRIC
public static RenderingHints.Key KEY_TILE_CACHE_METRIC(Code)
Key for Tile ordering metric. The common RenderingHints do not contain a default hint corresponding to this key.
See Also:   OpImage.OpImage
See Also:   TileCache
since:
   JAI 1.1



KEY_TILE_CODEC_FORMAT
public static RenderingHints.Key KEY_TILE_CODEC_FORMAT(Code)
Key for specifying the default format to be used for tile serialization via TileCodecs. The corresponding object must be a String. The common RenderingHints do not contain a default hint corresponding to this key.
since:
   JAI 1.1



KEY_TILE_DECODING_PARAM
public static RenderingHints.Key KEY_TILE_DECODING_PARAM(Code)
Key for specifying the default decoding parameters to be used for tile serialization via TileCodecs. The corresponding object must be a TileCodecParameterList. The common RenderingHints do not contain a default hint corresponding to this key.
since:
   JAI 1.1



KEY_TILE_ENCODING_PARAM
public static RenderingHints.Key KEY_TILE_ENCODING_PARAM(Code)
Key for specifying the default encoding parameters to be used for tile serialization via TileCodecs. The corresponding object must be a TileCodecParameterList. The common RenderingHints do not contain a default hint corresponding to this key.
since:
   JAI 1.1



KEY_TILE_FACTORY
public static RenderingHints.Key KEY_TILE_FACTORY(Code)
Key for TileFactory object values. The common RenderingHints contain a RecyclingTileFactory -valued hint corresponding to this key. The value is the same as that to which JAI.KEY_TILE_RECYCLER is initially mapped.
See Also:   PlanarImage.PlanarImage(ImageLayoutVectorMap)
See Also:   OpImage.OpImage(VectorImageLayoutMapboolean)
since:
   JAI 1.1.2



KEY_TILE_RECYCLER
public static RenderingHints.Key KEY_TILE_RECYCLER(Code)
Key for TileRecycler object values. The common RenderingHints contain a RecyclingTileFactory -valued hint corresponding to this key. The value is the same as that to which JAI.KEY_TILE_FACTORY is initially mapped.
See Also:   OpImage.OpImage(VectorImageLayoutMapboolean)
since:
   JAI 1.1.2



KEY_TILE_SCHEDULER
public static RenderingHints.Key KEY_TILE_SCHEDULER(Code)
Key for TileScheduler object values. The common RenderingHints by default contain a hint corresponding to this key the value of which is equal to the value returned by getTileScheduler(). The hint is automatically set by setTileScheduler().
See Also:   OpImage.OpImage
since:
   JAI 1.1



KEY_TRANSFORM_ON_COLORMAP
public static RenderingHints.Key KEY_TRANSFORM_ON_COLORMAP(Code)
Key that indicates whether the ColormapOpImage s do the transform on the color map or on the pixels when the source image and destination images are all color-indexed. The corresponding object must be a Boolean. The common RenderingHints do not contain a default hint corresponding to this key. The default behavior is equivalent to setting a hint with a value of Boolean.TRUE.
since:
   JAI 1.1.2




Constructor Detail
JAI
public JAI()(Code)
Returns a new instance of theJAIclass. The OperationRegistry, TileScheduler, and TileCache will initially be references to those of the default instance. The rendering hints will be set to a clone of those of the default instance.




Method Detail
clearRenderingHints
public void clearRenderingHints()(Code)
Clears the RenderingHints associated with this JAI instance.



create
public static RenderedOp create(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a RenderedOp which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination. This method should only be used when the final result returned is a single RenderedImage.

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createNS(opName, args, hints). The functionality of this method is the same as its corresponding non-static method createNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport rendered image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.RenderedImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderedOp that represents the namedoperation, or null if the specified operationis in the "immediate" mode and the rendering of thePlanarImage failed.




create
public static RenderedOp create(String opName, ParameterBlock args)(Code)
Creates a RenderedOp with null rendering hints.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.



create
public static RenderedOp create(String opName, Object param)(Code)
Creates a RenderedOp that takes 1 Object parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  param - The Object parameter.



create
public static RenderedOp create(String opName, Object param1, Object param2)(Code)
Creates a RenderedOp that takes 2 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.



create
public static RenderedOp create(String opName, Object param1, int param2)(Code)
Creates a RenderedOp that takes 1 Object parameter and 1 int parameter
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The Object parameter.
Parameters:
  param2 - The int parameter.



create
public static RenderedOp create(String opName, Object param1, Object param2, Object param3)(Code)
Creates a RenderedOp that takes 3 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.



create
public static RenderedOp create(String opName, int param1, int param2, Object param3)(Code)
Creates a RenderedOp that takes 2 int parameters and one Object parameter
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The first int parameter.
Parameters:
  param2 - The second int parameter.
Parameters:
  param3 - The Object parameter.



create
public static RenderedOp create(String opName, Object param1, Object param2, Object param3, Object param4)(Code)
Creates a RenderedOp that takes 4 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.
Parameters:
  param4 - The fourth Object parameter.



create
public static RenderedOp create(String opName, Object param1, int param2, Object param3, int param4)(Code)
Creates a RenderedOp that takes 2 Object and 2 int parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The first int parameter.
Parameters:
  param3 - The second Object parameter.
Parameters:
  param4 - The second int parameter.



create
public static RenderedOp create(String opName, RenderedImage src)(Code)
Creates a RenderedOp that takes 1 RenderedImage source.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.



create
public static RenderedOp create(String opName, Collection srcCol)(Code)
Creates a RenderedOp that takes 1 Collection source.
Parameters:
  opName - The name of the operation.
Parameters:
  srcCol - The Collection src parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 1 Object parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, int param)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 1 int parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param - The int parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 2 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first object parameter.
Parameters:
  param2 - The second Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, float param2)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 1 Object and 1 float parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The Object parameter.
Parameters:
  param2 - The float parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2, Object param3)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 3 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, int param2, int param3)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 1 Object and 2 int parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The Object parameter.
Parameters:
  param2 - The first int parameter.
Parameters:
  param3 - The second int parameter.



create
public static RenderedOp create(String opName, RenderedImage src, float param1, float param2, Object param3)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 2 float and 1 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first float parameter.
Parameters:
  param2 - The second float parameter.
Parameters:
  param3 - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 4 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.
Parameters:
  param4 - The fourth Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2, int param3, int param4)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 2 Object parameters and 2 int parameters
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The first int parameter.
Parameters:
  param4 - The second int parameter.



create
public static RenderedOp create(String opName, RenderedImage src, int param1, int param2, int param3, int param4)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 4 int parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first int parameter.
Parameters:
  param2 - The second int parameter.
Parameters:
  param3 - The third int parameter.
Parameters:
  param4 - The fourth int parameter.



create
public static RenderedOp create(String opName, RenderedImage src, float param1, float param2, float param3, Object param4)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 3 float and 1 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first float parameter.
Parameters:
  param2 - The second float parameter.
Parameters:
  param3 - The third float parameter.
Parameters:
  param4 - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4, Object param5)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 5 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.
Parameters:
  param4 - The fourth Object parameter.
Parameters:
  param5 - The fifth Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, float param1, float param2, float param3, float param4, Object param5)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 4 float parameters and one Object parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first float parameter.
Parameters:
  param2 - The second float parameter.
Parameters:
  param3 - The third float parameter.
Parameters:
  param4 - The fourth float parameter.
Parameters:
  param5 - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, float param1, int param2, float param3, float param4, Object param5)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 3 float parameters, 1 int parameter and 1 Object parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first float parameter.
Parameters:
  param2 - The int parameter.
Parameters:
  param3 - The second float parameter.
Parameters:
  param4 - The third float parameter.
Parameters:
  param5 - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6)(Code)
Creates a RenderedOp that takes 1 RenderedImage source and 6 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.
Parameters:
  param4 - The fourth Object parameter.
Parameters:
  param5 - The fifth Object parameter.
Parameters:
  param6 - The sixth Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src, int param1, int param2, int param3, int param4, int param5, Object param6)(Code)
Creates a RenderedOp that takes 1 RenderedImage source, 5 int parameters and 1 Object parameter.
Parameters:
  opName - The name of the operation.
Parameters:
  src - The RenderedImage src parameter.
Parameters:
  param1 - The first int parameter.
Parameters:
  param2 - The second int parameter.
Parameters:
  param3 - The third int parameter.
Parameters:
  param4 - The fourth int parameter.
Parameters:
  param5 - The fifth int parameter.
Parameters:
  param6 - The Object parameter.



create
public static RenderedOp create(String opName, RenderedImage src1, RenderedImage src2)(Code)
Creates a RenderedOp that takes 2 RenderedImage sources.
Parameters:
  opName - The name of the operation.
Parameters:
  src1 - The first RenderedImage src.
Parameters:
  src2 - The second RenderedImage src.



create
public static RenderedOp create(String opName, RenderedImage src1, RenderedImage src2, Object param1, Object param2, Object param3, Object param4)(Code)
Creates a RenderedOp that takes 2 RenderedImage sources and 4 Object parameters.
Parameters:
  opName - The name of the operation.
Parameters:
  src1 - The first RenderedImage src.
Parameters:
  src2 - The second RenderedImage src.
Parameters:
  param1 - The first Object parameter.
Parameters:
  param2 - The second Object parameter.
Parameters:
  param3 - The third Object parameter.
Parameters:
  param4 - The fourth Object parameter.



createCollection
public static Collection createCollection(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.)

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createCollectionNS(opName, args, hints). The functionality of this method is the same as its corresponding non-static method createCollectionNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport rendered image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.RenderedImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation, or null if the specified operationis in the "immediate" mode and the rendering of thePlanarImage failed.




createCollection
public static Collection createCollection(String opName, ParameterBlock args)(Code)
Creates a Collection with null rendering hints.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.



createCollectionNS
public Collection createCollectionNS(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.) The source(s) supplied may be a collection of rendered images or a collection of collections that at the very basic level include rendered images. The source(s) supplied are unwrapped to create a single collection that contains RenderedOps and collections as many as the size of the smallest collection supplied in the sources. The nth collection is created using all supplied rendered images and the nth element of each of the collections supplied in the source.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are val>idated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

The rendering hints associated with this instance of JAI are overlaid with the hints passed to this method. That is, the set of keys will be the union of the keys from the instance's hints and the hints parameter. If the same key exists in both places, the value from the hints parameter will be used.

This version of createCollection is non-static; it may be used with a specific instance of the JAI class.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport rendered image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.RenderedImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation, or null if the specified operationis in the "immediate" mode and the rendering of thePlanarImage failed.




createNS
public RenderedOp createNS(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a RenderedOp which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock, and applying the specified hints to the destination. This method should only be used when the final result returned is a single RenderedImage. However, the source(s) supplied may be a collection of rendered images or a collection of collections that at the very basic level include rendered images.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are validated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

The rendering hints associated with this instance of JAI are overlaid with the hints passed to this method. That is, the set of keys will be the union of the keys from the instance's hints and the hints parameter. If the same key exists in both places, the value from the hints parameter will be used.

This version of create is non-static; it may be used with a specific instance of theJAIclass. All of the static create() methods ultimately call this method, thus inheriting this method's error handling.

Since this method performs parameter checking, it may not be suitable for creating RenderedOp nodes meant to be passed to another host using the RemoteImage interface. For example, it might be necessary to refer to a file that is present only on the remote host. In such cases, it is possible to instantiate a RenderedOp directly, avoiding all checks.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport rendered image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.RenderedImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderedOp that represents the namedoperation, or null if the specified operationis in the "immediate" mode and the rendering of thePlanarImage failed.




createRenderable
public static RenderableOp createRenderable(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a single RenderdableImage.

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createRenderableNS(opName, args, hints). The functionality of this method is the same as its corresponding non-static method createRenderableNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderableOp that represents the namedoperation.
since:
   JAI 1.1




createRenderable
public static RenderableOp createRenderable(String opName, ParameterBlock args)(Code)
Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a single RenderdableImage.

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createRenderableNS(opName, args, null). The functionality of this method is the same as its corresponding non-static method createRenderableNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderableOp that represents the namedoperation.




createRenderableCollection
public static Collection createRenderableCollection(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.)

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createRenderableCollectionNS(opName, args,hints). The functionality of this method is the same as its corresponding non-static method createRenderableCollectionNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation.
since:
   JAI 1.1




createRenderableCollection
public static Collection createRenderableCollection(String opName, ParameterBlock args)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.)

The defaultJAIinstance is used as the source of the registry and tile scheduler; that is, this method is equivalent to getDefaultInstance().createRenderableCollectionNS(opName, args,null). The functionality of this method is the same as its corresponding non-static method createRenderableCollectionNS().
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the default operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the default operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation.




createRenderableCollectionNS
public Collection createRenderableCollectionNS(String opName, ParameterBlock args)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.) The source(s) supplied may be a collection of renderable images or a collection of collections that at the very basic level include renderable images. The source(s) supplied are unwrapped to create a single collection that contains RenderableOps and collections as many as the size of the smallest collection supplied in the sources. The nth collection is created using all supplied renderable images and the nth element of each of the collections supplied in the source.

This method should be used to create a Collection in the renderable image mode.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are validated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateRenderableArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

This version of createRenderableCollection is non-static; it may be used with a specific instance of the JAI class.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation.
See Also:   JAI.createRenderableCollectionNS(StringParameterBlockRenderingHints)




createRenderableCollectionNS
public Collection createRenderableCollectionNS(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a Collection which represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a Collection. (This includes javax.media.jai.CollectionOps.) The source(s) supplied may be a collection of renderable images or a collection of collections that at the very basic level include renderable images. The source(s) supplied are unwrapped to create a single collection that contains RenderableOps and collections as many as the size of the smallest collection supplied in the sources. The nth collection is created using all supplied renderable images and the nth element of each of the collections supplied in the source.

This method should be used to create a Collection in the renderable image mode.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are validated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateRenderableArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

The rendering hints associated with this instance of JAI are overlaid with the hints passed to this method. That is, the set of keys will be the union of the keys from the instance's hints and the hints parameter. If the same key exists in both places, the value from the hints parameter will be used.

This version of createRenderableCollection is non-static; it may be used with a specific instance of the JAI class.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage or ajavax.media.jai.CollectionImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A Collection that represents the namedoperation.
since:
   JAI 1.1




createRenderableNS
public RenderableOp createRenderableNS(String opName, ParameterBlock args, RenderingHints hints)(Code)
Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a single RenderableImage. However, the source(s) supplied may be a collection of renderable images or a collection of collections that at the very basic level include renderable images.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are validated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateRenderableArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

The rendering hints associated with this instance of JAI are overlaid with the hints passed to this method. That is, the set of keys will be the union of the keys from the instance's hints and the hints parameter. If the same key exists in both places, the value from the hints parameter will be used.

This version of the "createRenderable" is non-static; it may be used with a specific instance of theJAIclass.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
Parameters:
  hints - The hints for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderableOp that represents the namedoperation.
since:
   JAI 1.1




createRenderableNS
public RenderableOp createRenderableNS(String opName, ParameterBlock args)(Code)
Creates a RenderableOp that represents the named operation, using the source(s) and/or parameter(s) specified in the ParameterBlock. This method should only be used when the final result returned is a single RenderableImage. However, the source(s) supplied may be a collection of renderable images or a collection of collections that at the very basic level include renderable images.

The supplied operation name is validated against the operation registry. The source(s) and/or parameter(s) in the ParameterBlock are validated against the named operation's descriptor, both in their numbers and types. Additional restrictions placed on the sources and parameters by an individual operation are also validated by calling its OperationDescriptor.validateRenderableArguments() method.

JAIallows a parameter to have a null input value, if that particular parameter has a default value specified in its operation's descriptor. In this case, the default value will replace the null input.

JAIalso allows unspecified tailing parameters, if these parameters have default values specified in the operation's descriptor. However, if a parameter, which has a default value, is followed by one or more parameters that have no default values, this parameter must be specified in the ParameterBlock, even if it only has a value of code>null.

The rendering hints associated with this instance of JAI are overlaid with the hints passed to this method. That is, the set of keys will be the union of the keys from the instance's hints and the hints parameter. If the same key exists in both places, the value from the hints parameter will be used.

This version of the "createRenderable" is non-static; it may be used with a specific instance of theJAIclass.
Parameters:
  opName - The name of the operation.
Parameters:
  args - The source(s) and/or parameter(s) for the operation.
throws:
  IllegalArgumentException - if opName is null.
throws:
  IllegalArgumentException - if args is null.
throws:
  IllegalArgumentException - if noOperationDescriptor is registered under thespecified operation name in the current operation registry.
throws:
  IllegalArgumentException - if theOperationDescriptor registered under the specifiedoperation name in the current operation registry does notsupport renderable image mode.
throws:
  IllegalArgumentException - if the specified operation doesnot produce ajava.awt.image.renderable.RenderableImage.
throws:
  IllegalArgumentException - if the specified operation isunable to handle the sources and parameters specified inargs. A RenderableOp that represents the namedoperation.
See Also:   JAI.createRenderableNS(StringParameterBlockRenderingHints)




createTileCache
public static TileCache createTileCache(int tileCapacity, long memCapacity)(Code)
The default implementation constructs a TileCache with the given memory capacity in bytes. Users may supply an instance of TileCache to an operation by supplying a RenderingHint with a JAI.KEY_TILE_CACHE key and the desired TileCache instance as its value. Note that the absence of a tile cache hint will result in the use of the TileCache belonging to the defaultJAIinstance. To force an operation not to perform caching, a TileCache instance with a tile capacity of 0 may be used. An exception will be thrown if memCapacity is negative. Attempting to set either value larger than the JVM size may result in an OutOfMemory exception.



createTileCache
public static TileCache createTileCache(long memCapacity)(Code)
Constructs a TileCache with the given memory capacity in bytes. Users may supply an instance of TileCache to an operation by supplying a RenderingHint with a JAI.KEY_TILE_CACHE key and the desired TileCache instance as its value. Note that the absence of a tile cache hint will result in the use of the TileCache belonging to the defaultJAIinstance. To force an operation not to perform caching, a TileCache instance with a tile capacity of 0 may be used. An exception will be thrown if memCapacity is negative. Attempting to set either value larger than the JVM size may result in an OutOfMemory exception.
since:
   JAI 1.1



createTileCache
public static TileCache createTileCache()(Code)
Constructs a TileCache with the default memory capacity in bytes. Users may supply an instance of TileCache to an operation by supplying a RenderingHint with a JAI.KEY_TILE_CACHE key and the desired TileCache instance as its value. Note that the absence of a tile cache hint will result in the use of the TileCache belonging to the defaultJAIinstance. To force an operation not to perform caching, a TileCache instance with a tile capacity of 0 may be used.



createTileScheduler
public static TileScheduler createTileScheduler()(Code)
Constructs a TileScheduler with the default parallelism and priorities.

In the Sun Microsystems reference implementation of TileScheduler the default parallelism is 2, default priority is THREAD.NORM_PRIORITY, default prefetch parallelism is 1, and default prefetch priority is THREAD.MIN_PRIORITY.
since:
   JAI 1.1




disableDefaultTileCache
final public static void disableDefaultTileCache()(Code)
Disable use of default tile cache. Tiles are not stored.
since:
   JAI 1.1



enableDefaultTileCache
final public static void enableDefaultTileCache()(Code)
Enable use of default tile cache. Tiles are stored.
since:
   JAI 1.1



getBuildVersion
final public static String getBuildVersion()(Code)
Returns JAI version information as a String
since:
   JAI 1.1



getDefaultInstance
public static JAI getDefaultInstance()(Code)
Returns the defaultJAIinstance. This instance is used by all of the static methods of this class. It uses the default OperationRegistry and, in the Sun Microsystems, Inc. implementation, the Sun implementations of TileCache and TileScheduler. The RenderingHints will contain hints only for these three entities.

Unless otherwise changed through a setOperationRegistry the OperationRegistry used by the default instance is thread-safe.




getDefaultRenderingSize
final public static Dimension getDefaultRenderingSize()(Code)
Retrieves a copy of the default rendering size. If null there is no default size set. The default rendering size or null.
since:
   JAI 1.1



getDefaultTileSize
final public static Dimension getDefaultTileSize()(Code)
Retrieves the clone of the default tile dimensions. If null there are no default dimensions set. The default tile dimensions or null.
since:
   JAI 1.1



getImagingListener
public ImagingListener getImagingListener()(Code)
Gets the ImagingListener object from this JAI. The ImagingListener object that currentlyresides in this JAI.



getOperationRegistry
public OperationRegistry getOperationRegistry()(Code)
Returns theOperationRegistry being used by thisJAIinstance.

Unless otherwise changed through a setOperationRegistry the OperationRegistry returned by getDefaultInstance().getOperationRegistry() is thread-safe.




getRenderingHint
public Object getRenderingHint(RenderingHints.Key key)(Code)
Returns the hint value associated with a given key in this JAI instance, or null if no value is associated with the given key.
throws:
  IllegalArgumentException - if key isnull.



getRenderingHints
public RenderingHints getRenderingHints()(Code)
Returns the RenderingHints associated with this JAI instance. These rendering hints will be merged with any hints supplied as an argument to the createNS(), createRenderableNS(), or createCollectionNS() methods.



getTileCache
public TileCache getTileCache()(Code)
Returns the TileCache being used by thisJAIinstance.



getTileScheduler
public TileScheduler getTileScheduler()(Code)
Returns the TileScheduler being used by thisJAIinstance.



mergeRenderingHints
static RenderingHints mergeRenderingHints(RenderingHints defaultHints, RenderingHints hints)(Code)
Merge one RenderingHints into another.
Parameters:
  defaultHints - The default RenderingHints.
Parameters:
  hints - The superseding RenderingHints; hints inthis mapping take precedence over any indefaultHints.



removeRenderingHint
public void removeRenderingHint(RenderingHints.Key key)(Code)
Removes the hint value associated with a given key in this JAI instance.



setDefaultRenderingSize
final public static void setDefaultRenderingSize(Dimension defaultSize)(Code)
Sets the default size of the rendering created by invoking createDefaultRendering() on a RenderableOp. This default size may be overruled by setting a hint with key KEY_DEFAULT_RENDERING_SIZE on the node. If null there are no default dimensions. Either dimension may be non-positive in which case the other dimension and the renderable aspect ratio will be used to compute the rendered image size. The intial value of this setting is
 new Dimension(0, 512)
 
which produces a default rendering of height 512 and width 512*aspect_ratio.
Parameters:
  defaultSize - The default rendering size or null. IllegalArgumentException ifdefaultSize is non-null andboth the width and height are non-positive.
since:
   JAI 1.1



setDefaultTileSize
final public static void setDefaultTileSize(Dimension tileDimensions)(Code)
Sets the default tile dimensions to the clone of the provided parameter. If null there are no default dimensions.
Parameters:
  tileDimensions - The default tile dimensions or null. IllegalArgumentException iftileDimensions is non-null andhas non-positive width or height.
since:
   JAI 1.1



setImagingListener
public void setImagingListener(ImagingListener listener)(Code)
Sets an ImagingListener object on this JAI.
Parameters:
  imagingListener - The ImagingListener to be used. Ifthe provided ImagingListener isnull, the defaultImagingListener, which rethrows theRuntimeExceptions and printsthe stack trace of the other types to the streamSystem.err, will be set.



setOperationRegistry
public void setOperationRegistry(OperationRegistry operationRegistry)(Code)
Sets theOperationRegistry to be used by thisJAIinstance.
throws:
  IllegalArgumentException - if operationRegistry is null.



setRenderingHint
public void setRenderingHint(RenderingHints.Key key, Object value)(Code)
Sets the hint value associated with a given key in this JAI instance.
throws:
  IllegalArgumentException - if key isnull.
throws:
  IllegalArgumentException - if value isnull.
throws:
  IllegalArgumentException - if value isnot of the correct type for the given hint.



setRenderingHints
public void setRenderingHints(RenderingHints hints)(Code)
Sets the RenderingHints associated with this JAI instance. These rendering hints will be merged with any hints supplied as an argument to the createNS(), createRenderableNS(), or createCollectionNS() methods.

The hints argument must be non-null, otherwise a IllegalArgumentException will be thrown.




setTileCache
public void setTileCache(TileCache tileCache)(Code)
Sets the TileCache to be used by thisJAI instance. The tileCache parameter will be added to the RenderingHints of this JAI instance.
throws:
  IllegalArgumentException - if tileCache is null.



setTileScheduler
public void setTileScheduler(TileScheduler tileScheduler)(Code)
Sets the TileScheduler to be used by thisJAI instance. The tileScheduler parameter will be added to the RenderingHints of this JAI instance.
throws:
  IllegalArgumentException - if tileScheduler is null.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.