EffectPropertiesBase Class
Contains effect properties common to presentation elements.
Declaration
public abstract class EffectPropertiesBase extends OfficeObject
Inherited Members
Inheritance
EffectPropertiesBase()
Initializes a new instance of the EffectPropertiesBase class.
Declaration
public EffectPropertiesBase()
Methods
getInnerShadow() Method
Returns an inner shadow effect. The shadow is applied within shape edges.
Declaration
public InnerShadowEffect getInnerShadow()
Returns
| Type | Description |
|---|---|
| InnerShadowEffect | A |
getOuterShadow() Method
Returns an outer shadow effect. The shadow is applied outside shape edges.
Declaration
public OuterShadowEffect getOuterShadow()
Returns
| Type | Description |
|---|---|
| OuterShadowEffect | An |
getPresetShadow() Method
Returns a preset shadow effect.
Declaration
public PresetShadowEffect getPresetShadow()
Returns
| Type | Description |
|---|---|
| PresetShadowEffect | A |
getReflection() Method
Returns a reflection effect.
Declaration
public ReflectionEffect getReflection()
Returns
| Type | Description |
|---|---|
| ReflectionEffect | A |
setInnerShadow(InnerShadowEffect value) Method
Sets an inner shadow effect. The shadow is applied within shape edges.
Declaration
public void setInnerShadow(InnerShadowEffect value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | InnerShadowEffect | A |
Remarks
The following code snippet applies an inner shadow effect to a shape:
import com.devexpress.docs.*;
import com.devexpress.docs.office.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.presentation.*;
// Create a presentation.
try(Presentation presentation = new Presentation()) {
// Access the first (blank) slide in the presentation.
Slide slide = presentation.getSlides().getFirst();
LineStyle outlineStyle = new LineStyle();
outlineStyle.setFill(new SolidFill(Color.getRoyalBlue()));
outlineStyle.setWidth(8);
InnerShadowEffect innerShadowEffect = new InnerShadowEffect();
innerShadowEffect.setAngle(45);
innerShadowEffect.setBlurRadius(40);
innerShadowEffect.setColor(new OfficeColor(Color.getGray()));
innerShadowEffect.setDistance(50);
ShapeEffectProperties effectProperties = new ShapeEffectProperties();
effectProperties.setInnerShadow(innerShadowEffect);
Shape shape = new Shape(ShapeType.getRectangle(), 10, 10, 300, 300) {{
setOutline(outlineStyle);
setFill(new SolidFill(Color.getWhite()));
setEffects(effectProperties);
}};
slide.getShapes().add(shape);
// Perform additional presentation processing logic.
}
setOuterShadow(OuterShadowEffect value) Method
Sets an outer shadow effect. The shadow is applied outside shape edges.
Declaration
public void setOuterShadow(OuterShadowEffect value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | OuterShadowEffect | An |
Remarks
The following code snippet applies an outer shadow effect to a shape:
import com.devexpress.docs.*;
import com.devexpress.docs.office.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.presentation.*;
// Create a presentation.
try(Presentation presentation = new Presentation()) {
ShapeEffectProperties effectProperties = new ShapeEffectProperties();
effectProperties.setOuterShadow(new OuterShadowEffect() {{
setAngle(135);
setBlurRadius(50);
setColor(new OfficeColor(Color.getGray()));
setDistance(50);
setHorizontalScale(100);
setVerticalScale(100);
setHorizontalSkew(0);
setVerticalSkew(0);
setRotateWithShape(true);
}});
Shape shape = new Shape(ShapeType.getRectangle(), 10, 10, 300, 300) {{
setOutline(new LineStyle());
getOutline().setFill(new SolidFill(Color.getRoyalBlue()));
getOutline().setWidth(8);
setFill(new SolidFill(Color.getWhite()));
setEffects(effectProperties);
}};
// Access the first slide in the presentation.
Slide slide = presentation.getSlides().getFirst();
slide.getShapes().add(shape);
// Perform additional presentation processing logic.
}
setPresetShadow(PresetShadowEffect value) Method
Sets a preset shadow effect.
Declaration
public void setPresetShadow(PresetShadowEffect value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | PresetShadowEffect | A |
Remarks
The following code snippet applies a preset shadow effect to a shape:
import com.devexpress.docs.*;
import com.devexpress.docs.office.*;
import com.devexpress.system.drawing.Color;
import com.devexpress.docs.presentation.*;
// Create a presentation.
try(Presentation presentation = new Presentation()) {
ShapeEffectProperties effectProperties = new ShapeEffectProperties();
effectProperties.setPresetShadow(new PresetShadowEffect() {{
setColor(new OfficeColor(Color.getGray()));
setAngle(45);
setDistance(50);
setType(PresetShadowType.BOTTOM_LEFT_DROP);
}});
Shape shape = new Shape(ShapeType.getRectangle(), 10, 10, 300, 300) {{
setOutline(new LineStyle());
getOutline().setFill(new SolidFill(Color.getRoyalBlue()));
getOutline().setWidth(8);
setFill(new SolidFill(Color.getWhite()));
setEffects(effectProperties);
}};
// Access the first slide in the presentation.
Slide slide = presentation.getSlides().getFirst();
slide.getShapes().add(shape);
// Perform additional presentation processing logic.
}
setReflection(ReflectionEffect value) Method
Sets a reflection effect.
Declaration
public void setReflection(ReflectionEffect value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | ReflectionEffect | A |