Package org.jfree.ui
Class StandardGradientPaintTransformer
- java.lang.Object
-
- org.jfree.ui.StandardGradientPaintTransformer
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,GradientPaintTransformer,PublicCloneable
public class StandardGradientPaintTransformer extends java.lang.Object implements GradientPaintTransformer, java.lang.Cloneable, PublicCloneable, java.io.Serializable
Transforms aGradientPaintto range over the width of a target shape.- Author:
- David Gilbert
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StandardGradientPaintTransformer()Creates a new transformer.StandardGradientPaintTransformer(GradientPaintTransformType type)Creates a new transformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns a clone of the transformer.booleanequals(java.lang.Object obj)Tests this instance for equality with an arbitrary object.inthashCode()Returns a hash code for this object.java.awt.GradientPainttransform(java.awt.GradientPaint paint, java.awt.Shape target)Transforms aGradientPaintinstance.
-
-
-
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
-
transform
public java.awt.GradientPaint transform(java.awt.GradientPaint paint, java.awt.Shape target)
Transforms aGradientPaintinstance.- Specified by:
transformin interfaceGradientPaintTransformer- Parameters:
paint- the original paint.target- the target shape.- Returns:
- The transformed paint.
-
equals
public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to test against (nullpermitted).- Returns:
- A boolean.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of the transformer.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classjava.lang.Object- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- not thrown by this class, but subclasses (if any) might.
-
hashCode
public int hashCode()
Returns a hash code for this object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-