Skip to main content

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

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
OfficeObject
Fill
PatternFill

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 PatternFill.

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.