StoryType

Inheritance: java.lang.Object

public class StoryType

Text of a Word document is stored in stories. StoryType identifies a story.

Examples:

Shows how to remove all shapes from a node.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 // Use a DocumentBuilder to insert a shape. This is an inline shape,
 // which has a parent Paragraph, which is a child node of the first section's Body.
 builder.insertShape(ShapeType.CUBE, 100.0, 100.0);

 Assert.assertEquals(doc.getChildNodes(NodeType.SHAPE, true).getCount(), 1);

 // We can delete all shapes from the child paragraphs of this Body.
 Assert.assertEquals(doc.getFirstSection().getBody().getStoryType(), StoryType.MAIN_TEXT);
 doc.getFirstSection().getBody().deleteShapes();

 Assert.assertEquals(doc.getChildNodes(NodeType.SHAPE, true).getCount(), 0);
 

Fields

FieldDescription
COMMENTSContains document comments (annotations), represented by Comment.
ENDNOTESContains endnotes text, represented by Footnote.
ENDNOTE_CONTINUATION_NOTICEContains the text of the endnote continuation notice separator.
ENDNOTE_CONTINUATION_SEPARATORContains the text of the endnote continuation separator.
ENDNOTE_SEPARATORContains the text of the endnote separator.
EVEN_PAGES_FOOTERContains text of the even pages footer, represented by HeaderFooter.
EVEN_PAGES_HEADERContains text of the even pages header, represented by HeaderFooter.
FIRST_PAGE_FOOTERContains text of the first page footer, represented by HeaderFooter.
FIRST_PAGE_HEADERContains text of the first page header, represented by HeaderFooter.
FOOTNOTESContains footnote text, represented by Footnote.
FOOTNOTE_CONTINUATION_NOTICEContains the text of the footnote continuation notice separator.
FOOTNOTE_CONTINUATION_SEPARATORContains the text of the footnote continuation separator.
FOOTNOTE_SEPARATORContains the text of the footnote separator.
MAIN_TEXTContains the main text of the document, represented by Body.
NONEDefault value.
PRIMARY_FOOTERContains text of the primary footer.
PRIMARY_HEADERContains text of the primary header.
TEXTBOXContains shape or textbox text, represented by Shape.
length

Methods

MethodDescription
fromName(String storyTypeName)
getName(int storyType)
getValues()
toString(int storyType)

COMMENTS

public static int COMMENTS

Contains document comments (annotations), represented by Comment.

ENDNOTES

public static int ENDNOTES

Contains endnotes text, represented by Footnote.

ENDNOTE_CONTINUATION_NOTICE

public static int ENDNOTE_CONTINUATION_NOTICE

Contains the text of the endnote continuation notice separator.

ENDNOTE_CONTINUATION_SEPARATOR

public static int ENDNOTE_CONTINUATION_SEPARATOR

Contains the text of the endnote continuation separator.

ENDNOTE_SEPARATOR

public static int ENDNOTE_SEPARATOR

Contains the text of the endnote separator.

public static int EVEN_PAGES_FOOTER

Contains text of the even pages footer, represented by HeaderFooter.

EVEN_PAGES_HEADER

public static int EVEN_PAGES_HEADER

Contains text of the even pages header, represented by HeaderFooter.

public static int FIRST_PAGE_FOOTER

Contains text of the first page footer, represented by HeaderFooter.

FIRST_PAGE_HEADER

public static int FIRST_PAGE_HEADER

Contains text of the first page header, represented by HeaderFooter.

FOOTNOTES

public static int FOOTNOTES

Contains footnote text, represented by Footnote.

FOOTNOTE_CONTINUATION_NOTICE

public static int FOOTNOTE_CONTINUATION_NOTICE

Contains the text of the footnote continuation notice separator.

FOOTNOTE_CONTINUATION_SEPARATOR

public static int FOOTNOTE_CONTINUATION_SEPARATOR

Contains the text of the footnote continuation separator.

FOOTNOTE_SEPARATOR

public static int FOOTNOTE_SEPARATOR

Contains the text of the footnote separator.

MAIN_TEXT

public static int MAIN_TEXT

Contains the main text of the document, represented by Body.

NONE

public static int NONE

Default value. There is no such story in the document.

public static int PRIMARY_FOOTER

Contains text of the primary footer. When footer is different for odd and even pages, contains text of the odd pages footer. Represented by HeaderFooter.

PRIMARY_HEADER

public static int PRIMARY_HEADER

Contains text of the primary header. When header is different for odd and even pages, contains text of the odd pages header. Represented by HeaderFooter.

TEXTBOX

public static int TEXTBOX

Contains shape or textbox text, represented by Shape.

length

public static int length

fromName(String storyTypeName)

public static int fromName(String storyTypeName)

Parameters:

ParameterTypeDescription
storyTypeNamejava.lang.String

Returns: int

getName(int storyType)

public static String getName(int storyType)

Parameters:

ParameterTypeDescription
storyTypeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int storyType)

public static String toString(int storyType)

Parameters:

ParameterTypeDescription
storyTypeint

Returns: java.lang.String