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.
public static int NO_GRADIENT
public static int GRADIENT_HORIZONTAL
public static int GRADIENT_VERTICAL
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));
public Color colorFrom
Initial color used for the gradient.
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;
public int gradientType
public boolean gradientCyclic
public FillStyle(Color c)
Creates a fill style for the color c.
public void draw(Graphics g, int x1, int y1, int x2, int y2)
fills a rectangle.
public void drawArc(Graphics g, int x, int y, int w, int h, int a1, int a2)
fills an arc.
public void drawPolygon(Graphics g, int x1[], int y1[], int num)
fills a polygon.
public Color getColor()
returns the color.
All Packages Class Hierarchy This Package Previous Next Index