PatternFill Class
A pattern fill that can be applied to a shape or slide background.
Declaration
public class PatternFill extends Fill
Remarks
The following code snippet configures a slide background to use a pattern fill with specified pattern type, foreground color, and background color:
import com.devexpress.docs.presentation.*;
import com.devexpress.system.drawing.Color;
SlideLayout slideLayout = new SlideLayout(SlideLayoutType.BLANK, "slide");
Slide slide = new Slide(slideLayout);
PatternFill fill = new PatternFill(FillPatternType.VERTICAL, Color.getWhite(), Color.getLavender());
slide.setBackground(new CustomSlideBackground(fill));
For more information on how to customize the slide or shape fill, refer to the following help topics:
Inherited Members
Inheritance
Constructors
PatternFill(FillPatternType patternType, Color foregroundColor, Color backgroundColor) Constructor
Initializes a new instance of the PatternFill class with specified settings.
Declaration
public PatternFill(FillPatternType patternType, Color foregroundColor, Color backgroundColor)
Parameters
| Name | Type | Description |
|---|---|---|
| patternType | FillPatternType | Specifies the pattern fill type. |
| foregroundColor | Color | Specifies the foreground color. |
| backgroundColor | Color | Specifies the background color. |
PatternFill(FillPatternType patternType, OfficeColor foregroundColor, OfficeColor backgroundColor) Constructor
Initializes a new instance of the PatternFill class with specified settings.
Declaration
public PatternFill(FillPatternType patternType, OfficeColor foregroundColor, OfficeColor backgroundColor)
Parameters
| Name | Type | Description |
|---|---|---|
| patternType | FillPatternType | Specifies the pattern fill type. |
| foregroundColor | OfficeColor | Specifies the foreground color. |
| backgroundColor | OfficeColor | Specifies the background color. |
PatternFill(FillPatternType patternType, SchemeColors foregroundColor, SchemeColors backgroundColor) Constructor
Initializes a new instance of the PatternFill class with specified settings.
Declaration
public PatternFill(FillPatternType patternType, SchemeColors foregroundColor, SchemeColors backgroundColor)
Parameters
| Name | Type | Description |
|---|---|---|
| patternType | FillPatternType | Specifies the pattern fill type. |
| foregroundColor | SchemeColors | Specifies the foreground color. |
| backgroundColor | SchemeColors | Specifies the background color. |
PatternFill(FillPatternType patternType, SystemColors foregroundColor, SystemColors backgroundColor) Constructor
Initializes a new instance of the PatternFill class with specified settings.
Declaration
public PatternFill(FillPatternType patternType, SystemColors foregroundColor, SystemColors backgroundColor)
Parameters
| Name | Type | Description |
|---|---|---|
| patternType | FillPatternType | Specifies the pattern fill type. |
| foregroundColor | SystemColors | Specifies the foreground color. |
| backgroundColor | SystemColors | Specifies the background color. |
Methods
deepClone() Method
Returns a deep copy of this PatternFill instance.
Declaration
public PatternFill deepClone()
Returns
| Type | Description |
|---|---|
PatternFill |
A deep copy of this |
getBackgroundColor() Method
Returns the background color of the pattern fill.
Declaration
public OfficeColor getBackgroundColor()
Returns
| Type | Description |
|---|---|
| OfficeColor | The background color of the pattern fill. |
getForegroundColor() Method
Returns the foreground color of the pattern fill.
Declaration
public OfficeColor getForegroundColor()
Returns
| Type | Description |
|---|---|
| OfficeColor | The foreground color of the pattern fill. |
getPatternType() Method
Returns the pattern type.
Declaration
public FillPatternType getPatternType()
Returns
| Type | Description |
|---|---|
| FillPatternType | The pattern type of the fill. |
getType() Method
Returns the fill type.
Declaration
public FillType getType()
Returns
| Type | Description |
|---|---|
| FillType | The fill type. |
setBackgroundColor(OfficeColor value) Method
Sets the background color of the pattern fill.
Declaration
public void setBackgroundColor(OfficeColor value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | OfficeColor | The background color of the pattern fill. |
setForegroundColor(OfficeColor value) Method
Sets the foreground color of the pattern fill.
Declaration
public void setForegroundColor(OfficeColor value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | OfficeColor | The foreground color of the pattern fill. |
setPatternType(FillPatternType value) Method
Sets the pattern type.
Declaration
public void setPatternType(FillPatternType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | FillPatternType | The pattern type of the fill. |