Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.java4less.rchart
Class FillStyle

    java.lang.Object
      |
      +--com.java4less.rchart.FillStyle

public class FillStyle
extends java.lang.Object

    This class fills an area. It contains the description of how the filling should looks like.

    The following code creates the fillings for the columns:

        BarDataSerie data1= new BarDataSerie(d1,new FillStyle(GraphicsProvider.getColor(ChartColor.BLUE)));

        BarDataSerie data2= new BarDataSerie(d2,new FillStyle(GraphicsProvider.getColor(ChartColor.RED));

Field Summary
`float` | `alphaValue` clear (0), transparency (0.5), opaque (1).
`ChartColor` | `colorFrom` Initial color used for the gradient.
`ChartColor` | `colorUntil` Final color used for the gradient.
`java.lang.Object` | `fillPatern` fill pattern
`static int` | `GRADIENT_HORIZONTAL`
`static int` | `GRADIENT_VERTICAL`
`boolean` | `gradientCyclic`
`int` | `gradientType`
`static int` | `NO_GRADIENT`
`ChartImage` | `textureImage`

Constructor Summary
`FillStyle(ChartColor c)` Creates a fill style for the color c.
`FillStyle(ChartColor c, float f)` Creates a fill style.
`FillStyle(ChartImage i)` Creates a fill style using the image as filling

Method Summary
`static FillStyle` | `createFromString(java.lang.String f)` create style form string
`void` | `drawRoundRect(ChartGraphics g, int x1, int y1, int x2, int y2)`
`ChartColor` | `getColor()` get color used for filling the area.
`java.lang.String` | `toString()` convert Filling to its string value

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NO_GRADIENT

    public static int NO_GRADIENT

### GRADIENT_HORIZONTAL

    public static int GRADIENT_HORIZONTAL

### GRADIENT_VERTICAL

    public static int GRADIENT_VERTICAL

### fillPatern

    public java.lang.Object fillPatern

  fill pattern

### alphaValue

    public float alphaValue

  clear (0), transparency (0.5), opaque (1).

### colorFrom

    public ChartColor colorFrom

  Initial color used for the gradient.

### colorUntil

    public ChartColor colorUntil

  Final color used for the gradient. Example of use: chart.back.colorUntil=GraphicsProvider.getColor(ChartColor.BLUE); chart.back.colorFrom=GraphicsProvider.getColor(ChartColor.WHITE); chart.back.gradientType=FillStyle.GRADIENT_HORIZONTAL;

### gradientType

    public int gradientType

### gradientCyclic

    public boolean gradientCyclic

### textureImage

    public ChartImage textureImage

Constructor Detail

### FillStyle

    public FillStyle(ChartColor c)

  Creates a fill style for the color c.

Parameters:
  `c` - color

### FillStyle

    public FillStyle(ChartImage i)

  Creates a fill style using the image as filling

### FillStyle

    public FillStyle(ChartColor c,
                     float f)

  Creates a fill style.

Parameters:
  `c` - color
  `f` - transparency alpha value (0-1)

Method Detail

### toString

    public java.lang.String toString()

  convert Filling to its string value

  Overrides:
    `toString` in class `java.lang.Object`

### createFromString

    public static FillStyle createFromString(java.lang.String f)

  create style form string

  Parameters:
    `f` -
  Returns:

### getColor

    public ChartColor getColor()

  get color used for filling the area.

  Returns:

### drawRoundRect

    public void drawRoundRect(ChartGraphics g,
                              int x1,
                              int y1,
                              int x2,
                              int y2)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD