public class StandardGradientPaintTransformer extends java.lang.Object implements GradientPaintTransformer, java.lang.Cloneable, PublicCloneable, java.io.Serializable
GradientPaint to range over the width of a target
shape. Instances of this class are immutable.| Constructor and Description |
|---|
StandardGradientPaintTransformer()
Creates a new transformer with the type
GradientPaintTransformType.VERTICAL. |
StandardGradientPaintTransformer(GradientPaintTransformType type)
Creates a new transformer with the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone of the transformer.
|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
GradientPaintTransformType |
getType()
Returns the type of transform.
|
int |
hashCode()
Returns a hash code for this object.
|
java.awt.GradientPaint |
transform(java.awt.GradientPaint paint,
java.awt.Shape target)
Transforms a
GradientPaint instance to fit the specified
target shape. |
public StandardGradientPaintTransformer()
GradientPaintTransformType.VERTICAL.public StandardGradientPaintTransformer(GradientPaintTransformType type)
type - the transform type (null not permitted).public GradientPaintTransformType getType()
null).public java.awt.GradientPaint transform(java.awt.GradientPaint paint,
java.awt.Shape target)
GradientPaint instance to fit the specified
target shape.transform in interface GradientPaintTransformerpaint - the original paint (null not permitted).target - the target shape (null not permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - not thrown by this class, but
subclasses (if any) might.public int hashCode()
hashCode in class java.lang.Object