org.jfree.ui
public class StandardGradientPaintTransformer extends Object implements GradientPaintTransformer, Cloneable, PublicCloneable, Serializable
GradientPaint
to range over the width of a target
shape. Instances of this class are immutable.
Constructor Summary | |
---|---|
StandardGradientPaintTransformer()
Creates a new transformer with the type
VERTICAL. | |
StandardGradientPaintTransformer(GradientPaintTransformType type)
Creates a new transformer with the specified type.
|
Method Summary | |
---|---|
Object | clone()
Returns a clone of the transformer. |
boolean | equals(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.
|
GradientPaint | transform(GradientPaint paint, Shape target)
Transforms a GradientPaint instance to fit the specified
target shape.
|
Parameters: type the transform type (null
not permitted).
Returns: A clone.
Throws: CloneNotSupportedException not thrown by this class, but subclasses (if any) might.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The type of transform (never null
).
Since: 1.0.10
Returns: A hash code.
GradientPaint
instance to fit the specified
target
shape.
Parameters: paint the original paint (null
not permitted). target the target shape (null
not permitted).
Returns: The transformed paint.