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.
|
-
CROSS_HATCHED
-
-
DIAG_HATCHED
-
-
HORIZ_STRIPE
-
-
NONE
-
-
PER_25
-
-
PER_50
-
-
PER_75
-
-
SOLID
-
-
STRIPE_135
-
-
STRIPE_45
-
-
VERT_STRIPE
-
-
JCFillStyle(Color, int)
- Constructor for fill style objects
-
fillArc(Graphics, int, int, int, int, int, int)
- Performs the requested fill given the values of the properties
of the JCFillStyle instance.
-
fillArcShadow(Graphics, int, int, int, int, int, int)
- Performs the requested fill in a color darker than that specified in the
JCFillStyle instance.
-
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.
-
fillOutlinePolygon(Graphics, Polygon, Color)
- Performs the requested fill with a drawn outline given the values of the
properties of the JCFillStyle instance.
-
fillOutlinePolygonHighlight(Graphics, Polygon)
- Performs the requested fill in a color brighter than that specified in the
JCFillStyle instance, including a drawn outline.
-
fillOutlinePolygonHighlight(Graphics, Polygon, Color)
- Performs the requested fill in a color brighter than that specified in the
JCFillStyle instance, including a drawn outline.
-
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.
-
fillOutlinePolygonShadow(Graphics, Polygon)
- Performs the requested fill in a color darker than that specified in the
JCFillStyle instance, including a drawn outline.
-
fillOutlinePolygonShadow(Graphics, Polygon, Color)
- Performs the requested fill in a color darker than that specified in the
JCFillStyle instance, including a drawn outline.
-
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.
-
fillOutlineRect(Graphics, int, int, int, int)
- Performs the requested fill with a drawn outline given the values of
the properties of the JCFillStyle instance.
-
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.
-
fillPolygon(Graphics, Polygon)
- Performs the requested fill given the values of the properties
of the JCFillStyle instance.
-
fillPolygonHighlight(Graphics, Polygon)
- Performs the requested fill in a color brighter than that specified in the
JCFillStyle instance.
-
fillPolygonShadow(Graphics, Polygon)
- Performs the requested fill in a color darker than that specified in the
JCFillStyle instance.
-
fillRect(Graphics, int, int, int, int)
- Performs the requested fill given the values of the properties
of the JCFillStyle instance.
-
getColor()
- Gets the Color property of JCFillStyle, which determines the
color used to paint the fill region.
-
getImage()
- Gets the Image property.
-
getPattern()
- Gets the Pattern property of JCFillStyle, which controls the
pattern used to fill the specified region.
-
makeDefault(JCChart)
- Creates a default fill style
-
setColor(Color)
- Sets the Color property of JCFillStyle, which determines the
color used to paint the fill region.
-
setImage(Component, String)
- Sets the Image property of JCFillStyle, which determines the
image used to paint the fill region of bar charts.
-
setImage(Image)
- Sets the Image property.
-
setPattern(int)
- Sets the Pattern property of JCFillStyle, which controls the
pattern used to fill the specified region.
NONE
public static final int NONE
SOLID
public static final int SOLID
PER_25
public static final int PER_25
PER_50
public static final int PER_50
PER_75
public static final int PER_75
HORIZ_STRIPE
public static final int HORIZ_STRIPE
VERT_STRIPE
public static final int VERT_STRIPE
STRIPE_45
public static final int STRIPE_45
STRIPE_135
public static final int STRIPE_135
DIAG_HATCHED
public static final int DIAG_HATCHED
CROSS_HATCHED
public static final int CROSS_HATCHED
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.
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.
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 outline. If null, color will be calculated from
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 outline. If null, color will be calculated from
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 outline. If null, color will be calculated from
fill color.
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).
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 outline. If null, color will be calculated from
fill color.
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).
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)
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)
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 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.
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
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.
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.
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.
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