TextFrame

TextFrame — Aspose.Slides FOSS for Java API Reference

ColladaSaveOptions TextFrame クラスは段落を含むテキストフレームを表します。実装 ITextFrame.

ColladaSaveOptions: org.aspose.slides.foss

import org.aspose.slides.foss.*;
public class TextFrame implements ITextFrame

ColladaSaveOptions

ColladaSaveOptionsColladaSaveOptionsColladaSaveOptionsColladaSaveOptions
getText() / setText(String)String読み取り/書き込みテキストフレームのプレーンテキストコンテンツ。.
getParagraphs()IParagraphCollectionColladaSaveOptions段落のコレクション。.
getTextFrameFormat()ITextFrameFormatColladaSaveOptionsテキストフレームの書式設定プロパティ。.
getParentShape()IShapeColladaSaveOptionsこのテキストフレームを所有する親シェイプ。.
getParentCell()ICellColladaSaveOptions親テーブルセル(テーブル内にある場合)。.
getSlide()IBaseSlideColladaSaveOptions親スライド。.
getPresentation()IPresentationColladaSaveOptions親プレゼンテーション。.

使用例

テキストの読み書き

import org.aspose.slides.foss.*;

Presentation prs = new Presentation("deck.pptx");
ISlide slide = prs.getSlides().get(0);
IAutoShape shape = (IAutoShape) slide.getShapes().get(0);
ITextFrame tf = shape.getTextFrame();

System.out.println("Text: " + tf.getText());
tf.setText("Updated text");
prs.save("updated.pptx", SaveFormat.PPTX);

段落の操作

ITextFrame tf = shape.getTextFrame();
IParagraphCollection paragraphs = tf.getParagraphs();
for (int i = 0; i < paragraphs.size(); i++) {
    IParagraph para = paragraphs.get(i);
    System.out.println("Paragraph " + i + ": " + para.getText());
}

参照

 日本語