org.jfree.ui

Class StandardGradientPaintTransformer

public class StandardGradientPaintTransformer extends Object implements GradientPaintTransformer, Cloneable, PublicCloneable, Serializable

Transforms a GradientPaint to range over the width of a target shape.

Author: David Gilbert

Constructor Summary
StandardGradientPaintTransformer()
Creates a new transformer.
StandardGradientPaintTransformer(GradientPaintTransformType type)
Creates a new transformer.
Method Summary
Objectclone()
Returns a clone of the transformer.
booleanequals(Object obj)
Tests this instance for equality with an arbitrary object.
inthashCode()
Returns a hash code for this object.
GradientPainttransform(GradientPaint paint, Shape target)
Transforms a GradientPaint instance.

Constructor Detail

StandardGradientPaintTransformer

public StandardGradientPaintTransformer()
Creates a new transformer.

StandardGradientPaintTransformer

public StandardGradientPaintTransformer(GradientPaintTransformType type)
Creates a new transformer.

Parameters: type the transform type.

Method Detail

clone

public Object clone()
Returns a clone of the transformer.

Returns: A clone.

Throws: CloneNotSupportedException not thrown by this class, but subclasses (if any) might.

equals

public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.

Parameters: obj the object to test against (null permitted).

Returns: A boolean.

hashCode

public int hashCode()
Returns a hash code for this object.

Returns: A hash code.

transform

public GradientPaint transform(GradientPaint paint, Shape target)
Transforms a GradientPaint instance.

Parameters: paint the original paint. target the target shape.

Returns: The transformed paint.