public interface IEffect
Represents animation effect.
| Modifier and Type | Method and Description |
|---|---|
IColorFormat |
getAfterAnimationColor()
Defined an after animation color for effect.
|
int |
getAfterAnimationType()
Defined an after animation type for effect.
|
int |
getAnimateTextType()
Defines an animate text type for effect.
|
IBehaviorCollection |
getBehaviors()
Returns collection of behavior for effect.
|
float |
getDelayBetweenTextParts()
Defines a delay between animated text parts (words or letters).
|
int |
getPresetClassType()
Defines class of effect.
|
ISequence |
getSequence()
Returns a sequence for an effect.
|
IAudio |
getSound()
Defined embedded sound for effect.
|
boolean |
getStopPreviousSound()
This attribute specifies if the animation effect stops the previous sound.
|
int |
getSubtype()
Defines subtype of effect.
|
IShape |
getTargetShape()
Returns target shape for effect.
|
ITextAnimation |
getTextAnimation()
Returns text animation.
|
ITiming |
getTiming()
Defines timing value for effect.
|
int |
getType()
Defines type of effect.
|
void |
setAfterAnimationColor(IColorFormat value)
Defined an after animation color for effect.
|
void |
setAfterAnimationType(int value)
Defined an after animation type for effect.
|
void |
setAnimateTextType(int value)
Defines an animate text type for effect.
|
void |
setBehaviors(IBehaviorCollection value)
Returns collection of behavior for effect.
|
void |
setDelayBetweenTextParts(float value)
Defines a delay between animated text parts (words or letters).
|
void |
setPresetClassType(int value)
Defines class of effect.
|
void |
setSound(IAudio value)
Defined embedded sound for effect.
|
void |
setStopPreviousSound(boolean value)
This attribute specifies if the animation effect stops the previous sound.
|
void |
setSubtype(int value)
Defines subtype of effect.
|
void |
setTiming(ITiming value)
Defines timing value for effect.
|
void |
setType(int value)
Defines type of effect.
|
ITextAnimation getTextAnimation()
Returns text animation.
Read-only ITextAnimation.
int getPresetClassType()
Defines class of effect.
Read/write EffectPresetClassType.
void setPresetClassType(int value)
Defines class of effect.
Read/write EffectPresetClassType.
int getType()
Defines type of effect.
Read/write EffectType.
void setType(int value)
Defines type of effect.
Read/write EffectType.
int getSubtype()
Defines subtype of effect.
Read/write EffectSubtype.
void setSubtype(int value)
Defines subtype of effect.
Read/write EffectSubtype.
IBehaviorCollection getBehaviors()
Returns collection of behavior for effect.
Read/write IBehaviorCollection.
void setBehaviors(IBehaviorCollection value)
Returns collection of behavior for effect.
Read/write IBehaviorCollection.
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(); }
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(); }
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(); }
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(); }
int getAfterAnimationType()
Defined an after animation type for effect.
Read/write AfterAnimationType(getAfterAnimationType()/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(); }
void setAfterAnimationType(int value)
Defined an after animation type for effect.
Read/write AfterAnimationType(getAfterAnimationType()/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(); }
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(); }
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(); }
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()/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(); }
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()/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(); }
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(); }
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(); }
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.