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 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 |
---|---|
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. |
public StandardGradientPaintTransformer()
GradientPaintTransformType.VERTICAL
.public StandardGradientPaintTransformer(GradientPaintTransformType type)
type
- the transform type (null
not permitted).public GradientPaintTransformType getType()
null
).public GradientPaint transform(GradientPaint paint, Shape target)
GradientPaint
instance to fit the specified
target
shape.transform
in interface GradientPaintTransformer
paint
- the original paint (null
not permitted).target
- the target shape (null
not permitted).public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface PublicCloneable
clone
in class Object
CloneNotSupportedException
- not thrown by this class, but
subclasses (if any) might.Copyright © 2001–2017 JFree.org. All rights reserved.