PhoneticGuide

Inheritance: java.lang.Object

public class PhoneticGuide

Represents Phonetic Guide.

Examples:

Shows how to get properties of the phonetic guide.


 Document doc = new Document(getMyDir() + "Phonetic guide.docx");

 RunCollection runs = doc.getFirstSection().getBody().getFirstParagraph().getRuns();
 // Use phonetic guide in the Asian text.
 Assert.assertEquals(true, runs.get(0).isPhoneticGuide());

 PhoneticGuide phoneticGuide = runs.get(0).getPhoneticGuide();
 Assert.assertEquals("base", phoneticGuide.getBaseText());
 Assert.assertEquals("ruby", phoneticGuide.getRubyText());
 

Methods

MethodDescription
getBaseText()Gets base text of the phonetic guide.
getRubyText()Gets ruby text of the phonetic guide.

getBaseText()

public String getBaseText()

Gets base text of the phonetic guide.

Examples:

Shows how to get properties of the phonetic guide.


 Document doc = new Document(getMyDir() + "Phonetic guide.docx");

 RunCollection runs = doc.getFirstSection().getBody().getFirstParagraph().getRuns();
 // Use phonetic guide in the Asian text.
 Assert.assertEquals(true, runs.get(0).isPhoneticGuide());

 PhoneticGuide phoneticGuide = runs.get(0).getPhoneticGuide();
 Assert.assertEquals("base", phoneticGuide.getBaseText());
 Assert.assertEquals("ruby", phoneticGuide.getRubyText());
 

Returns: java.lang.String - Base text of the phonetic guide.

getRubyText()

public String getRubyText()

Gets ruby text of the phonetic guide.

Examples:

Shows how to get properties of the phonetic guide.


 Document doc = new Document(getMyDir() + "Phonetic guide.docx");

 RunCollection runs = doc.getFirstSection().getBody().getFirstParagraph().getRuns();
 // Use phonetic guide in the Asian text.
 Assert.assertEquals(true, runs.get(0).isPhoneticGuide());

 PhoneticGuide phoneticGuide = runs.get(0).getPhoneticGuide();
 Assert.assertEquals("base", phoneticGuide.getBaseText());
 Assert.assertEquals("ruby", phoneticGuide.getRubyText());
 

Returns: java.lang.String - Ruby text of the phonetic guide.