All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----MSBChart.FillStyle
This class fills an area. It contains the description of how the filling should looks like. If you are using jdk 1.1 some features may not be available (patterns and gradients).
The following code creates the fillings for the columns:
BarDataSerie data1= new BarDataSerie(d1,new FillStyle(java.awt.Color.blue));
BarDataSerie data2= new BarDataSerie(d2,new FillStyle(java.awt.Color.red));
In the code a BarDataSerie is created with the FillStyle for the bar.

 
 colorFrom
	colorFrom
   colorUntil
	colorUntil
   fillPatern
	fillPatern
   GRADIENT_HORIZONTAL
	GRADIENT_HORIZONTAL
   GRADIENT_VERTICAL
	GRADIENT_VERTICAL
   gradientCyclic
	gradientCyclic
   gradientType
	gradientType
   NO_GRADIENT
	NO_GRADIENT
   
 FillStyle(Color)
	FillStyle(Color)
   
 draw(Graphics, int, int, int, int)
	draw(Graphics, int, int, int, int)
   drawArc(Graphics, int, int, int, int, int, int)
	drawArc(Graphics, int, int, int, int, int, int)
   drawPolygon(Graphics, int[], int[], int)
	drawPolygon(Graphics, int[], int[], int)
   getColor()
	getColor()
   
 NO_GRADIENT
NO_GRADIENT
public static int NO_GRADIENT
 GRADIENT_HORIZONTAL
GRADIENT_HORIZONTAL
public static int GRADIENT_HORIZONTAL
 GRADIENT_VERTICAL
GRADIENT_VERTICAL
public static int GRADIENT_VERTICAL
 fillPatern
fillPatern
public Object fillPatern
TexturePaint (jdk 1.2) object used as pattern for the filling.
Example:
java.awt.image.BufferedImage bi = new java.awt.image.BufferedImage(5, 5,
                                java.awt.image.BufferedImage.TYPE_INT_RGB);
            java.awt.Graphics2D big = bi.createGraphics();
            big.setColor(Color.orange);
            big.fillRect(0, 0, 5, 5);
            big.setColor(Color.red);
            big.fillOval(0, 0, 5, 5);
            java.awt.Rectangle r = new java.awt.Rectangle(0,0,5,5);
            data1.style.fillPatern=(new java.awt.TexturePaint(bi, r));
 colorFrom
colorFrom
public Color colorFrom
Initial color used for the gradient.
 colorUntil
colorUntil
public Color colorUntil
Final color used for the gradient.
example:
chart.back.colorUntil=java.awt.Color.red;
chart.back.colorFrom=java.awt.Color.white;
chart.back.gradientType=FillStyle.GRADIENT_HORIZONTAL;
 gradientType
gradientType
public int gradientType
 gradientCyclic
gradientCyclic
public boolean gradientCyclic
 
 FillStyle
FillStyle
public FillStyle(Color c)
Creates a fill style for the color c.
 
 draw
draw
 public void draw(Graphics g,
                  int x1,
                  int y1,
                  int x2,
                  int y2)
fills a rectangle.
 drawArc
drawArc
 public void drawArc(Graphics g,
                     int x,
                     int y,
                     int w,
                     int h,
                     int a1,
                     int a2)
fills an arc.
 drawPolygon
drawPolygon
 public void drawPolygon(Graphics g,
                         int x1[],
                         int y1[],
                         int num)
fills a polygon.
 getColor
getColor
public Color getColor()
returns the color.
All Packages Class Hierarchy This Package Previous Next Index