ForEach
Inheritance: java.lang.Object
public class ForEach
Represents a group of methods intended to iterate over different Presentation model objects. These methods can be useful if you need to iterate and change some Presentation’ elements formatting or content, e.g. change each portion formatting.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.portion(pres, new ForEach.ForEachPortionCallback() {
Constructors
Constructor | Description |
---|---|
ForEach() |
Methods
ForEach()
public ForEach()
slide(Presentation pres, ForEach.ForEachSlideCallback forEachSlide)
public static void slide(Presentation pres, ForEach.ForEachSlideCallback forEachSlide)
Iterate each #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback) in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.slide(pres, new ForEach.ForEachSlideCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate slides |
forEachSlide | ForEachSlideCallback | Callback that will be invoked for each slide |
masterSlide(Presentation pres, ForEach.ForEachMasterSlideCallback forEachMasterSlide)
public static void masterSlide(Presentation pres, ForEach.ForEachMasterSlideCallback forEachMasterSlide)
Iterate each #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.masterSlide(pres, new ForEach.ForEachMasterSlideCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate master slides |
forEachMasterSlide | ForEachMasterSlideCallback | Callback that will be invoked for each master slide |
layoutSlide(Presentation pres, ForEach.ForEachLayoutSlideCallback forEachLayoutSlide)
public static void layoutSlide(Presentation pres, ForEach.ForEachLayoutSlideCallback forEachLayoutSlide)
Iterate each #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.layoutSlide(pres, new ForEach.ForEachLayoutSlideCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate layout slides |
forEachLayoutSlide | ForEachLayoutSlideCallback | Callback that will be invoked for each layout slide |
shape(Presentation pres, ForEach.ForEachShapeCallback forEachShape)
public static void shape(Presentation pres, ForEach.ForEachShapeCallback forEachShape)
Iterate each Shape in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.shape(pres, new ForEach.ForEachShapeCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate layout shapes |
forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |
shape(Presentation pres, boolean includeNotes, ForEach.ForEachShapeCallback forEachShape)
public static void shape(Presentation pres, boolean includeNotes, ForEach.ForEachShapeCallback forEachShape)
Iterate each Shape in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.shape(pres, true, new ForEach.ForEachShapeCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate layout shapes |
includeNotes | boolean | Flag that indicates whether NotesSlides should be included in processing. |
forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide if needed. |
shape(BaseSlide baseSlide, ForEach.ForEachShapeCallback forEachShape)
public static void shape(BaseSlide baseSlide, ForEach.ForEachShapeCallback forEachShape)
Iterate each Shape in the BaseSlide.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.slide(pres, new ForEach.ForEachSlideCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
baseSlide | BaseSlide | Slide to iterate layout shapes |
forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
BaseSlide is the base type for #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |
paragraph(Presentation pres, ForEach.ForEachParagraphCallback forEachParagraph)
public static void paragraph(Presentation pres, ForEach.ForEachParagraphCallback forEachParagraph)
Iterate each Paragraph in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.paragraph(pres, new ForEach.ForEachParagraphCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate paragraphs |
forEachParagraph | ForEachParagraphCallback | Callback that will be invoked for each paragraph |
Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |
paragraph(Presentation pres, boolean includeNotes, ForEach.ForEachParagraphCallback forEachParagraph)
public static void paragraph(Presentation pres, boolean includeNotes, ForEach.ForEachParagraphCallback forEachParagraph)
Iterate each Paragraph in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.paragraph(pres, true, new ForEach.ForEachParagraphCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate paragraphs |
includeNotes | boolean | Flag that indicates whether NotesSlides should be included in processing. |
forEachParagraph | ForEachParagraphCallback | Callback that will be invoked for each paragraph |
Shapes will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide |
portion(Presentation pres, ForEach.ForEachPortionCallback forEachPortion)
public static void portion(Presentation pres, ForEach.ForEachPortionCallback forEachPortion)
Iterate each Portion in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.portion(pres, new ForEach.ForEachPortionCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate portions |
forEachPortion | ForEachPortionCallback | Callback that will be invoked for each portion |
Portions will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback) and #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) |
portion(Presentation pres, boolean includeNotes, ForEach.ForEachPortionCallback forEachPortion)
public static void portion(Presentation pres, boolean includeNotes, ForEach.ForEachPortionCallback forEachPortion)
Iterate each Portion in the Presentation.
Presentation pres = new Presentation("pres.pptx"); try { ForEach.portion(pres, true, new ForEach.ForEachPortionCallback() {
Parameters:
Parameter | Type | Description |
---|---|---|
pres | Presentation | Presentation to iterate portions |
includeNotes | boolean | Flag that indicates whether NotesSlides should be included in processing. |
forEachPortion | ForEachPortionCallback | Callback that will be invoked for each portion |
Portions will be iterated in all type of slides - #slide(Presentation,ForEachSlideCallback).slide(Presentation,ForEachSlideCallback), #masterSlide(Presentation,ForEachMasterSlideCallback).masterSlide(Presentation,ForEachMasterSlideCallback), #layoutSlide(Presentation,ForEachLayoutSlideCallback).layoutSlide(Presentation,ForEachLayoutSlideCallback) and NotesSlide |