Java Doc for OperationDescriptor.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) 


javax.media.jai.OperationDescriptor

All known Subclasses:   javax.media.jai.OperationDescriptorImpl,
OperationDescriptor
public interface OperationDescriptor extends RegistryElementDescriptor(Code)
This interface provides a comprehensive description of a specific image operation. All information regarding the operation, such as its name, version, input, and properties should be listed. Any conditions placed on the operation, such as its source class types and legal parameter range, should also be included, and the methods to enforce these conditions should be implemented. A set of PropertyGenerators may be specified to be used as a basis for the operation's property management.

Each image operation in JAI must have a descriptor that implements this interface. The following basic resource data must be provided:

  • A global operation name that is visible to all and is the same in all Locales.
  • A localized operation name that may be used as a synonym for the global operation name.
  • The name of the vendor defining this operation.
  • A brief description of this operation.
  • An URL where additional documentation on this operation may be found.
  • The version of this operation.
Additional information must be provided when appropriate. Only then can this operation be added to an OperationRegistry. Furthermore, it is recommended that a detailed description of the operation's functionality be included in the class comments.

JAI currently knows about the following operation modes : "rendered", "renderable", "collection" and "renderableCollection" (these form a subset of the known registry modes returned by RegistryMode.getModes()). All mode names are dealt with in a case insensitive (but retentive) manner. All modes have to accept the same number of source images and the same number of parameters. All the source names and parameter names are also the same across all modes. The class types of the sources and parameters can be different for each mode.

For example an operation supporting the "rendered" mode takes RenderedImages as its sources, can only be used in a rendered operation chain, and produces a RenderedImage. An operation supporting the renderable mode takes RenderableImages as its sources, can only be used in a renderable operation chain, and produces a RenderableImage.
See Also:   JAI
See Also:   OperationDescriptorImpl



Field Summary
final public static  ObjectNO_PARAMETER_DEFAULT
     An Object that signifies that a parameter has no default value.


Method Summary
 ClassgetDestClass(String modeName)
     Returns a Class that describes the type of destination this operation produces for the specified mode.
 ClassgetDestClass()
     Returns a Class that describes the type of destination this operation produces in the rendered image mode.
 ObjectgetInvalidRegion(String registryModeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)
     Calculates the region over which two distinct renderings of an operation may be expected to differ.

The class of the returned object will vary as a function of the mode of the operation.

 intgetNumParameters()
     Returns the number of parameters (not including the sources) required by this operation.
 intgetNumSources()
     Returns the number of sources required by this operation.
 Class[]getParamClasses()
     Returns an array of Classes that describe the types of parameters required by this operation.
 ObjectgetParamDefaultValue(int index)
     Returns the default value of a specified parameter.
 Object[]getParamDefaults()
     Returns an array of Objects that define the default values of the parameters for this operation.
 NumbergetParamMaxValue(int index)
     Returns the maximum legal value of a specified numeric parameter for this operation.
 NumbergetParamMinValue(int index)
     Returns the minimum legal value of a specified numeric parameter for this operation.
 String[]getParamNames()
     Returns an array of Strings that are the localized parameter names of this operation.
 PropertyGenerator[]getPropertyGenerators()
     Returns an array of PropertyGenerators implementing the property inheritance for this operation.
 ClassgetRenderableDestClass()
     Returns a Class that describes the type of destination this operation produces in the renderable image mode.
 Class[]getRenderableSourceClasses()
     Returns an array of Classes that describe the types of sources required by this operation in the renderable image mode.
 ResourceBundlegetResourceBundle(Locale locale)
     Returns the resource data for this operation in the specified Locale in a ResourceBundle.
 String[][]getResources(Locale locale)
     Returns the resource data for this operation in the specified Locale.
 Class[]getSourceClasses(String modeName)
     Returns an array of Classes that describe the types of sources required by this operation for the specified mode.
 Class[]getSourceClasses()
     Returns an array of Classes that describe the types of sources required by this operation in the rendered image mode.
 String[]getSourceNames()
     Returns an array of Strings that are the names of the sources of this operation.
 booleanisImmediate()
     Returns true if the operation should be computed immediately for all supported modes of this operation during the call to JAI.create(); that is, the operation is placed in immediate mode.
 booleanisRenderableSupported()
     Returns true if this operation supports the renderable image mode.
 booleanisRenderedSupported()
     Returns true if this operation supports the rendered image mode.
 booleanvalidateArguments(String modeName, ParameterBlock args, StringBuffer msg)
     Returns true if this operation/mode is capable of handling the input source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the specified mode.

 booleanvalidateArguments(ParameterBlock args, StringBuffer msg)
     Returns true if this operation is capable of handling the input rendered source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the rendered mode.

 booleanvalidateRenderableArguments(ParameterBlock args, StringBuffer msg)
     Returns true if this operation is capable of handling the input renderable source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the renderable mode.


Field Detail
NO_PARAMETER_DEFAULT
final public static Object NO_PARAMETER_DEFAULT(Code)
An Object that signifies that a parameter has no default value. Same as ParameterListDescriptor.NO_PARAMETER_DEFAULT





Method Detail
getDestClass
Class getDestClass(String modeName)(Code)
Returns a Class that describes the type of destination this operation produces for the specified mode.
Parameters:
  modeName - the operation mode name
throws:
  IllegalArgumentException - if modeName is nullor if it is not one of the supported modes.
since:
   JAI 1.1



getDestClass
Class getDestClass()(Code)
Returns a Class that describes the type of destination this operation produces in the rendered image mode. Currently JAI supports two destination class types: java.awt.image.RenderedImage.class and java.util.Collection.class.



getInvalidRegion
Object getInvalidRegion(String registryModeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)(Code)
Calculates the region over which two distinct renderings of an operation may be expected to differ.

The class of the returned object will vary as a function of the mode of the operation. For rendered and renderable two- dimensional images this should be an instance of a class which implements java.awt.Shape.
Parameters:
  registryModeName - The name of the mode.
Parameters:
  oldParamBlock - The previous sources and parameters.
Parameters:
  oldHints - The previous hints.
Parameters:
  newParamBlock - The current sources and parameters.
Parameters:
  newHints - The current hints.
Parameters:
  node - The affected node in the processing chain. The region over which the data of two renderings of thisoperation may be expected to be invalid or nullif there is no common region of validity. If an emptyjava.awt.Shape is returned, this indicatesthat all pixels within the bounds of the old renderingremain valid.
throws:
  IllegalArgumentException - if registryModeNameis null or if the operation requires eithersources or parameters and either oldParamBlockor newParamBlock is null.
throws:
  IllegalArgumentException - if oldParamBlock ornewParamBlock do not contain sufficient sourcesor parameters for the operation in question.
since:
   JAI 1.1




getNumParameters
int getNumParameters()(Code)
Returns the number of parameters (not including the sources) required by this operation.



getNumSources
int getNumSources()(Code)
Returns the number of sources required by this operation. All modes have the same number of sources.



getParamClasses
Class[] getParamClasses()(Code)
Returns an array of Classes that describe the types of parameters required by this operation. If this operation has no parameter, this method returns null.



getParamDefaultValue
Object getParamDefaultValue(int index)(Code)
Returns the default value of a specified parameter. The default value may be null. If a parameter has no default value, this method returns NO_PARAMETER_DEFAULT.
Parameters:
  index - The index of the parameter whose defaultvalue is queried.
throws:
  NullPointerException - if this operation has no parameter.
throws:
  ArrayIndexOutOfBoundsException - if there is no parametercorresponding to the specified index.



getParamDefaults
Object[] getParamDefaults()(Code)
Returns an array of Objects that define the default values of the parameters for this operation. Default values may be null. When instantiating the operation, the default values may be used for those parameters whose values are not supplied. The NO_PARAMETER_DEFAULT static Object indicates that a parameter has no default value. If this operation has no parameter, this method returns null.



getParamMaxValue
Number getParamMaxValue(int index)(Code)
Returns the maximum legal value of a specified numeric parameter for this operation. If the specified parameter is non-numeric, this method returns null.

The return value should be of the class type appropriate for the parameter's type, that is, Byte for a byte parameter, Integer for an int parameter, and so forth.
Parameters:
  index - The index of the numeric parameter whose maximumvalue is queried. A Number representing the maximum legal valueof the queried parameter, or null.
throws:
  NullPointerException - if this operation has no parameter.
throws:
  ArrayIndexOutOfBoundsException - if there is no parametercorresponding to the specified index.




getParamMinValue
Number getParamMinValue(int index)(Code)
Returns the minimum legal value of a specified numeric parameter for this operation. If the specified parameter is non-numeric, this method returns null.

The return value should be of the class type appropriate for the parameter's type, that is, Byte for a byte parameter, Integer for an int parameter, and so forth.
Parameters:
  index - The index of the numeric parameter whose minimumvalue is queried. A Number representing the minimum legal valueof the queried parameter, or null.
throws:
  NullPointerException - if this operation has no parameter.
throws:
  ArrayIndexOutOfBoundsException - if there is no parametercorresponding to the specified index.




getParamNames
String[] getParamNames()(Code)
Returns an array of Strings that are the localized parameter names of this operation. If this operation has no parameter, this method returns null.



getPropertyGenerators
PropertyGenerator[] getPropertyGenerators()(Code)
Returns an array of PropertyGenerators implementing the property inheritance for this operation. They may be used as a basis for the operation's property management. An array of PropertyGenerators, ornull if this operation does not have any ofits own PropertyGenerators.



getRenderableDestClass
Class getRenderableDestClass()(Code)
Returns a Class that describes the type of destination this operation produces in the renderable image mode. Currently JAI supports two destination class types: java.awt.image.renderable.RenderableImage.class and java.util.Collection.class.



getRenderableSourceClasses
Class[] getRenderableSourceClasses()(Code)
Returns an array of Classes that describe the types of sources required by this operation in the renderable image mode. If this operation does not support the renderable mode, or if it has no source, this method returns null.



getResourceBundle
ResourceBundle getResourceBundle(Locale locale)(Code)
Returns the resource data for this operation in the specified Locale in a ResourceBundle. The resource data values are taken from the getResources() method which must be implemented by each operation descriptor.
Parameters:
  locale - The Locale for which the informationshould be localized. It may be different from the defaultLocale. A ResourceBundle containing the mandatoryand optional resource information.



getResources
String[][] getResources(Locale locale)(Code)
Returns the resource data for this operation in the specified Locale. It must contain String data for the following tags:
  • "GlobalName" - A global operation name that is visible to all and is the same in all Locales.
  • "LocalName" - A localized operation name that may be used as a synonym for the "GlobalName".
  • "Vendor" - The name of the vendor defining this operation. Vendors are encouraged to use the Java convention of reversed Internet addresses.
  • "Description" - A brief description of this operation.
  • "DocURL" - An URL where additional documentation on this operation may be found.
  • "Version" - A free-form version indicator of this operation.
In addition, it may contain String data for the following tags when appropriate:
  • "arg0Desc", "arg1Desc", ... - Description of the input parameters.
  • "hint0Desc", hint1Desc", ... - Description of the rendering hints.

Parameters:
  locale - The Locale for which the informationshould be localized. It may be different from the defaultLocale. A two-dimensional array of Strings containingthe mandatory and optional resource tags and theircorresponding resource data. (String[i][0] isthe tag for the i-th resource and String[i][1] is thecorresponding data)



getSourceClasses
Class[] getSourceClasses(String modeName)(Code)
Returns an array of Classes that describe the types of sources required by this operation for the specified mode. If this operation has no sources, this method returns null.
Parameters:
  modeName - the operation mode name
throws:
  IllegalArgumentException - if modeName is nullor if it is not one of the supported modes.
since:
   JAI 1.1



getSourceClasses
Class[] getSourceClasses()(Code)
Returns an array of Classes that describe the types of sources required by this operation in the rendered image mode. If this operation has no source, this method returns null.



getSourceNames
String[] getSourceNames()(Code)
Returns an array of Strings that are the names of the sources of this operation. If this operation has no sources, this method returns null.
since:
   JAI 1.1



isImmediate
boolean isImmediate()(Code)
Returns true if the operation should be computed immediately for all supported modes of this operation during the call to JAI.create(); that is, the operation is placed in immediate mode. If true, and the computation fails, null will be returned from JAI.create(). If false, JAI.create() will return an instance of the appropriate destination class that may be asked to compute itself at a later time; this computation may fail at that time.

Operations that rely on an external resource, such as a source file, or that produce externally-visible side effects, such as writing to an output file, should return true from this method. Operations that rely only on their sources and parameters usually wish to return false in order to defer rendering as long as possible.




isRenderableSupported
boolean isRenderableSupported()(Code)
Returns true if this operation supports the renderable image mode. That is, it may be performed on RenderableImage sources in a renderable operation chain, and produces a renderable result. The JAI.createRenderable() and the JAI.createCollection() methods should be used to instantiate the operation.

If this method returns true, all the additional methods that supply the renderable mode information must be implemented.




isRenderedSupported
boolean isRenderedSupported()(Code)
Returns true if this operation supports the rendered image mode. That is, it may be performed on RenderedImage sources in a rendered operation chain, and produces a rendered result. The JAI.create() and the JAI.createCollection() methods should be used to instantiate the operation.

If this method returns true, all the additional methods that supply the rendered mode information must be implemented.




validateArguments
boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)(Code)
Returns true if this operation/mode is capable of handling the input source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the specified mode. It is called by JAI.create() as a part of its validation process. Thus it is strongly recommended that the application programs use the JAI.create() methods to instantiate all the rendered operations.

This method sets all the undefined parameters in the ParameterBlock to their default values, if the default values are specified.

Note that DeferredData parameters will not be recognized as valid unless the parameter is defined to have class DeferredData.class.
Parameters:
  modeName - the operation mode name
Parameters:
  args - Input arguments, including source(s) and/or parameter(s).
Parameters:
  msg - A string that may contain error messages.
throws:
  IllegalArgumentException - if modeName is null
since:
   JAI 1.1




validateArguments
boolean validateArguments(ParameterBlock args, StringBuffer msg)(Code)
Returns true if this operation is capable of handling the input rendered source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the rendered mode. It is called by JAI.create() as a part of its validation process. Thus it is strongly recommended that the application programs use the JAI.create() methods to instantiate all the rendered operations.

This method sets all the undefined parameters in the ParameterBlock to their default values, if the default values are specified.

Note that DeferredData parameters will not be recognized as valid unless the parameter is defined to have class DeferredData.class.
Parameters:
  args - Input arguments, including source(s) and/or parameter(s).
Parameters:
  msg - A string that may contain error messages.




validateRenderableArguments
boolean validateRenderableArguments(ParameterBlock args, StringBuffer msg)(Code)
Returns true if this operation is capable of handling the input renderable source(s) and/or parameter(s) specified in the ParameterBlock, or false otherwise, in which case an explanatory message may be appended to the StringBuffer.

This method is the standard place where input arguments are validated against this operation's specification for the renderable mode. It is called by JAI.createRenderable() as a part of its validation process. Thus it is strongly recommended that the application programs use the JAI.createRenderable() method to instantiate all the renderable operations.

This method sets all the undefined parameters in the ParameterBlock to their default values, if the default values are specified.

Note that DeferredData parameters will not be recognized as valid unless the parameter is defined to have class DeferredData.class.

If this operation does not support the renderable mode, this method returns false regardless of the input arguments
Parameters:
  args - Input arguments, including source(s) and/or parameter(s).
Parameters:
  msg - A string that may contain error messages.




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