All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCFillStyle

java.lang.Object
   |
   +----jclass.chart.JCStyle
           |
           +----jclass.chart.JCFillStyle

public class JCFillStyle
extends JCStyle
Controls the appearance of a fill, including the fill pattern and the fill color. Note: Fill patterns are not currently supported in Java.

Properties

Name Method
Color The Color property determines the color used to fill regions in chart. The default value is generated.
Pattern The Pattern property determines the fill pattern used to fill regions in chart. Note: Since Java does not support patterned fills, this property is not supported. The default value is JCLineStyle.SOLID.
Image The Image property determines the image used to paint the fill region of bar charts. The default value is null.


Variable Index

 o CROSS_HATCHED
 o DIAG_HATCHED
 o HORIZ_STRIPE
 o NONE
 o PER_25
 o PER_50
 o PER_75
 o SOLID
 o STRIPE_135
 o STRIPE_45
 o VERT_STRIPE

Constructor Index

 o JCFillStyle(Color, int)
Constructor for fill style objects

Method Index

 o fillArc(Graphics, int, int, int, int, int, int)
Performs the requested fill given the values of the properties of the JCFillStyle instance.
 o fillArcShadow(Graphics, int, int, int, int, int, int)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance.
 o fillImageRect(Graphics, int, int, int, int, boolean, boolean)
Performs the requested fill with an image given the values of the properties of the JCFillStyle instance.
 o fillOutlinePolygonHighlight(Graphics, Polygon)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline.
 o fillOutlinePolygonHighlight(Graphics, Polygon, Color)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline.
 o fillOutlinePolygonHighlight(Graphics, Polygon, Color, int)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline for the specified sides.
 o fillOutlinePolygonShadow(Graphics, Polygon)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline.
 o fillOutlinePolygonShadow(Graphics, Polygon, Color)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline.
 o fillOutlinePolygonShadow(Graphics, Polygon, Color, int)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline for the specified sides.
 o fillOutlineRect(Graphics, int, int, int, int)
Performs the requested fill with a drawn outline given the values of the properties of the JCFillStyle instance.
 o fillOutlineRect(Graphics, int, int, int, int, Color)
Performs the requested fill with a drawn outline given the values of the properties of the JCFillStyle instance.
 o fillPolygon(Graphics, Polygon)
Performs the requested fill given the values of the properties of the JCFillStyle instance.
 o fillPolygonHighlight(Graphics, Polygon)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance.
 o fillPolygonShadow(Graphics, Polygon)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance.
 o fillRect(Graphics, int, int, int, int)
Performs the requested fill given the values of the properties of the JCFillStyle instance.
 o getColor()
Gets the Color property of JCFillStyle, which determines the color used to paint the fill region.
 o getImage()
Gets the Image property.
 o getPattern()
Gets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.
 o makeDefault(JCChart)
Creates a default fill style
 o setColor(Color)
Sets the Color property of JCFillStyle, which determines the color used to paint the fill region.
 o setImage(Component, String)
Sets the Image property of JCFillStyle, which determines the image used to paint the fill region of bar charts.
 o setImage(Image)
Sets the Image property.
 o setPattern(int)
Sets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.

Variables

 o NONE
  public final static int NONE
 o SOLID
  public final static int SOLID
 o PER_25
  public final static int PER_25
 o PER_50
  public final static int PER_50
 o PER_75
  public final static int PER_75
 o HORIZ_STRIPE
  public final static int HORIZ_STRIPE
 o VERT_STRIPE
  public final static int VERT_STRIPE
 o STRIPE_45
  public final static int STRIPE_45
 o STRIPE_135
  public final static int STRIPE_135
 o DIAG_HATCHED
  public final static int DIAG_HATCHED
 o CROSS_HATCHED
  public final static int CROSS_HATCHED

Constructors

 o JCFillStyle
  public JCFillStyle(Color c,
                     int p)
Constructor for fill style objects

Parameters:
c - fill color
p - fill pattern. One of NONE, SOLID, PER_25, PER_50, PER_75, HORIZ_STRIPE, VERT_STRIPE, STRIPE_45, STRIPE_135, DIAG_HATCHED, CROSS_HATCHED.

Methods

 o makeDefault
  public static JCFillStyle makeDefault(JCChart c)
Creates a default fill style

Returns:
JCFillStyle object with default color and fill pattern. The defaults are cycled, so consecutive calls will return different fill styles.
 o fillRect
  public void fillRect(Graphics gc,
                       int x,
                       int y,
                       int width,
                       int height)
Performs the requested fill given the values of the properties of the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
 o fillImageRect
  public void fillImageRect(Graphics gc,
                            int x,
                            int y,
                            int width,
                            int height,
                            boolean positive,
                            boolean inverted)
Performs the requested fill with an image given the values of the properties of the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
positive - true if the fill is occurring above the axis.
inverted - true if the axes are inverted.
 o fillOutlineRect
  public void fillOutlineRect(Graphics gc,
                              int x,
                              int y,
                              int width,
                              int height)
Performs the requested fill with a drawn outline given the values of the properties of the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
 o fillOutlineRect
  public void fillOutlineRect(Graphics gc,
                              int x,
                              int y,
                              int width,
                              int height,
                              Color localColor)
Performs the requested fill with a drawn outline given the values of the properties of the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
localColor - color of outline. If null, color will be calculated from fill color.
 o fillPolygon
  public void fillPolygon(Graphics gc,
                          Polygon poly)
Performs the requested fill given the values of the properties of the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
 o fillPolygonShadow
  public void fillPolygonShadow(Graphics gc,
                                Polygon poly)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
 o fillPolygonHighlight
  public void fillPolygonHighlight(Graphics gc,
                                   Polygon poly)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
 o fillOutlinePolygonShadow
  public void fillOutlinePolygonShadow(Graphics gc,
                                       Polygon poly)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
 o fillOutlinePolygonShadow
  public void fillOutlinePolygonShadow(Graphics gc,
                                       Polygon poly,
                                       Color localColor)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
localColor - color of outline. If null, color will be calculated from fill color.
 o fillOutlinePolygonShadow
  public void fillOutlinePolygonShadow(Graphics gc,
                                       Polygon poly,
                                       Color localColor,
                                       int sides)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance, including a drawn outline for the specified sides.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
localColor - color of outline. If null, color will be calculated from fill color.
sides - a value consisting of or-ed values of (2 ^ n) where n is the side number to be draw. (For example, to draw sides 0 and 2, the values would be (2^0 | 2^2) = 5).
 o fillOutlinePolygonHighlight
  public void fillOutlinePolygonHighlight(Graphics gc,
                                          Polygon poly)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
 o fillOutlinePolygonHighlight
  public void fillOutlinePolygonHighlight(Graphics gc,
                                          Polygon poly,
                                          Color localColor)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
localColor - color of outline. If null, color will be calculated from fill color.
 o fillOutlinePolygonHighlight
  public void fillOutlinePolygonHighlight(Graphics gc,
                                          Polygon poly,
                                          Color localColor,
                                          int sides)
Performs the requested fill in a color brighter than that specified in the JCFillStyle instance, including a drawn outline for the specified sides.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
localColor - color of outline. If null, color will be calculated from fill color.
sides - a value consisting of or-ed values of (2 ^ n) where n is the side number to be draw. (For example, to draw sides 0 and 2, the values would be (2^0 | 2^2) = 5).
 o fillArc
  public void fillArc(Graphics gc,
                      int x,
                      int y,
                      int width,
                      int height,
                      int startAngle,
                      int arcAngle)
Performs the requested fill given the values of the properties of the JCFillStyle instance.

Parameters:
gr - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
startAngle - start angle of the arc (in degrees)
arcAngle - size of arc to fill (in degrees)
 o fillArcShadow
  public void fillArcShadow(Graphics gc,
                            int x,
                            int y,
                            int width,
                            int height,
                            int startAngle,
                            int arcAngle)
Performs the requested fill in a color darker than that specified in the JCFillStyle instance.

Parameters:
gr - graphics context to use for drawing
x - x origin of fill region (in pixels)
y - y origin of fill region (in pixels)
width - width of fill region (in pixels)
height - height of fill region (in pixels)
startAngle - start angle of the arc (in degrees)
arcAngle - size of arc to fill (in degrees)
 o getColor
  public Color getColor()
Gets the Color property of JCFillStyle, which determines the color used to paint the fill region.

Returns:
AWT Color class representing the color to be used to paint the fills. If null, the current color of the Graphics object is used to paint the fill.
 o setColor
  public synchronized void setColor(Color clr)
Sets the Color property of JCFillStyle, which determines the color used to paint the fill region.

Parameters:
clr - AWT Color class representing the color to be used to paint the fills. If null, the current color of the Graphics object is used to paint the fill.
 o getPattern
  public int getPattern()
Gets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.

Returns:
fill pattern, which is one of NONE, SOLID, 25_PERCENT, 50_PERCENT, 75_PERCENT, HORIZ_STRIPE, VERT_STRIPE, 45_STRIPE, 135_STRIPE, DIAG_HATCHED or CROSS_HATCHED
 o setPattern
  public synchronized void setPattern(int pat)
Sets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.

Parameters:
pat - fill pattern, which is one of NONE, SOLID, 25_PERCENT, 50_PERCENT, 75_PERCENT, HORIZ_STRIPE, VERT_STRIPE, 45_STRIPE, 135_STRIPE, DIAG_HATCHED or CROSS_HATCHED
Throws: IllegalArgumentException
If Patter is not one of the valid enum values.
 o getImage
  public Image getImage()
Gets the Image property. The Image property determines the image used to paint the fill region of bar charts.

Returns:
AWT Image class representing the image to be used to paint image fills. If null, no image fill is done.
 o setImage
  public synchronized void setImage(Image img)
Sets the Image property. The Image property determines the image used to paint the fill region of bar charts.

Parameters:
img - AWT Image class representing the image to be used to paint image fills. If null, no image fill is done.
 o setImage
  public synchronized void setImage(Component comp,
                                    String file)
Sets the Image property of JCFillStyle, which determines the image used to paint the fill region of bar charts.

Parameters:
img - AWT Image class representing the image to be used to paint image fills. If null, no image fill is done.

All Packages  Class Hierarchy  This Package  Previous  Next  Index