# HG changeset patch # User lana # Date 1300751630 25200 # Node ID 0ab2251ed45610bbfde4a6bdc933eb6f7f26bf99 # Parent f317a5eb26daa9c70a3e6b569d764c7d804f045a# Parent eadf2725c5d67a737a77f3a36a598739dba43dc3 Merge diff -r f317a5eb26da -r 0ab2251ed456 jdk/src/share/classes/java/awt/Component.java --- a/jdk/src/share/classes/java/awt/Component.java Fri Mar 18 23:33:34 2011 -0700 +++ b/jdk/src/share/classes/java/awt/Component.java Mon Mar 21 16:53:50 2011 -0700 @@ -3873,6 +3873,11 @@ * supported or met * @exception ClassCastException if the component is not a canvas or * window. + * @exception IllegalStateException if the component has no peer + * @exception IllegalArgumentException if {@code numBuffers} is less than two, + * or if {@code BufferCapabilities.isPageFlipping} is not + * {@code true}. + * @see #createBuffers(int, BufferCapabilities) */ protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps) throws AWTException diff -r f317a5eb26da -r 0ab2251ed456 jdk/src/share/classes/java/awt/LinearGradientPaint.java --- a/jdk/src/share/classes/java/awt/LinearGradientPaint.java Fri Mar 18 23:33:34 2011 -0700 +++ b/jdk/src/share/classes/java/awt/LinearGradientPaint.java Mon Mar 21 16:53:50 2011 -0700 @@ -57,8 +57,14 @@ * * *
- * The user may also select what action the {@code LinearGradientPaint} - * should take when filling color outside the start and end points. + * The user may also select what action the {@code LinearGradientPaint} object + * takes when it is filling the space outside the start and end points by + * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}. + * The distances between any two colors in any of the reflected or repeated + * copies of the gradient are the same as the distance between those same two + * colors between the start and end points. + * Note that some minor variations in distances may occur due to sampling at + * the granularity of a pixel. * If no cycle method is specified, {@code NO_CYCLE} will be chosen by * default, which means the endpoint colors will be used to fill the * remaining area. diff -r f317a5eb26da -r 0ab2251ed456 jdk/src/share/classes/java/awt/MultipleGradientPaint.java --- a/jdk/src/share/classes/java/awt/MultipleGradientPaint.java Fri Mar 18 23:33:34 2011 -0700 +++ b/jdk/src/share/classes/java/awt/MultipleGradientPaint.java Mon Mar 21 16:53:50 2011 -0700 @@ -286,6 +286,10 @@ /** * Returns a copy of the transform applied to the gradient. * + *
+ * Note that if no transform is applied to the gradient + * when it is created, the identity transform is used. + * * @return a copy of the transform applied to the gradient */ public final AffineTransform getTransform() { @@ -293,10 +297,12 @@ } /** - * Returns the transparency mode for this Paint object. + * Returns the transparency mode for this {@code Paint} object. * - * @return an integer value representing the transparency mode for - * this Paint object + * @return {@code OPAQUE} if all colors used by this + * {@code Paint} object are opaque, + * {@code TRANSLUCENT} if at least one of the + * colors used by this {@code Paint} object is not opaque. * @see java.awt.Transparency */ public final int getTransparency() { diff -r f317a5eb26da -r 0ab2251ed456 jdk/src/share/classes/java/awt/RadialGradientPaint.java --- a/jdk/src/share/classes/java/awt/RadialGradientPaint.java Fri Mar 18 23:33:34 2011 -0700 +++ b/jdk/src/share/classes/java/awt/RadialGradientPaint.java Mon Mar 21 16:53:50 2011 -0700 @@ -71,8 +71,24 @@ * * *
- * The user may also select what action the {@code RadialGradientPaint} - * should take when filling color outside the bounds of the circle's radius. + * The user may also select what action the {@code RadialGradientPaint} object + * takes when it is filling the space outside the circle's radius by + * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}. + * The gradient color proportions are equal for any particular line drawn + * from the focus point. The following figure shows that the distance AB + * is equal to the distance BC, and the distance AD is equal to the distance DE. + *