JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCFillStyle

java.lang.Object
  |
  +--com.klg.jclass.chart3d.JCStyle
        |
        +--com.klg.jclass.chart3d.JCFillStyle
All Implemented Interfaces:
Serializable

public class JCFillStyle
extends JCStyle

Controls the appearance of a fill, including the fill pattern and the fill color.

See Also:
Serialized Form

Field Summary
protected  Rectangle anchorRect
          Anchor rectangle for fill patterns.
protected  Color backgroundColor
          Sets the background color (for patterned fills).
static int BOTTOM
           
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
protected  BufferedImage buffImage
          Image used for filling with images.
static int CENTER
           
protected  Color color
          Sets the fill color.
protected  int colorIndex
          Sets the index of the fill color in the default color array.
static int CROSS_HATCHED
           
static String[] CROSS_HATCHED_PIXELS
           
static int CUSTOM_FILL
           
static int CUSTOM_PAINT
           
static int CUSTOM_STACK
           
protected  TexturePaint customPaint
          Custom fill paint property that has been set by the user.
static int DIAG_HATCHED
           
static String[] DIAG_HATCHED_PIXELS
           
protected  Paint fillPaint
          Fill paint object.
protected  Paint hiFillPaint
          Highlights the fill paint object.
static int HORIZ_STRIPE
           
static String[] HORIZ_STRIPE_PIXELS
           
protected  Image image
          Image used to paint the fill region.
static int LEFT
           
static int NONE
           
protected  int orientation
          Orientation for fill patterns.
protected  int pattern
          Sets the fill pattern.
static int PER_25
           
static String[] PER_25_PIXELS
           
static int PER_50
           
static String[] PER_50_PIXELS
           
static int PER_75
           
static String[] PER_75_PIXELS
           
static int RIGHT
           
protected  Paint shFillPaint
          Shadow fill paint object.
static int SOLID
           
static int STRIPE_135
           
static String[] STRIPE_135_PIXELS
           
static int STRIPE_45
           
static String[] STRIPE_45_PIXELS
           
static int TOP
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
static int VERT_STRIPE
           
static String[] VERT_STRIPE_PIXELS
           
 
Fields inherited from class com.klg.jclass.chart3d.JCStyle
defaultColors, FILL_STYLE, LINE_STYLE, parent, SYMBOL_STYLE
 
Constructor Summary
JCFillStyle(Color color, int pattern)
          Constructor for fill style objects.
 
Method Summary
 void drawOutlineLine(Graphics gc, Polygon poly, int start, int end, Color localColor)
          Draws a portion of the outline around the given polygon.
 void drawOutlinePolygon(Graphics gc, Polygon poly, Color localColor)
          Draws an outline around the given polygon.
 void drawOutlineRect(Graphics gc, int x, int y, int width, int height, Color localColor)
          Draws an outline around the specified rectangle.
 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.
 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.
 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.
 void fillOutlinePartialPolygon(Graphics gc, Polygon poly, Color localColor)
          Performs the requested fill for a partial polygon with a drawn outline given the values of the properties of the JCFillStyle instance.
 void fillOutlinePolygon(Graphics gc, Polygon poly, Color localColor)
          Performs the requested fill with a drawn outline given the values of the properties of the JCFillStyle instance.
 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.
 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.
 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.
 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.
 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.
 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.
 void fillPolygon(Graphics gc, Polygon poly)
          Performs the requested fill given the values of the properties of the JCFillStyle instance.
 void fillPolygonHighlight(Graphics gc, Polygon poly)
          Performs the requested fill in a color brighter than that specified in the JCFillStyle instance.
 void fillPolygonShadow(Graphics gc, Polygon poly)
          Performs the requested fill in a color darker than that specified in the JCFillStyle instance.
 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.
 Color getBackground()
          Gets the Background property of JCFillStyle, which determines the background color used in painting patterned fills.
 Color getColor()
          Gets the Color property of JCFillStyle, which determines the color used to paint the fill region.
 int getColorIndex()
          Returns the index used to generate the color.
 TexturePaint getCustomPaint()
          Gets the custom fill paint property that has been set by the user.
 Image getImage()
          Gets the Image property.
 int getPattern()
          Gets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.
protected  boolean isCustomStackable()
          Returns true if this fill style can be used for custom image stacking; that is, if the pattern is CUSTOM_STACK and an image is present.
 BufferedImage makeBufferedImage()
          Makes the BufferedImage for future fill paint operations using the color specified in the Color property.
 BufferedImage makeBufferedImage(Color useFgColor)
          Makes the BufferedImage object for fill operations using specified color.
 BufferedImage makeBufferedImage(Image im)
          Makes the BufferedImage object for fill operations using specified image.
static com.klg.jclass.chart3d.JCFillStyle makeDefault(com.klg.jclass.chart3d.JCChart3d c)
          Creates a default fill style.
 Paint makeFillPaint()
          Makes the Paint object for fill operations using the previously created buffered image, the default foreground color, and no anchor rectangle.
 Paint makeFillPaint(BufferedImage useImage, Color useFgColor, Rectangle anchor, int orientation)
          Makes the Paint object for fill operations using specified buffered image anchored in the center of the provided rectangle.
 void resetFillOrientation()
          Resets the fill orientation properties before the next fill operation.
 void resetGraphics(Graphics gc)
          Resets the graphics object to a default drawing style.
 void setBackground(Color color)
          Sets the Background property of JCFillStyle, which determines the background color used in painting patterned fills.
 void setColor(Color color)
          Sets the Color property of JCFillStyle, which determines the color used to paint the fill region.
 void setCustomPaint(TexturePaint customPaint)
          Sets a custom fill paint property in JCFillStyle, which controls the pattern used to fill the specified region.
 void setImage(Image image)
          Sets the Image property.
 void setImage(String file)
          Sets the Image property of JCFillStyle, which determines the image used to paint the fill region.
 void setPattern(int pattern)
          Sets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.
 void updateFillOrientation(Rectangle rect, int newOrient)
          Updates the fill orientation properties for a pending fill operation.
 boolean updateGraphics(Graphics gc)
          Updates the graphics object with the elements of this line style (paint fills and colors), with the patterned fills being centered around the anchor rectangle that may have been set.
 boolean updateGraphicsToHighlight(Graphics gc)
          Updates the graphics object with the highlight elements of this line style (paint fills and colors), centered around the anchor rectangle that may have been set.
 boolean updateGraphicsToShadow(Graphics gc)
          Updates the graphics object with the shadow elements of this line style (paint fills and colors), centered around the anchor rectangle that may have been set.
 
Methods inherited from class com.klg.jclass.chart3d.JCStyle
getDefaultColors, setDefaultColors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

protected Color color
Sets the fill color.


backgroundColor

protected Color backgroundColor
Sets the background color (for patterned fills).


pattern

protected int pattern
Sets the fill pattern.


colorIndex

protected int colorIndex
Sets the index of the fill color in the default color array.


image

protected Image image
Image used to paint the fill region.


anchorRect

protected Rectangle anchorRect
Anchor rectangle for fill patterns.


orientation

protected int orientation
Orientation for fill patterns.


customPaint

protected TexturePaint customPaint
Custom fill paint property that has been set by the user.


fillPaint

protected Paint fillPaint
Fill paint object.


hiFillPaint

protected Paint hiFillPaint
Highlights the fill paint object.


shFillPaint

protected Paint shFillPaint
Shadow fill paint object.


buffImage

protected BufferedImage buffImage
Image used for filling with images.


TOP

public static final int TOP
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

CENTER

public static final int CENTER
See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
See Also:
Constant Field Values

TOP_LEFT

public static final int TOP_LEFT
See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

SOLID

public static final int SOLID
See Also:
Constant Field Values

PER_25

public static final int PER_25
See Also:
Constant Field Values

PER_50

public static final int PER_50
See Also:
Constant Field Values

PER_75

public static final int PER_75
See Also:
Constant Field Values

HORIZ_STRIPE

public static final int HORIZ_STRIPE
See Also:
Constant Field Values

VERT_STRIPE

public static final int VERT_STRIPE
See Also:
Constant Field Values

STRIPE_45

public static final int STRIPE_45
See Also:
Constant Field Values

STRIPE_135

public static final int STRIPE_135
See Also:
Constant Field Values

DIAG_HATCHED

public static final int DIAG_HATCHED
See Also:
Constant Field Values

CROSS_HATCHED

public static final int CROSS_HATCHED
See Also:
Constant Field Values

CUSTOM_FILL

public static final int CUSTOM_FILL
See Also:
Constant Field Values

CUSTOM_STACK

public static final int CUSTOM_STACK
See Also:
Constant Field Values

CUSTOM_PAINT

public static final int CUSTOM_PAINT
See Also:
Constant Field Values

PER_25_PIXELS

public static final String[] PER_25_PIXELS

PER_50_PIXELS

public static final String[] PER_50_PIXELS

PER_75_PIXELS

public static final String[] PER_75_PIXELS

HORIZ_STRIPE_PIXELS

public static final String[] HORIZ_STRIPE_PIXELS

VERT_STRIPE_PIXELS

public static final String[] VERT_STRIPE_PIXELS

STRIPE_45_PIXELS

public static final String[] STRIPE_45_PIXELS

STRIPE_135_PIXELS

public static final String[] STRIPE_135_PIXELS

DIAG_HATCHED_PIXELS

public static final String[] DIAG_HATCHED_PIXELS

CROSS_HATCHED_PIXELS

public static final String[] CROSS_HATCHED_PIXELS
Constructor Detail

JCFillStyle

public JCFillStyle(Color color,
                   int pattern)
Constructor for fill style objects.

Parameters:
color - fill color
pattern - Fill pattern. One of NONE, SOLID, PER_25, PER_50, PER_75, HORIZ_STRIPE, VERT_STRIPE, STRIPE_45, STRIPE_135, DIAG_HATCHED, or CROSS_HATCHED.
Method Detail

makeDefault

public static com.klg.jclass.chart3d.JCFillStyle makeDefault(com.klg.jclass.chart3d.JCChart3d c)
Creates a default fill style.

Parameters:
c - Chart3d object to base default fill style on
Returns:
JCFillStyle object with default color and fill pattern. The defaults are cycled, so consecutive calls will return different fill styles.

updateGraphics

public boolean updateGraphics(Graphics gc)
Updates the graphics object with the elements of this line style (paint fills and colors), with the patterned fills being centered around the anchor rectangle that may have been set.

Parameters:
gc - Graphics object to change
Returns:
true if you should now use this object to draw; false if the style is such that no drawing should occur

updateGraphicsToShadow

public boolean updateGraphicsToShadow(Graphics gc)
Updates the graphics object with the shadow elements of this line style (paint fills and colors), centered around the anchor rectangle that may have been set.

Parameters:
gc - Graphics object to change
Returns:
true if you should now use this object to draw; false if the style is such that no drawing should occur

updateGraphicsToHighlight

public boolean updateGraphicsToHighlight(Graphics gc)
Updates the graphics object with the highlight elements of this line style (paint fills and colors), centered around the anchor rectangle that may have been set.

Parameters:
gc - Graphics object to change
Returns:
true if you should now use this object to draw; false if the style is such that no drawing should occur

resetGraphics

public void resetGraphics(Graphics gc)
Resets the graphics object to a default drawing style.

Parameters:
gc - Graphics object to reset

updateFillOrientation

public void updateFillOrientation(Rectangle rect,
                                  int newOrient)
Updates the fill orientation properties for a pending fill operation. These are not actually properties of the fill style; they are calculated by the drawable and set here so that they don't need to be passed into the fill methods.

Parameters:
rect - the new anchor rectangle
newOrient - the new orientatoin

resetFillOrientation

public void resetFillOrientation()
Resets the fill orientation properties before the next fill operation.


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)

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

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)

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 the outline. If null, color will be calculated from the fill color.

drawOutlineRect

public void drawOutlineRect(Graphics gc,
                            int x,
                            int y,
                            int width,
                            int height,
                            Color localColor)
Draws an outline around the specified rectangle.

Parameters:
gc - graphics context to use for drawing
x - x origin of rectangle (in pixels)
y - y origin of outline (in pixels)
width - width of outline (in pixels)
height - height of outline (in pixels)
localColor - Color of the outline. If null, color will be calculated from the fill color.

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

fillOutlinePolygon

public void fillOutlinePolygon(Graphics gc,
                               Polygon poly,
                               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
poly - polygon to fill
localColor - Color of the outline. If null, color will be calculated from the fill color.

drawOutlinePolygon

public void drawOutlinePolygon(Graphics gc,
                               Polygon poly,
                               Color localColor)
Draws an outline around the given polygon.

Parameters:
gc - graphics context to use for drawing
poly - polygon to outline
localColor - Color of the outline. If null, color will be calculated from the fill color.

drawOutlineLine

public void drawOutlineLine(Graphics gc,
                            Polygon poly,
                            int start,
                            int end,
                            Color localColor)
Draws a portion of the outline around the given polygon.

Parameters:
gc - graphics context to use for drawing
poly - polygon to outline
start - the index of the point within the polygon to start drawing at
end - the index of the point within the polygon to stop drawing at
localColor - Color of the outline. If null, color will be calculated from the fill color.

fillOutlinePartialPolygon

public void fillOutlinePartialPolygon(Graphics gc,
                                      Polygon poly,
                                      Color localColor)
Performs the requested fill for a partial polygon with a drawn outline given the values of the properties of the JCFillStyle instance. A partial polygon is a polygon that is not closed. A line between the first and last points will be drawn in the fill color. The line outlining the rest of the polygon will be drawn in the color specified by localColor.

Parameters:
gc - graphics context to use for drawing
poly - polygon to fill
localColor - Color of the outline. If null, color will be calculated from the fill color.

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

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

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

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 the outline. If null, color will be calculated from the fill color.

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

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 the outline. If null, color will be calculated from the fill color.

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:
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)
startAngle - start angle of the arc (in degrees)
arcAngle - size of arc to fill (in degrees)

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:
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)
startAngle - start angle of the arc (in degrees)
arcAngle - size of arc to fill (in degrees)

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.

setColor

public void setColor(Color color)
Sets the Color property of JCFillStyle, which determines the color used to paint the fill region.

Parameters:
color - 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.

getBackground

public Color getBackground()
Gets the Background property of JCFillStyle, which determines the background color used in painting patterned fills. If null, the plot cube's (or if null the chart area's) background color will be used.

Returns:
AWT Color class representing the color to be used for the background when painting patterned fills.

setBackground

public void setBackground(Color color)
Sets the Background property of JCFillStyle, which determines the background color used in painting patterned fills. If null, the plot cube's (or if null the chart area's) background color will be used.

Parameters:
color - AWT Color class representing the color to be used for the background when painting patterned fills.

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, CROSS_HATCHED, CUSTOM_FILL, or CUSTOM_STACK

setPattern

public void setPattern(int pattern)
Sets the Pattern property of JCFillStyle, which controls the pattern used to fill the specified region.

Parameters:
pattern - fill pattern, which is one of NONE, SOLID, 25_PERCENT, 50_PERCENT, 75_PERCENT, HORIZ_STRIPE, VERT_STRIPE, 45_STRIPE, 135_STRIPE, DIAG_HATCHED, CROSS_HATCHED, CUSTOM_FILL, or CUSTOM_STACK (CUSTOM_STACK is only used by bar charts)

getCustomPaint

public TexturePaint getCustomPaint()
Gets the custom fill paint property that has been set by the user.

Returns:
the custom fill paint object that was set by the user (null if not set)

setCustomPaint

public void setCustomPaint(TexturePaint customPaint)
Sets a custom fill paint property in JCFillStyle, which controls the pattern used to fill the specified region. This property is used when the pattern has been set to CUSTOM_PAINT.

Parameters:
customPaint -

getImage

public Image getImage()
Gets the Image property. The Image property determines the custom image used to paint the fill region.

Returns:
AWT Image class representing the image to be used to paint image fills; if null, no image fill is done

setImage

public void setImage(Image image)
Sets the Image property. The Image property determines the custom image used to paint the fill region.

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

setImage

public void setImage(String file)
Sets the Image property of JCFillStyle, which determines the image used to paint the fill region. Only bar charts use this property.

Parameters:
file - the file from which to get the image

getColorIndex

public int getColorIndex()
Returns the index used to generate the color. Only set if default colors are used.

Returns:
the current color index

makeBufferedImage

public BufferedImage makeBufferedImage()
Makes the BufferedImage for future fill paint operations using the color specified in the Color property.

Returns:
a buffered image based on the fill color

makeBufferedImage

public BufferedImage makeBufferedImage(Color useFgColor)
Makes the BufferedImage object for fill operations using specified color.

Parameters:
useFgColor - the foreground color to use
Returns:

makeBufferedImage

public BufferedImage makeBufferedImage(Image im)
Makes the BufferedImage object for fill operations using specified image.

Parameters:
im - image to base buffered image on
Returns:

makeFillPaint

public Paint makeFillPaint()
Makes the Paint object for fill operations using the previously created buffered image, the default foreground color, and no anchor rectangle.

Returns:

makeFillPaint

public Paint makeFillPaint(BufferedImage useImage,
                           Color useFgColor,
                           Rectangle anchor,
                           int orientation)
Makes the Paint object for fill operations using specified buffered image anchored in the center of the provided rectangle.

Parameters:
useImage - BufferedImage object to use for Paint object creation. If null, returns default color as Paint.
useFgColor -
anchor - Anchor rectangle to center Paint pattern within. If null, no rectangle is used and default Paint behavior is used.
orientation -
Returns:

isCustomStackable

protected boolean isCustomStackable()
Returns true if this fill style can be used for custom image stacking; that is, if the pattern is CUSTOM_STACK and an image is present. Returns false otherwise.

Returns:
Returns true if this fill style can be used for custom image stacking; that is, if the pattern is CUSTOM_STACK and an image is present. Returns false otherwise.

Copyright © 2004 Quest Software Inc..
All rights reserved.