Skip to main content

GroupFill Class

A fill for a group of shapes.

Declaration

public class GroupFill extends Fill

Remarks

The following code snippet applies a group fill to the first shape in a group to inherit its fill from the parent group:

import com.devexpress.docs.presentation.*;
import com.devexpress.docs.office.*;

// ...
// Create a group shape.
GroupShape group = new GroupShape();
group.setFill(new SolidFill(new OfficeColor(Color.getOrange())));

// Create a rounded rectangular shape.
Shape shape1 = new Shape(ShapeType.getRoundedRectangle(), 30, 30, 1000, 500);
Shape shape2 = new Shape(ShapeType.getRoundedRectangle(), 30, 560, 1000, 500);

// Inherit fill settings from the parent group.
GroupFill groupFill = new GroupFill();
shape1.setFill(groupFill);

// Add shapes to the group.
group.getShapes().add(shape1);
group.getShapes().add(shape2);

// Get the first slide in the presentation.
Slide slide = presentation.getSlides().getFirst();

// Add the group shape to the first slide.
slide.getShapes().add(group);

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

GroupFill()

Initializes a new instance of the GroupFill class.

Declaration

public GroupFill()

Methods

deepClone() Method

Returns a deep copy of this GroupFill instance.

Declaration

public GroupFill deepClone()

Returns

Type Description
GroupFill

A deep copy of this GroupFill.

getType() Method

Returns the fill type.

Declaration

public FillType getType()

Returns

Type Description
FillType

Fill type.