com.sas.graphics.components
Class FillStyle

com.sas.graphics.components.FillStyle

public class FillStyle

The FillStyle encapsulates display properties defining an area's fill by either a solid color, gradient colors or image. This class is used by graph models to define fills for data elements, axis walls, graph backgrounds and more.

Usage

There are separate color properties for different types of fills. The solid fill color is used only with solid fills. The gradient fill begin color and gradient fill end color are only used with gradient fills. The image fill color is used as a backdrop for an image fill (only appearing with transparent images or if the image's fill is not to stretch or tile the image).

The solid blend and gradient blend colors are only applicable with fill types that specify a blend. The blend color is applied to the area after it has already been filled with the fill colors and image. The transparency in the color allows for some interesting results.

The apply method is a convenience to allow the property setting of one FillStyle to be conveyed to another.

Set the GraphStyle's background fill to be a gradient fill from the bottom to the top going from green to yellow.

 GraphStyle graphStyle = new GraphStyle(GraphStyle.STYLE_SCIENCE);
 graphStyle.setBackgroundFillStyle(new FillStyle(Color.green, Color.yellow, FillStyle.GRADIENT_FILL_BOTTOM_TO_TOP));
 // Apply the GraphStyl to a barChart
 BarChart barChart = ...;
 barChart.applyGraphStyle(graphStyle);
 

Modify the GraphStyle's background fill to be a solid blue color:

 FillStyle backgroundFillStyle = graphStyle.getBackgroundFillStyle();
 backgroundFillStyle.setFillType(FILL_TYPE_SOLID_COLOR);
 backgroundFillStyle.setSolidFillColor(Color.blue);
 
This class comes with an apply method to easily convey the property setting from one fill style to another.
Use the FillStyle's apply method to set the GraphStyle's background fill to a solid green, the legend fill to a solid light gray and the axis wall and floor to a solid gray.

To modify the GraphStyle's Background FillStyle to fill with a solid blue color using apply:

 FillStyle fillStyle = new FillStyle(Color.green);
 graphStyle.getBackgroundFillStyle().apply(fillStyle);
 
 fillStyle.setSolidFillColor(Color.lightGray);
 graphStyle.getLegendBackgroundFillStyle().apply(fillStyle);
 
 fillStyle.setSolidFillColor(Color.gray);
 graphStyle.getWallFillStyle().apply(fillStyle);
 graphStyle.getFloorFillStyle().apply(fillStyle);
 
Also, you can modify the GraphStyle's Background FillStyle to be a gradient filled and use the barChart's applyGraphStyle() method to see the results:
 graphStyle.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 graphStyle.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_DIAGONAL_UP);
 graphStyle.getBackgroundFillStyle().setGradientFillEndColor(Color.BLACK);
 graphStyle.getBackgroundFillStyle().setGradientFillBeginColor(Color.ORANGE);
 barChart.applyGraphStyle(graphStyle);
 

Behavior

All FillStyle properties are bound properties.

Extending

Not intended for sub-classing.

Since:
SAS 9.1
See Also:
GraphStyle, ModelBase

Field Summary
static ConstantCollection FILL_TYPE
          FILL_TYPE enables a set of static actions associated with the public FILL_TYPE_ constants.
static int FILL_TYPE_GRADIENT
          Fill as a gradient blend from gradient fill begin color to gradient fill end color following the direction specified by the gradient fill.
static int FILL_TYPE_IMAGE
          Fill with image.
static int FILL_TYPE_IMAGE_COLOR_BLEND
          Same as FILL_TYPE_IMAGE followed by the application of the solid blend color on top of the area.
static int FILL_TYPE_IMAGE_GRADIENT_BLEND
          Same as FILL_TYPE_IMAGE followed by the application of a gradient blend on top of the area using the gradient blend begin color and gradient blend end color.
static int FILL_TYPE_SOLID_COLOR
          Fill with solid color.
static ConstantCollection GRADIENT_FILL
          GRADIENT_FILL enables a set of static actions associated with the public GRADIENT_FILL_ constants.
static int GRADIENT_FILL_BOTTOM_TO_TOP
          Gradient fill from bottom to top using the gradient fill begin color and gradient fill end color.
static int GRADIENT_FILL_DIAGONAL_DOWN
          Gradient fill diagonally from top to bottom using the gradient fill begin color and gradient fill end color.
static int GRADIENT_FILL_DIAGONAL_UP
          Gradient fill diagonally from bottom to top using the gradient fill begin color and gradient fill end color.
static int GRADIENT_FILL_FRONT_TO_BACK
          Gradient fill from front to back using the gradient fill begin color and gradient fill end color.
static int GRADIENT_FILL_LEFT_TO_RIGHT
          Gradient fill from left to right using the gradient fill begin color and gradient fill end color.
static ConstantCollection IMAGE_FILL
          IMAGE_FILL enables a set of static actions associated with the public IMAGE_FILL_ constants.
static int IMAGE_FILL_BOTTOM
          Fill the area using the image color and then draw the image justified at the bottom of the area.
static int IMAGE_FILL_BOTTOM_LEFT
          Fill the area using the image color and then draw the image justified at the bottom left corner of the area.
static int IMAGE_FILL_BOTTOM_RIGHT
          Fill the area using the image color and then draw the image justified at the bottom right corner of the area.
static int IMAGE_FILL_CENTER
          Fill the area using the image color and then draw the image centered justified in the area.
static int IMAGE_FILL_POINT
          Fill the area using the image color and then draw the image anchored a the position specified by the x and y properties.
static int IMAGE_FILL_STRETCH
          Stretch the image to fill the area.
static int IMAGE_FILL_TILE
          Tile the image to fill the area.
static int IMAGE_FILL_TOP
          Fill the area using the image color and then draw the image top justified in the area.
static int IMAGE_FILL_TOP_LEFT
          Fill the area using the image color and then draw the image left justified in the area.
static int IMAGE_FILL_TOP_RIGHT
          Fill the area using the image color and then draw the image justified at the top right corner of the area.
static java.lang.String RB_KEY
           
 
Constructor Summary
FillStyle()
          Constructs a solid white fill style.
FillStyle(java.awt.Color solidColor)
          Constructs a solid (FILL_TYPE_SOLID_COLOR) fill style of the specified color.
FillStyle(java.awt.Color beginColor, java.awt.Color endColor, int gradientFill)
          Constructs a gradient (FILL_TYPE_GRADIENT) fill style flowing from beginColor to endColor.
FillStyle(javax.swing.ImageIcon imageIcon, java.awt.Color imageFillColor, int imageFill)
          Constructs an image (FILL_TYPE_IMAGE) fill style using the specified image and matching imageColor.
 
Method Summary
 void apply(FillStyle theOtherObject)
          Utility method to convey properties contained in theOtherObject to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this FillStyle.
 int getFillType()
          Returns the type of fill.
 java.awt.Color getGradientBlendBeginColor()
          Returns the begin color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.
 java.awt.Color getGradientBlendEndColor()
          Returns the end color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.
 int getGradientFill()
          Returns the gradient fill direction.
 java.awt.Color getGradientFillBeginColor()
          Returns the gradient fill begin color used when the fill type is FillStyle.FILL_TYPE_GRADIENT.
 java.awt.Color getGradientFillEndColor()
          Returns the gradient fill end color used when the fill type is FillStyle.FILL_TYPE_GRADIENT.
 int getImageFill()
          Returns the image fill defining where to position the image and how the area is to be filled.
 java.awt.Color getImageFillColor()
          Returns the image's background color.
 javax.swing.ImageIcon getImageIcon()
          Returns the imageIcon used in this fill style.
 java.awt.Color getSolidBlendColor()
          Returns the color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_COLOR_BLEND.
 java.awt.Color getSolidFillColor()
          Returns the color used when the fill type is FillStyle.FILL_TYPE_SOLID_COLOR.
 int getX()
          Returns the "x" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.
 int getY()
          Returns the "y" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.
 int hashCode()
          Computes the hash code for this FillStyle.
 boolean isVisible()
          Returns whether or not the fill is visible.
 void setFillType(int newFillType)
          Sets the type of fill.
 void setGradientBlendBeginColor(java.awt.Color newColor)
          Sets the begin color of the Gradient fill that is applied to the area after the image has been applied.
 void setGradientBlendEndColor(java.awt.Color newColor)
          Sets the end color of a Gradient fill that is applied to the area after the image has been applied.
 void setGradientFill(int newGradientFill)
          Sets the gradient fill direction.
 void setGradientFillBeginColor(java.awt.Color newColor)
          Sets the gradient fill begin color used with FillStyle.FILL_TYPE_GRADIENT fills.
 void setGradientFillEndColor(java.awt.Color newColor)
          Sets the gradient fill end color used with FillStyle.FILL_TYPE_GRADIENT fills.
 void setImageFill(int newImageFill)
          Sets the image fill defining where to position the image and how the area is to be filled.
 void setImageFillColor(java.awt.Color newColor)
          Sets the color that is filled in the area prior to the image being applied.
 void setImageIcon(javax.swing.ImageIcon newImageIcon)
          Sets the image to be used in the fill area.
 void setSolidBlendColor(java.awt.Color newColor)
          Sets the color that is applied to the area after the image has been applied.
 void setSolidFillColor(java.awt.Color newColor)
          Sets the fill color used with FillStyle.FILL_TYPE_SOLID_COLOR fills.
 void setVisible(boolean newVisible)
          Sets whether the fill is visible.
 void setX(int newX)
          Sets the "x" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.
 void setY(int newY)
          Sets the "y" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

FILL_TYPE_SOLID_COLOR

public static final int FILL_TYPE_SOLID_COLOR
Fill with solid color.

See Also:
setFillType(int), setSolidFillColor(java.awt.Color), Constant Field Values

FILL_TYPE_GRADIENT

public static final int FILL_TYPE_GRADIENT
Fill as a gradient blend from gradient fill begin color to gradient fill end color following the direction specified by the gradient fill.

See Also:
setFillType(int), setGradientFill(int), setGradientFillBeginColor(java.awt.Color), setGradientFillEndColor(java.awt.Color), Constant Field Values

FILL_TYPE_IMAGE

public static final int FILL_TYPE_IMAGE
Fill with image. The image color is also used if the image is not tiled or stretched.

See Also:
setFillType(int), setImageFill(int), setImageIcon(javax.swing.ImageIcon), setImageFillColor(java.awt.Color), setX(int), setY(int), Constant Field Values

FILL_TYPE_IMAGE_COLOR_BLEND

public static final int FILL_TYPE_IMAGE_COLOR_BLEND
Same as FILL_TYPE_IMAGE followed by the application of the solid blend color on top of the area.

See Also:
setFillType(int), setImageFill(int), setImageIcon(javax.swing.ImageIcon), setSolidBlendColor(java.awt.Color), setX(int), setY(int), Constant Field Values

FILL_TYPE_IMAGE_GRADIENT_BLEND

public static final int FILL_TYPE_IMAGE_GRADIENT_BLEND
Same as FILL_TYPE_IMAGE followed by the application of a gradient blend on top of the area using the gradient blend begin color and gradient blend end color.

See Also:
setFillType(int), setImageFill(int), setImageIcon(javax.swing.ImageIcon), setGradientFill(int), setX(int), setY(int), Constant Field Values

FILL_TYPE

public static final ConstantCollection FILL_TYPE
FILL_TYPE enables a set of static actions associated with the public FILL_TYPE_ constants. These actions include: (1) validation (2) translation between constant value and string value (3) translation between constant value and JSP string value (4) translation between constant value and localised string value (5) generation of constant int or string arrays


GRADIENT_FILL_LEFT_TO_RIGHT

public static final int GRADIENT_FILL_LEFT_TO_RIGHT
Gradient fill from left to right using the gradient fill begin color and gradient fill end color. Note: the fill style has to be set to FILL_TYPE_GRADIENT for this to apply.
 gs.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 gs.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_LEFT_TO_RIGHT);
 

See Also:
setGradientFill(int), Constant Field Values

GRADIENT_FILL_BOTTOM_TO_TOP

public static final int GRADIENT_FILL_BOTTOM_TO_TOP
Gradient fill from bottom to top using the gradient fill begin color and gradient fill end color. Note: the fill style has to be set to FILL_TYPE_GRADIENT
 gs.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 gs.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_BOTTOM_TO_TOP);
 
for this to apply.

See Also:
setGradientFill(int), Constant Field Values

GRADIENT_FILL_FRONT_TO_BACK

public static final int GRADIENT_FILL_FRONT_TO_BACK
Gradient fill from front to back using the gradient fill begin color and gradient fill end color. Note: the fill style has to be set to FILL_TYPE_GRADIENT for this to apply.
 gs.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 gs.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_FRONT_TO_BACK);
 

See Also:
setGradientFill(int), Constant Field Values

GRADIENT_FILL_DIAGONAL_UP

public static final int GRADIENT_FILL_DIAGONAL_UP
Gradient fill diagonally from bottom to top using the gradient fill begin color and gradient fill end color. Note: the fill style has to be set to FILL_TYPE_GRADIENT for this to apply.
 gs.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 gs.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_DIAGONAL_UP);
 

See Also:
setGradientFill(int), Constant Field Values

GRADIENT_FILL_DIAGONAL_DOWN

public static final int GRADIENT_FILL_DIAGONAL_DOWN
Gradient fill diagonally from top to bottom using the gradient fill begin color and gradient fill end color. Note: the fill style has to be set to FILL_TYPE_GRADIENT for this to apply.
 gs.getBackgroundFillStyle().setFillType(FillStyle.FILL_TYPE_GRADIENT);
 gs.getBackgroundFillStyle().setGradientFill(FillStyle.GRADIENT_FILL_DIAGONAL_DOWN);
 

See Also:
setGradientFill(int), Constant Field Values

GRADIENT_FILL

public static final ConstantCollection GRADIENT_FILL
GRADIENT_FILL enables a set of static actions associated with the public GRADIENT_FILL_ constants. These actions include: (1) validation (2) translation between constant value and string value (3) translation between constant value and JSP string value (4) translation between constant value and localized string value (5) generation of constant int or string arrays


IMAGE_FILL_STRETCH

public static final int IMAGE_FILL_STRETCH
Stretch the image to fill the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_TILE

public static final int IMAGE_FILL_TILE
Tile the image to fill the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_POINT

public static final int IMAGE_FILL_POINT
Fill the area using the image color and then draw the image anchored a the position specified by the x and y properties. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_CENTER

public static final int IMAGE_FILL_CENTER
Fill the area using the image color and then draw the image centered justified in the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_TOP

public static final int IMAGE_FILL_TOP
Fill the area using the image color and then draw the image top justified in the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_TOP_LEFT

public static final int IMAGE_FILL_TOP_LEFT
Fill the area using the image color and then draw the image left justified in the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_TOP_RIGHT

public static final int IMAGE_FILL_TOP_RIGHT
Fill the area using the image color and then draw the image justified at the top right corner of the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_BOTTOM

public static final int IMAGE_FILL_BOTTOM
Fill the area using the image color and then draw the image justified at the bottom of the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_BOTTOM_LEFT

public static final int IMAGE_FILL_BOTTOM_LEFT
Fill the area using the image color and then draw the image justified at the bottom left corner of the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL_BOTTOM_RIGHT

public static final int IMAGE_FILL_BOTTOM_RIGHT
Fill the area using the image color and then draw the image justified at the bottom right corner of the area. Note: the setFillType(..) has to be set to FILL_TYPE_IMAGE, FILL_TYPE_IMAGE_COLOR_BLEND or FILL_TYPE_IMAGE_GRADIENT_BLEND for your image to appear.

See Also:
setImageFill(int), Constant Field Values

IMAGE_FILL

public static final ConstantCollection IMAGE_FILL
IMAGE_FILL enables a set of static actions associated with the public IMAGE_FILL_ constants. These actions include: (1) validation (2) translation between constant value and string value (3) translation between constant value and JSP string value (4) translation between constant value and localized string value (5) generation of constant int or string arrays

Constructor Detail

FillStyle

public FillStyle()
Constructs a solid white fill style.


FillStyle

public FillStyle(java.awt.Color solidColor)
Constructs a solid (FILL_TYPE_SOLID_COLOR) fill style of the specified color. If null is specified then the default solid color (white) is used.

Parameters:
solidColor - the solid fill color
See Also:
setSolidFillColor(java.awt.Color)

FillStyle

public FillStyle(java.awt.Color beginColor,
                 java.awt.Color endColor,
                 int gradientFill)
Constructs a gradient (FILL_TYPE_GRADIENT) fill style flowing from beginColor to endColor. If null is specified for either color then the corresponding default gradient color (white, gray) is used. If an invalid gradientFill is specified then GRADIENT_FILL_LEFT_TO_RIGHT will be used.

Parameters:
beginColor - the color beginning at the left which is blended to the right
endColor - the color beginning at the right which is blended to the left
gradientFill - the gradient direction
See Also:
setGradientFillBeginColor(java.awt.Color), setGradientFillEndColor(java.awt.Color), setGradientFill(int)

FillStyle

public FillStyle(javax.swing.ImageIcon imageIcon,
                 java.awt.Color imageFillColor,
                 int imageFill)
Constructs an image (FILL_TYPE_IMAGE) fill style using the specified image and matching imageColor. If a null image is specified then the resulting fill will appear the same as if using a solid fill but the image color will be used. If null is specified for the image color then the default image color (white) is used. If an invalid image fill is specified then IMAGE_FILL_CENTER will be used. Note: to simplify the signature of this constructor, the image's x and y points use (only if the image fill is IMAGE_FILL_POINT) must be specified using the setX and setY property methods.

Parameters:
imageIcon - the image icon to be used
imageFillColor - a matching color for the image
imageFill - the image placement and pattern policy
See Also:
setImageIcon(javax.swing.ImageIcon), setImageFillColor(java.awt.Color), setImageFill(int)
Method Detail

apply

public void apply(FillStyle theOtherObject)
Utility method to convey properties contained in theOtherObject to this object.

Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.

Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

Parameters:
theOtherObject - properties applied to this instance

setFillType

public void setFillType(int newFillType)
                 throws java.lang.IllegalArgumentException
Sets the type of fill. Valid values are:

Parameters:
newFillType - the fill type desired
Throws:
java.lang.IllegalArgumentException - if an invalid value is passed in.
See Also:
getFillType()

getFillType

public int getFillType()
Returns the type of fill.

Returns:
the fill type
See Also:
setFillType(int)

setVisible

public void setVisible(boolean newVisible)
Sets whether the fill is visible.

Parameters:
newVisible - true means visible
See Also:
isVisible()

isVisible

public boolean isVisible()
Returns whether or not the fill is visible.

Returns:
true if visible
See Also:
setVisible(boolean)

setSolidFillColor

public void setSolidFillColor(java.awt.Color newColor)
                       throws java.lang.IllegalArgumentException
Sets the fill color used with FillStyle.FILL_TYPE_SOLID_COLOR fills.

Parameters:
newColor - the solid fill color
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getSolidFillColor()

getSolidFillColor

public java.awt.Color getSolidFillColor()
Returns the color used when the fill type is FillStyle.FILL_TYPE_SOLID_COLOR.

Returns:
the solid fill color
See Also:
setSolidFillColor(java.awt.Color)

setGradientFill

public void setGradientFill(int newGradientFill)
                     throws java.lang.IllegalArgumentException
Sets the gradient fill direction.
Valid values are:

Parameters:
newGradientFill - the gradient direction policy
Throws:
java.lang.IllegalArgumentException - if an invalid value is passed in.
See Also:
getGradientFill()

getGradientFill

public int getGradientFill()
Returns the gradient fill direction.

Returns:
the gradient fill direction
See Also:
setGradientFill(int)

setGradientFillBeginColor

public void setGradientFillBeginColor(java.awt.Color newColor)
                               throws java.lang.IllegalArgumentException
Sets the gradient fill begin color used with FillStyle.FILL_TYPE_GRADIENT fills.

Parameters:
newColor - the gradient fill begin color
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getGradientFillBeginColor(), setGradientFillEndColor(java.awt.Color)

getGradientFillBeginColor

public java.awt.Color getGradientFillBeginColor()
Returns the gradient fill begin color used when the fill type is FillStyle.FILL_TYPE_GRADIENT.

Returns:
the gradient fill begin color
See Also:
setGradientFillBeginColor(java.awt.Color), getGradientFillEndColor()

setGradientFillEndColor

public void setGradientFillEndColor(java.awt.Color newColor)
                             throws java.lang.IllegalArgumentException
Sets the gradient fill end color used with FillStyle.FILL_TYPE_GRADIENT fills.

Parameters:
newColor - the gradient fill end color
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getGradientFillEndColor(), setGradientFillBeginColor(java.awt.Color)

getGradientFillEndColor

public java.awt.Color getGradientFillEndColor()
Returns the gradient fill end color used when the fill type is FillStyle.FILL_TYPE_GRADIENT.

Returns:
the gradient fill end color
See Also:
setGradientFillEndColor(java.awt.Color), getGradientFillBeginColor()

setImageFill

public void setImageFill(int newImageFill)
                  throws java.lang.IllegalArgumentException
Sets the image fill defining where to position the image and how the area is to be filled. Valid values for image fill are:

This is only applicable when the fill type is one of the folowing:

Parameters:
newImageFill - the image treatment
Throws:
java.lang.IllegalArgumentException - thrown if an invalid value is passed in.
See Also:
setFillType(int), getImageFill()

getImageFill

public int getImageFill()
Returns the image fill defining where to position the image and how the area is to be filled.

Returns:
how the image is used to fill the area
See Also:
setImageFill(int)

setImageFillColor

public void setImageFillColor(java.awt.Color newColor)
                       throws java.lang.IllegalArgumentException
Sets the color that is filled in the area prior to the image being applied.

This is only applicable when the fill type is one of the folowing:

Parameters:
newColor - the image fill color
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getImageFillColor()

getImageFillColor

public java.awt.Color getImageFillColor()
Returns the image's background color.

Returns:
the solid fill color
See Also:
setSolidFillColor(java.awt.Color)

setSolidBlendColor

public void setSolidBlendColor(java.awt.Color newColor)
                        throws java.lang.IllegalArgumentException
Sets the color that is applied to the area after the image has been applied. This is only applicable when the fill type is FillStyle.FILL_TYPE_IMAGE_COLOR_BLEND.

Parameters:
newColor - the secondary solid fill color
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getSolidBlendColor()

getSolidBlendColor

public java.awt.Color getSolidBlendColor()
Returns the color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_COLOR_BLEND.

Returns:
the secondary solid fill color
See Also:
setSolidBlendColor(java.awt.Color)

setGradientBlendBeginColor

public void setGradientBlendBeginColor(java.awt.Color newColor)
                                throws java.lang.IllegalArgumentException
Sets the begin color of the Gradient fill that is applied to the area after the image has been applied. This is only applicable when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.

Parameters:
newColor - the begin color for a secondary gradient fill
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getGradientBlendBeginColor()

getGradientBlendBeginColor

public java.awt.Color getGradientBlendBeginColor()
Returns the begin color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.

Returns:
the secondary gradient fill begin color
See Also:
setGradientBlendBeginColor(java.awt.Color)

setGradientBlendEndColor

public void setGradientBlendEndColor(java.awt.Color newColor)
                              throws java.lang.IllegalArgumentException
Sets the end color of a Gradient fill that is applied to the area after the image has been applied. This is only applicable when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.

Parameters:
newColor - the end color for a secondary gradient fill
Throws:
java.lang.IllegalArgumentException - if newColor is null.
See Also:
getGradientBlendEndColor()

getGradientBlendEndColor

public java.awt.Color getGradientBlendEndColor()
Returns the end color that is applied to the area after the image has been applied when the fill type is FillStyle.FILL_TYPE_IMAGE_GRADIENT_BLEND.

Returns:
the secondary gradient fill end color
See Also:
setGradientBlendEndColor(java.awt.Color)

setImageIcon

public void setImageIcon(javax.swing.ImageIcon newImageIcon)
Sets the image to be used in the fill area. The image is used only if the fill type is one of these possible values:

Parameters:
newImageIcon - the image icon to be displayed
See Also:
setFillType(int), getImageIcon()

getImageIcon

public javax.swing.ImageIcon getImageIcon()
Returns the imageIcon used in this fill style.

Returns:
ImageIcon
See Also:
setImageIcon(javax.swing.ImageIcon)

setX

public void setX(int newX)
Sets the "x" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.

Parameters:
newX - the "x" coordinate to anchor the image
See Also:
setImageFill(int), getX()

getX

public int getX()
Returns the "x" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.

Returns:
the "x" position of the image
See Also:
setImageFill(int), setX(int)

setY

public void setY(int newY)
Sets the "y" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.

Parameters:
newY - the "y" coordinate to anchor the image
See Also:
setImageFill(int), getY()

getY

public int getY()
Returns the "y" portion of the position coordinate used with an image fill when the image fill is FillStyle.IMAGE_FILL_POINT.

Returns:
the "y" position of the image
See Also:
setImageFill(int), setY(int)

equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this FillStyle.

The result is true if and only if the argument is not null and is a FillStyle object that has the same property values as this object.

Overrides:
equals in class ModelBase
Parameters:
obj - the object to test for equality with this FillStyle
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this FillStyle.

Overrides:
hashCode in class ModelBase
Returns:
a hash code value for this object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.