Sequence

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.ISequence

public final class Sequence implements ISequence

Represents sequence (collection of effects).

Methods

MethodDescription
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:

ParameterTypeDescription
itemIEffectEffect to remove.

removeAt(int index)

public final void removeAt(int index)

Removes an effect from a collection.

Parameters:

ParameterTypeDescription
indexintIndex 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:

ParameterTypeDescription
indexintIndex 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:

ParameterTypeDescription
valueIShape

removeByShape(IShape shape)

public final void removeByShape(IShape shape)

Remove effect for the specified shape.

Parameters:

ParameterTypeDescription
shapeIShape

getEffectsByShape(IShape shape)

public final IEffect[] getEffectsByShape(IShape shape)

Returns array of effects for the specified shape.

Parameters:

ParameterTypeDescription
shapeIShape

Returns: com.aspose.slides.IEffect[]

getEffectsByParagraph(IParagraph paragraph)

public final IEffect[] getEffectsByParagraph(IParagraph paragraph)

Returns array of effects for the specified paragraph.

Parameters:

ParameterTypeDescription
paragraphIParagraph

Returns: com.aspose.slides.IEffect[]

getCount(IShape shape)

public final int getCount(IShape shape)

Returns count of effects for the specified shape.

Parameters:

ParameterTypeDescription
shapeIShape

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:

ParameterTypeDescription
shapeIShapeShape object IShape for adding an effect
effectTypeintType of an animation effect EffectType
subtypeintSubtypes of animation effect EffectSubtype
triggerTypeintTrigger 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:

ParameterTypeDescription
paragraphIParagraphParagraph object IParagraph
effectTypeintType of an animation effect EffectType
subtypeintSubtypes of animation effect EffectSubtype
triggerTypeintTrigger 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:

ParameterTypeDescription
chartIChartChart object IChart
typeintType of an animation effect EffectChartMinorGroupingType
indexintIndex int
effectTypeintType of an animation effect EffectType
subtypeintSubtypes of animation effect EffectSubtype
triggerTypeintTrigger 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:

ParameterTypeDescription
chartIChartChart object IChart
typeintType of an animation effect EffectChartMinorGroupingType
seriesIndexintIndex of chart series int
categoriesIndexintIndex of category int
effectTypeintType of an animation effect EffectType
subtypeintSubtypes of animation effect EffectSubtype
triggerTypeintTrigger type of effect EffectTriggerType

Returns: IEffect - New effect object IEffect