IEffect

public interface IEffect

Represents animation effect.

Methods

MethodDescription
getSequence()Returns a sequence for an effect.
getTextAnimation()Returns text animation.
getPresetClassType()Defines class of effect.
setPresetClassType(int value)Defines class of effect.
getType()Defines type of effect.
setType(int value)Defines type of effect.
getSubtype()Defines subtype of effect.
setSubtype(int value)Defines subtype of effect.
getBehaviors()Returns collection of behavior for effect.
setBehaviors(IBehaviorCollection value)Returns collection of behavior for effect.
getTiming()Defines timing value for effect.
setTiming(ITiming value)Defines timing value for effect.
getTargetShape()Returns target shape for effect.
getSound()Defined embedded sound for effect.
setSound(IAudio value)Defined embedded sound for effect.
getStopPreviousSound()This attribute specifies if the animation effect stops the previous sound.
setStopPreviousSound(boolean value)This attribute specifies if the animation effect stops the previous sound.
getAfterAnimationType()Defined an after animation type for effect.
setAfterAnimationType(int value)Defined an after animation type for effect.
getAfterAnimationColor()Defined an after animation color for effect.
setAfterAnimationColor(IColorFormat value)Defined an after animation color for effect.
getAnimateTextType()Defines an animate text type for effect.
setAnimateTextType(int value)Defines an animate text type for effect.
getDelayBetweenTextParts()Defines a delay between animated text parts (words or letters).
setDelayBetweenTextParts(float value)Defines a delay between animated text parts (words or letters).

getSequence()

public abstract ISequence getSequence()

Returns a sequence for an effect. Read-only ISequence.

Returns: ISequence

getTextAnimation()

public abstract ITextAnimation getTextAnimation()

Returns text animation. Read-only ITextAnimation.

Returns: ITextAnimation

getPresetClassType()

public abstract int getPresetClassType()

Defines class of effect. Read/write EffectPresetClassType.

Returns: int

setPresetClassType(int value)

public abstract void setPresetClassType(int value)

Defines class of effect. Read/write EffectPresetClassType.

Parameters:

ParameterTypeDescription
valueint

getType()

public abstract int getType()

Defines type of effect. Read/write EffectType.

Returns: int

setType(int value)

public abstract void setType(int value)

Defines type of effect. Read/write EffectType.

Parameters:

ParameterTypeDescription
valueint

getSubtype()

public abstract int getSubtype()

Defines subtype of effect. Read/write EffectSubtype.

Returns: int

setSubtype(int value)

public abstract void setSubtype(int value)

Defines subtype of effect. Read/write EffectSubtype.

Parameters:

ParameterTypeDescription
valueint

getBehaviors()

public abstract IBehaviorCollection getBehaviors()

Returns collection of behavior for effect. Read/write IBehaviorCollection.

Returns: IBehaviorCollection

setBehaviors(IBehaviorCollection value)

public abstract void setBehaviors(IBehaviorCollection value)

Returns collection of behavior for effect. Read/write IBehaviorCollection.

Parameters:

ParameterTypeDescription
valueIBehaviorCollection

getTiming()

public abstract ITiming getTiming()

Defines timing value for effect. Read/write ITiming.

Returns: ITiming

setTiming(ITiming value)

public abstract void setTiming(ITiming value)

Defines timing value for effect. Read/write ITiming.

Parameters:

ParameterTypeDescription
valueITiming

getTargetShape()

public abstract IShape getTargetShape()

Returns target shape for effect. Read-only IShape.

Returns: IShape

getSound()

public abstract IAudio getSound()

Defined embedded sound for effect. Read/write IAudio.


Presentation presentation = new Presentation("demo.pptx");
 try {
     ISlide slide = presentation.getSlides().get_Item(0);

     // Gets the effects sequence for the slide
     ISequence effectsSequence = slide.getTimeline().getMainSequence();

     for (IEffect effect : effectsSequence)
     {
         if (effect.getSound() == null)
             continue;

         // Extracts the effect sound in byte array
         byte[] audio = effect.getSound().getBinaryData();
     }
 } finally {
     if (presentation != null) presentation.dispose();
 }

Returns: IAudio

setSound(IAudio value)

public abstract void setSound(IAudio value)

Defined embedded sound for effect. Read/write IAudio.


Presentation presentation = new Presentation("demo.pptx");
 try {
     ISlide slide = presentation.getSlides().get_Item(0);

     // Gets the effects sequence for the slide
     ISequence effectsSequence = slide.getTimeline().getMainSequence();

     for (IEffect effect : effectsSequence)
     {
         if (effect.getSound() == null)
             continue;

         // Extracts the effect sound in byte array
         byte[] audio = effect.getSound().getBinaryData();
     }
 } finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valueIAudio

getStopPreviousSound()

public abstract boolean getStopPreviousSound()

This attribute specifies if the animation effect stops the previous sound. Read/write boolean .


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Get the first effect of the second slide.
     IEffect secondSlideEffect = presentation.getSlides().get_Item(1).getTimeline().getMainSequence().get_Item(0);

     if (firstSlideEffect.getSound() != null)
     {
         // Change the second effect Enhancements/Sound to "Stop Previous Sound"
         secondSlideEffect.setStopPreviousSound(true);
     }
 } finally {
     if (presentation != null) presentation.dispose();
 }

Returns: boolean

setStopPreviousSound(boolean value)

public abstract void setStopPreviousSound(boolean value)

This attribute specifies if the animation effect stops the previous sound. Read/write boolean .


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Get the first effect of the second slide.
     IEffect secondSlideEffect = presentation.getSlides().get_Item(1).getTimeline().getMainSequence().get_Item(0);

     if (firstSlideEffect.getSound() != null)
     {
         // Change the second effect Enhancements/Sound to "Stop Previous Sound"
         secondSlideEffect.setStopPreviousSound(true);
     }
 } finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valueboolean

getAfterAnimationType()

public abstract int getAfterAnimationType()

Defined an after animation type for effect. Read/write AfterAnimationType (#getAfterAnimationType.getAfterAnimationType/#setAfterAnimationType(int).setAfterAnimationType(int)).


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect After animation to "Hide on Next Mouse Click"
     firstSlideEffect.setAfterAnimationType(AfterAnimationType.HideOnNextMouseClick);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Returns: int

setAfterAnimationType(int value)

public abstract void setAfterAnimationType(int value)

Defined an after animation type for effect. Read/write AfterAnimationType (#getAfterAnimationType.getAfterAnimationType/#setAfterAnimationType(int).setAfterAnimationType(int)).


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect After animation to "Hide on Next Mouse Click"
     firstSlideEffect.setAfterAnimationType(AfterAnimationType.HideOnNextMouseClick);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valueint

getAfterAnimationColor()

public abstract IColorFormat getAfterAnimationColor()

Defined an after animation color for effect. Read/write IColorFormat.


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect After animation type to "Color"
     firstSlideEffect.setAfterAnimationType(AfterAnimationType.Color);

     // Set the effect After animation color.
     firstSlideEffect.getAfterAnimationColor().setColor(new java.awt.Color(0, 255, 0, 255));
 }finally {
     if (presentation != null) presentation.dispose();
 }

Returns: IColorFormat

setAfterAnimationColor(IColorFormat value)

public abstract void setAfterAnimationColor(IColorFormat value)

Defined an after animation color for effect. Read/write IColorFormat.


Presentation presentation = new Presentation("demo.pptx");
 try {
     // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect After animation type to "Color"
     firstSlideEffect.setAfterAnimationType(AfterAnimationType.Color);

     // Set the effect After animation color.
     firstSlideEffect.getAfterAnimationColor().setColor(new java.awt.Color(0, 255, 0, 255));
 }finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valueIColorFormat

getAnimateTextType()

public abstract int getAnimateTextType()

Defines an animate text type for effect. The shape text can be animated by letter, by word or all at once. Read/write AnimateTextType (#getAnimateTextType.getAnimateTextType/#setAnimateTextType(int).setAnimateTextType(int)).


Presentation presentation = new Presentation("demo.pptx");
 try {
    // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect Animate text type to "By letter"
     firstSlideEffect.setAnimateTextType(AnimateTextType.ByLetter);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Returns: int

setAnimateTextType(int value)

public abstract void setAnimateTextType(int value)

Defines an animate text type for effect. The shape text can be animated by letter, by word or all at once. Read/write AnimateTextType (#getAnimateTextType.getAnimateTextType/#setAnimateTextType(int).setAnimateTextType(int)).


Presentation presentation = new Presentation("demo.pptx");
 try {
    // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect Animate text type to "By letter"
     firstSlideEffect.setAnimateTextType(AnimateTextType.ByLetter);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valueint

getDelayBetweenTextParts()

public abstract float getDelayBetweenTextParts()

Defines a delay between animated text parts (words or letters). A positive value specifies the percentage of effect duration. A negative value specifies the delay in seconds. Read/write float .


Presentation presentation = new Presentation("demo.pptx");
 try {
    // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect Animate text type to "By word"
     firstSlideEffect.setAnimateTextType(AnimateTextType.ByWord);

     // Set the delay between animated text parts to 20% of effect duration.
     firstSlideEffect.setDelayBetweenTextParts(20f);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Returns: float

setDelayBetweenTextParts(float value)

public abstract void setDelayBetweenTextParts(float value)

Defines a delay between animated text parts (words or letters). A positive value specifies the percentage of effect duration. A negative value specifies the delay in seconds. Read/write float .


Presentation presentation = new Presentation("demo.pptx");
 try {
    // Get the first effect of the first slide.
     IEffect firstSlideEffect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().get_Item(0);

     // Change the effect Animate text type to "By word"
     firstSlideEffect.setAnimateTextType(AnimateTextType.ByWord);

     // Set the delay between animated text parts to 20% of effect duration.
     firstSlideEffect.setDelayBetweenTextParts(20f);
 } finally {
     if (presentation != null) presentation.dispose();
 }

Parameters:

ParameterTypeDescription
valuefloat