JMSLTM Numerical Library 4.0

com.imsl.chart
Class FillPaint

java.lang.Object
  extended bycom.imsl.chart.FillPaint

public class FillPaint
extends Object

A collection of methods to create Paint objects for fill areas. All of the Paint objects returned by the methods in this class are Serializable, unlike most Paint objects.

See Also:
Chart Programmer's Guide: Fill Attributes

Method Summary
static Paint checkerboard(int n, Color colorA, Color colorB)
          Returns a checkerboard pattern.
static Paint crosshatch(int n, int p, Color colorBackground, Color colorLine)
          Returns a horizonal and vertical crosshatch pattern.
static Paint diagonal(int n, Color colorA, Color colorB)
          Returns a diagonal pattern.
static Paint diamond(int n, int p, Color colorBackground, Color colorLine)
          Returns a diamond pattern (a checkerboard rotated 45 degrees).
static Paint diamondHatch(int n, int p, Color colorBackground, Color colorLine)
          Returns a crosshatch on a 45 degree angle.
static Paint dot(int n, int r, Color colorBackground, Color colorCircle)
          Returns a pattern that is an array of circles.
static Paint horizontalStripe(int n, int p, Color colorBackground, Color colorLine)
          Returns a horizontally striped pattern.
static Paint image(ImageIcon imageIcon)
          Returns a tiling of an image.
static Paint verticalStripe(int n, int p, Color colorBackground, Color colorLine)
          Returns a vertically striped pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkerboard

public static Paint checkerboard(int n,
                                 Color colorA,
                                 Color colorB)
Returns a checkerboard pattern.

Parameters:
n - is the size of the pattern in pixels.
colorA - is one of the colors.
colorB - is the other color.
Returns:
a Paint containing the checkerboard pattern.

crosshatch

public static Paint crosshatch(int n,
                               int p,
                               Color colorBackground,
                               Color colorLine)
Returns a horizonal and vertical crosshatch pattern.

Parameters:
n - is the size of the pattern in pixels.
p - is the number of pixels between the vertical lines.
colorBackground - is the background color.
colorLine - is the line color.
Returns:
a Paint containing the pattern.

diagonal

public static Paint diagonal(int n,
                             Color colorA,
                             Color colorB)
Returns a diagonal pattern.

Parameters:
n - is the size of the pattern in pixels.
colorA - is one of the colors.
colorB - is the other color.
Returns:
a Paint containing the checkerboard pattern.

diamond

public static Paint diamond(int n,
                            int p,
                            Color colorBackground,
                            Color colorLine)
Returns a diamond pattern (a checkerboard rotated 45 degrees).

Parameters:
n - is the size of the pattern in pixels.
p - is the thickness of the line.
colorBackground - is the color of the background.
colorLine - is the color of the line.
Returns:
a Paint containing the diamond pattern.

diamondHatch

public static Paint diamondHatch(int n,
                                 int p,
                                 Color colorBackground,
                                 Color colorLine)
Returns a crosshatch on a 45 degree angle.

Parameters:
n - is the size of the pattern in pixels.
p - is the number of pixels between the vertical lines.
colorBackground - is the background color.
colorLine - is the line color.
Returns:
a Paint containing the pattern.

dot

public static Paint dot(int n,
                        int r,
                        Color colorBackground,
                        Color colorCircle)
Returns a pattern that is an array of circles.

Parameters:
n - is the size of the pattern in pixels.
r - is the radius, in pixels, of the circles in the pattern.
colorBackground - is the background color.
colorCircle - is the color of the circles.
Returns:
a Paint containing the pattern.

horizontalStripe

public static Paint horizontalStripe(int n,
                                     int p,
                                     Color colorBackground,
                                     Color colorLine)
Returns a horizontally striped pattern.

Parameters:
n - is the size of the pattern in pixels.
p - is the number of pixels between the vertical lines.
colorBackground - is the background color.
colorLine - is the line color.
Returns:
a Paint containing the pattern.

image

public static Paint image(ImageIcon imageIcon)
Returns a tiling of an image.

Parameters:
imageIcon - is the image to be tiled.
Returns:
a Paint containing the tiling of the image.

verticalStripe

public static Paint verticalStripe(int n,
                                   int p,
                                   Color colorBackground,
                                   Color colorLine)
Returns a vertically striped pattern.

Parameters:
n - is the size of the pattern in pixels.
p - is the number of pixels between the vertical lines.
colorBackground - is the background color.
colorLine - is the line color.
Returns:
a Paint containing the pattern.

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.