com.arctorus.documents
Class Gradient

java.lang.Object
  extended by com.arctorus.documents.Gradient
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
GradientFromCenter, GradientLinear

public abstract class Gradient
extends java.lang.Object
implements java.lang.Cloneable

Abstract 2 colors gradient. By default gradient from BLACK to WHITE.

See Also:
GradientLinear, GradientFromCenter

Constructor Summary
Gradient(GradientType type)
          Create gradient with the specified type.
 
Method Summary
 java.awt.Color getEndColor()
          Return gradient end color.
 float getEndColorStop()
          Return end color stop.
 java.awt.Color getStartColor()
          Return gradient start color.
 float getStartColorStop()
          Return start color stop.
 GradientType getType()
          Return gradient type.
 boolean isRotate()
          Return whether the gradient rotated with shape.
 void setEndColor(java.awt.Color endColor)
          Set gradient end color.
 void setEndColorStop(float endColorStop)
          Set end color stop.
 void setRotate(boolean rotate)
          Set whether the gradient rotated with shape.
 void setStartColor(java.awt.Color startColor)
          Set gradient start color.
 void setStartColorStop(float startColorStop)
          Set start color stop.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gradient

public Gradient(GradientType type)
Create gradient with the specified type.

Parameters:
type - gradient type.
Method Detail

getStartColor

public java.awt.Color getStartColor()
Return gradient start color.


setStartColor

public void setStartColor(java.awt.Color startColor)
Set gradient start color.

Parameters:
startColor - new start color.

getEndColor

public java.awt.Color getEndColor()
Return gradient end color.


setEndColor

public void setEndColor(java.awt.Color endColor)
Set gradient end color.

Parameters:
endColor - new end color.

getType

public GradientType getType()
Return gradient type.


isRotate

public boolean isRotate()
Return whether the gradient rotated with shape.


setRotate

public void setRotate(boolean rotate)
Set whether the gradient rotated with shape.

Parameters:
rotate - true to rotate gradient with shape.

getStartColorStop

public float getStartColorStop()
Return start color stop. Value is in the range [0..1].


setStartColorStop

public void setStartColorStop(float startColorStop)
Set start color stop.

Parameters:
startColorStop - new color stop. Must be in the range [0..1].

getEndColorStop

public float getEndColorStop()
Return end color stop. Value is in the range [0..1].


setEndColorStop

public void setEndColorStop(float endColorStop)
Set end color stop.

Parameters:
endColorStop - new color stop. Must be in the range [0..1].