Skip to main content

GlowEffect Class

Contains properties for a glow effect applied to a shape.

Declaration

public class GlowEffect extends OfficeObject

Remarks

Use the following methods to configure the glow effect:

The following code snippet applies a glow effect to a shape:

Glow Effect, DevExpress Presentation API for Java

import com.devexpress.system.drawing.*;
import com.devexpress.docs.presentation.*;

// Create a presentation.
try(Presentation presentation = new Presentation(
        Files.readAllBytes(Path.of("presentation.pptx")))) {
    presentation.getSlides().clear();

    Slide slide = new Slide(SlideLayoutType.BLANK);
    presentation.getSlides().add(slide);

    LineStyle outlineStyle = new LineStyle();
    outlineStyle.setFill(new SolidFill(Color.getRoyalBlue()));
    outlineStyle.setWidth(8);

    GlowEffect glowEffect = new GlowEffect();
    glowEffect.setColor(new OfficeColor(Color.getYellow()));
    glowEffect.setRadius(50);

    ShapeEffectProperties effectProperties = new ShapeEffectProperties();
    effectProperties.setGlow(glowEffect);

    Shape shape1 = new Shape(ShapeType.getRectangle(), 100, 100, 300, 300);
    shape1.setEffects(effectProperties);
    shape1.setOutline(outlineStyle);
    shape1.setFill(new SolidFill(Color.getWhite()));

    slide.getShapes().add(shape1);

    // Perform additional presentation processing logic.
}

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
GlowEffect

Constructors

GlowEffect() Constructor

Initializes a new instance of the GlowEffect class.

Declaration

public GlowEffect()

GlowEffect(float radius) Constructor

Initializes a new instance of the GlowEffect class with specified settings.

Declaration

public GlowEffect(float radius)

Parameters

Name Type Description
radius float

Specifies the glow radius in points.

Methods

deepClone() Method

Returns a deep copy of this GlowEffect instance.

Declaration

public GlowEffect deepClone()

Returns

Type Description
GlowEffect

A deep copy of this GlowEffect.

getColor() Method

Returns the glow effect color.

Declaration

public OfficeColor getColor()

Returns

Type Description
OfficeColor

The glow effect color.

getRadius() Method

Returns the radius of the glow effect.

Declaration

public float getRadius()

Returns

Type Description
float

The radius of the glow effect.

setColor(OfficeColor value) Method

Sets the glow effect color.

Declaration

public void setColor(OfficeColor value)

Parameters

Name Type Description
value OfficeColor

The glow effect color.

Remarks

import com.devexpress.docs.OfficeColor;

GlowEffect glowEffect = new GlowEffect();
glowEffect.setColor(new OfficeColor(Color.getYellow()));
glowEffect.setRadius(50);

setRadius(float value) Method

Sets the radius of the glow effect.

Declaration

public void setRadius(float value)

Parameters

Name Type Description
value float

The radius of the glow effect.

Remarks

GlowEffect glowEffect = new GlowEffect();
glowEffect.setColor(new OfficeColor(Color.getYellow()));
glowEffect.setRadius(50);