In this page of the example we are going to create the power point slide and try to set the color to the title of that slide. for performing this we are using the getTextRuns() method.
getTextRuns():-
In this program this methods get blocks of text. The getTextAsString() and getTextAsVector() are two methods. both method are used for get the block of the text. The getTextAsString() is used to get the single string with all the text in it and getTextAsVector() is used to get the vector of strings, one for each text record found in the file. We can change the text via TextRun.setText(String) or RichTextRun.setText(String). But it is not yet possible to add additional TextRuns or RichTextRuns.
for performing this task we are using setFontColor(Color color) to change the color of text in this program.
The org.apache.poi.hslf.usermodel.RichTextRun class is used for multiple task like change the textbox style, color, font size, font type etc. Here we are creating the object of RichText and then change the text textbox style, color, font size , font type etc.