com.googlecode.charts4j
Class Fills

java.lang.Object
  extended by com.googlecode.charts4j.Fills

public final class Fills
extends Object

Static factory class for Fill hierarchy. Construct LinearGradientFill, LinearStripesFill, Fill

Author:
Julien Chastang (julien.c.chastang at gmail dot com)

Method Summary
static LinearGradientFill newLinearGradientFill(int angle, Color color, double offset)
          Create linear gradient fill.
static LinearStripesFill newLinearStripesFill(int angle, Color color, double width)
          Create linear stripes fill.
static Fill newSolidFill(Color color)
          Create a solid fill.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newLinearGradientFill

public static LinearGradientFill newLinearGradientFill(int angle,
                                                       Color color,
                                                       double offset)
Create linear gradient fill.

Parameters:
angle - specifies the angle of the gradient between 0 (horizontal) and 90 (vertical).
color - color for gradient.Cannot be null.
offset - specify at what point the color is pure where: 0 specifies the left-most chart position and 100 the right-most.
Returns:
a newly constructed linear gradient fill

newLinearStripesFill

public static LinearStripesFill newLinearStripesFill(int angle,
                                                     Color color,
                                                     double width)
Create linear stripes fill.

Parameters:
angle - specifies the angle of the gradient between 0 (horizontal) and 90 (vertical)
color - color of stripe.
width - must be between 0 and 100 where 100 is the full width of the chart. Stripes are repeated until the chart is filled.
Returns:
a newly constructed linear stripes fill

newSolidFill

public static Fill newSolidFill(Color color)
Create a solid fill.

Parameters:
color - color of solid fill.
Returns:
a newly constructed solid fill