Sequence

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.ISequence

public final class Sequence implements ISequence

Represents sequence (collection of effects).

Methods

Method Description
getCount() Returns the number of effects in a sequense.
remove(IEffect item) Removes specified effect from a collection.
removeAt(int index) Removes an effect from a collection.
clear() Removes all effects from a collection.
get_Item(int index) Returns an effect at the specified index.
iterator() Returns an enumerator that iterates through the collection.
iteratorJava() Returns a java iterator for the entire collection.
getTriggerShape() Returns or sets shape target for INTERACTIVE sequence.
setTriggerShape(IShape value) Returns or sets shape target for INTERACTIVE sequence.
removeByShape(IShape shape) Remove effect for the specified shape.
getEffectsByShape(IShape shape) Returns array of effects for the specified shape.
getEffectsByParagraph(IParagraph paragraph) Returns array of effects for the specified paragraph.
getCount(IShape shape) Returns count of effects for the specified shape.
addEffect(IShape shape, int effectType, int subtype, int triggerType) Add new effect to the end of sequence.
addEffect(IParagraph paragraph, int effectType, int subtype, int triggerType) Add new animation effect for paragraph to the end of sequence.
addEffect(IChart chart, int type, int index, int effectType, int subtype, int triggerType) Adds the new chart animation effect for category or series to the end of sequence.
addEffect(IChart chart, int type, int seriesIndex, int categoriesIndex, int effectType, int subtype, int triggerType) Adds the new chart animation effect for elements in category or series to the end of sequence.

getCount()

public final int getCount()

Returns the number of effects in a sequense. Read-only int.

Returns: int

remove(IEffect item)

public final void remove(IEffect item)

Removes specified effect from a collection.

Parameters:

Parameter Type Description
item IEffect Effect to remove.

removeAt(int index)

public final void removeAt(int index)

Removes an effect from a collection.

Parameters:

Parameter Type Description
index int Index of a effect that should be deleted.

clear()

public final void clear()

Removes all effects from a collection.

get_Item(int index)

public final IEffect get_Item(int index)

Returns an effect at the specified index.

Parameters:

Parameter Type Description
index int Index of element.

Returns: IEffect - The IEffect object.

iterator()

public final System.Collections.Generic.IGenericEnumerator<IEffect> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IEffect> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IEffect> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IEffect> - An java.util.Iterator for the entire collection.

getTriggerShape()

public final IShape getTriggerShape()

Returns or sets shape target for INTERACTIVE sequence. If sequence is not interactive then returns null. Read/write IShape.

Returns: IShape

setTriggerShape(IShape value)

public final void setTriggerShape(IShape value)

Returns or sets shape target for INTERACTIVE sequence. If sequence is not interactive then returns null. Read/write IShape.

Parameters:

Parameter Type Description
value IShape

removeByShape(IShape shape)

public final void removeByShape(IShape shape)

Remove effect for the specified shape.

Parameters:

Parameter Type Description
shape IShape

getEffectsByShape(IShape shape)

public final IEffect[] getEffectsByShape(IShape shape)

Returns array of effects for the specified shape.

Parameters:

Parameter Type Description
shape IShape

Returns: com.aspose.slides.IEffect[]

getEffectsByParagraph(IParagraph paragraph)

public final IEffect[] getEffectsByParagraph(IParagraph paragraph)

Returns array of effects for the specified paragraph.

Parameters:

Parameter Type Description
paragraph IParagraph

Returns: com.aspose.slides.IEffect[]

getCount(IShape shape)

public final int getCount(IShape shape)

Returns count of effects for the specified shape.

Parameters:

Parameter Type Description
shape IShape

Returns: int

addEffect(IShape shape, int effectType, int subtype, int triggerType)

public final IEffect addEffect(IShape shape, int effectType, int subtype, int triggerType)

Add new effect to the end of sequence.

Parameters:

Parameter Type Description
shape IShape Shape object IShape for adding an effect
effectType int Type of an animation effect EffectType
subtype int Subtypes of animation effect EffectSubtype
triggerType int Trigger type of effect EffectTriggerType

Returns: IEffect - New effect object IEffect

addEffect(IParagraph paragraph, int effectType, int subtype, int triggerType)

public final IEffect addEffect(IParagraph paragraph, int effectType, int subtype, int triggerType)

Add new animation effect for paragraph to the end of sequence.


Presentation presentation = new Presentation(path + "input.pptx");
  try
  {        
     // select paragraph to add effect
     IAutoShape autoShape = (IAutoShape)presentation.getSlides().get_Item(0).getShapes().get_Item(0);
     IParagraph paragraph = autoShape.getTextFrame().getParagraphs().get_Item(0);
     // add Fly animation effect to selected paragraph
     IEffect effect = presentation.getSlides().get_Item(0).getTimeline().getMainSequence().addEffect(
     paragraph, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick);
  }  finally {
     if (presentation != null) presentation.dispose();
  }

Parameters:

Parameter Type Description
paragraph IParagraph Paragraph object IParagraph
effectType int Type of an animation effect EffectType
subtype int Subtypes of animation effect EffectSubtype
triggerType int Trigger type of effect EffectTriggerType

Returns: IEffect - New effect object IEffect

addEffect(IChart chart, int type, int index, int effectType, int subtype, int triggerType)

public final IEffect addEffect(IChart chart, int type, int index, int effectType, int subtype, int triggerType)

Adds the new chart animation effect for category or series to the end of sequence.

Parameters:

Parameter Type Description
chart IChart Chart object IChart
type int Type of an animation effect EffectChartMinorGroupingType
index int Index int
effectType int Type of an animation effect EffectType
subtype int Subtypes of animation effect EffectSubtype
triggerType int Trigger type of effect EffectTriggerType

Returns: IEffect - New effect object IEffect

addEffect(IChart chart, int type, int seriesIndex, int categoriesIndex, int effectType, int subtype, int triggerType)

public final IEffect addEffect(IChart chart, int type, int seriesIndex, int categoriesIndex, int effectType, int subtype, int triggerType)

Adds the new chart animation effect for elements in category or series to the end of sequence.

Parameters:

Parameter Type Description
chart IChart Chart object IChart
type int Type of an animation effect EffectChartMinorGroupingType
seriesIndex int Index of chart series int
categoriesIndex int Index of category int
effectType int Type of an animation effect EffectType
subtype int Subtypes of animation effect EffectSubtype
triggerType int Trigger type of effect EffectTriggerType

Returns: IEffect - New effect object IEffect