|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagejava.awt.image.renderable
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
AClass ParameterBlock, constructor ParameterBlock(Vector)ParameterBlock
encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp or other classes that process images.Although it is possible to place arbitrary objects in the source Vector users of this class may impose semantic constraints such as requiring all sources to be RenderedImages or RenderableImage.
ParameterBlock
itself is merely a container and performs no checking on source or parameter types.All parameters in a
ParameterBlock
are objects; convenience add and set methods are available that take arguments of base type and construct the appropriate subclass of Number (such as Integer or Float). Corresponding get methods perform a downward cast and have return values of base type; an exception will be thrown if the stored values do not have the correct type. There is no way to distinguish between the results of "short s; add(s)" and "add(new Short(s))".Note that the get and set methods operate on references. Therefore one must be careful not to share references between
ParameterBlocksParameterBlock
s when this is inappropriate. For example to create a newParameterBlock
that is equal to an old one except for an added source one might be tempted to write:ParameterBlock addSource(ParameterBlock pb RenderableImage im) { ParameterBlock pb1 = new ParameterBlock(pb.getSources()); pb1.addSource(im); return pb1; }This code will have the side effect of altering the original
ParameterBlock
since the getSources operation returned a reference to its source Vector. Both pb and pb1 share their source Vector and a change in either is visible to both.A correct way to write the addSource function is to clone the source Vector:
ParameterBlock addSource (ParameterBlock pb RenderableImage im) { ParameterBlock pb1 = new ParameterBlock(pb.getSources().clone()); pb1.addSource(im); return pb1; }The clone method of
ParameterBlock
has been defined to perform a clone of both the source and parameter Vectors for this reason. A standard shallow clone is available as shallowClone.The addSource setSource add and set methods are defined to return 'this' after adding their argument. This allows use of syntax like:
ParameterBlock pb = new ParameterBlock(); op = new RenderableImageOp("operation" pb.add(arg1).add(arg2));
Constructs a ParameterBlock
with a given Vector of sources.
Class ParameterBlock, constructor ParameterBlock(Vector, Vector)Constructs a ParameterBlock
with a given Vector of sources and Vector of parameters.
Class ParameterBlock, Object clone()Creates a copy of aClass ParameterBlock, byte getByteParameter(int)ParameterBlock
. The source and parameter Vectors are cloned but the actual sources and parameters are copied by reference. This allows modifications to the order and number of sources and parameters in the clone to be invisible to the originalParameterBlock
. Changes to the shared sources or parameters themselves will still be visible. @return an Object clone of theParameterBlock
.
A convenience method to return a parameter as a byte. An exceptionClass ParameterBlock, char getCharParameter(int)will beis thrown if the parameter isnull
or not aByte
. @param index the index of the parameter to be returned. @return the parameter at the specified index as abyte
value. @throws ClassCastException if the parameter at the specified index is not aByte
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as a char. An exceptionClass ParameterBlock, double getDoubleParameter(int)will beis thrown if the parameter isnull
or not aCharacter
. @param index the index of the parameter to be returned. @return the parameter at the specified index as achar
value. @throws ClassCastException if the parameter at the specified index is not aCharacter
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as a double. An exceptionClass ParameterBlock, float getFloatParameter(int)will beis thrown if the parameter isnull
or not aDouble
. @param index the index of the parameter to be returned. @return the parameter at the specified index as adouble
value. @throws ClassCastException if the parameter at the specified index is not aDouble
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as a float. An exceptionClass ParameterBlock, int getIntParameter(int)will beis thrown if the parameter isnull
or not aFloat
. @param index the index of the parameter to be returned. @return the parameter at the specified index as afloat
value. @throws ClassCastException if the parameter at the specified index is not aFloat
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as an int. An exceptionClass ParameterBlock, long getLongParameter(int)will beis thrown if the parameter isnull
or not anInteger
. @param index the index of the parameter to be returned. @return the parameter at the specified index as aint
value. @throws ClassCastException if the parameter at the specified index is not aInteger
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as a long. An exceptionClass ParameterBlock, short getShortParameter(int)will beis thrown if the parameter isnull
or not aLong
. @param index the index of the parameter to be returned. @return the parameter at the specified index as along
value. @throws ClassCastException if the parameter at the specified index is not aLong
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
A convenience method to return a parameter as a short. An exceptionClass ParameterBlock, Object shallowClone()will beis thrown if the parameter isnull
or not aShort
. @param index the index of the parameter to be returned. @return the parameter at the specified index as ashort
value. @throws ClassCastException if the parameter at the specified index is not aShort
@throws NullPointerException if the parameter at the specified index isnull
@throws ArrayIndexOutOfBoundsException ifindex
is negative or not less than the current size of thisParameterBlock
object
Creates a shallow copy of aParameterBlock
. The source and parameter Vectors are copied by reference -- additions or changes will be visible to both versions. @return an Object clone of theParameterBlock
.
Modifies the current user-to-device transform by appending another transform. In matrix notation the operation is:Class RenderContext, void preConcetenateTransform(AffineTransform)[this] = [this] x [modTransform]This method does the same thing as the concatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name. @param modTransform the AffineTransform to append to the current usr2dev transform. @deprecated replaced byconcatenateTransform(AffineTransform)
.
Modifies the current user-to-device transform by prepending another transform. In matrix notation the operation is:[this] = [modTransform] x [this]This method does the same thing as the preConcatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name. @param modTransform the AffineTransform to prepend to the current usr2dev transform. @deprecated replaced bypreConcatenateTransform(AffineTransform)
.