javax.media.jai.operator
Class ConstantDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.ConstantDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class ConstantDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the "Constant"
operation.
The Constant operation creates a multi-banded, tiled rendered
image, where all the pixels from the same band have a constant
value. The width and height of the image must be specified and
greater than 0. At least one constant must be supplied. The number
of bands of the image is determined by the number of constant pixel
values supplied in the "bandValues" parameter. The data type is
determined by the type of the constants; this means all elements of
the bandValues
array must be of the same type.
If the bandValues
array is a Short
array, then TYPE_USHORT
is used if all values are
non-negative; otherwise TYPE_SHORT
is used.
Resource List
Name | Value |
GlobalName | Constant |
LocalName | Constant |
Vendor | com.sun.media.jai |
Description | Creates a rendered image with
constant pixel values. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ConstantDescriptor.html |
Version | 1.0 |
arg0Desc | Image width in pixels. |
arg1Desc | Image height in pixels. |
arg2Desc | The constant pixel band values. |
Parameter List
Name | Class Type |
Default Value |
width | java.lang.Float |
NO_PARAMETER_DEFAULT |
height | java.lang.Float |
NO_PARAMETER_DEFAULT |
bandValues | java.lang.Number[] |
NO_PARAMETER_DEFAULT |
- See Also:
OperationDescriptor
, Serialized Form
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
arePropertiesSupported,
getDefaultSourceClass,
getDestClass,
getDestClass,
getInvalidRegion,
getName,
getNumParameters,
getNumSources,
getParamClasses,
getParamDefaults,
getParamDefaultValue,
getParameterListDescriptor,
getParamMaxValue,
getParamMinValue,
getParamNames,
getPropertyGenerators,
getPropertyGenerators,
getRenderableDestClass,
getRenderableSourceClasses,
getResourceBundle,
getResources,
getSourceClasses,
getSourceClasses,
getSourceNames,
getSupportedModes,
isImmediate,
isModeSupported,
isRenderableSupported,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateArguments,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ConstantDescriptor
public ConstantDescriptor()
- Constructor.
validateParameters
protected boolean validateParameters(String modeName,
ParameterBlock args,
StringBuffer message)
- Validates the input parameters.
In addition to the standard checks performed by the
superclass method, this method checks that "width" and "height"
are greater than 0 (for rendered mode) and that "bandValues" has
length at least 1.
- Overrides:
- validateParameters in class OperationDescriptorImpl
- Tags copied from class: OperationDescriptorImpl
- Throws:
- IllegalArgumentException - if any of the input parameters are
null
. - See Also:
OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
,
ParameterListDescriptorImpl.isParameterValueValid(java.lang.String, java.lang.Object)