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
Field | Description |
---|---|
COMMENTS | Contains document comments (annotations), represented by Comment. |
ENDNOTES | Contains endnotes text, represented by Footnote. |
ENDNOTE_CONTINUATION_NOTICE | Contains the text of the endnote continuation notice separator. |
ENDNOTE_CONTINUATION_SEPARATOR | Contains the text of the endnote continuation separator. |
ENDNOTE_SEPARATOR | Contains the text of the endnote separator. |
EVEN_PAGES_FOOTER | Contains text of the even pages footer, represented by HeaderFooter. |
EVEN_PAGES_HEADER | Contains text of the even pages header, represented by HeaderFooter. |
FIRST_PAGE_FOOTER | Contains text of the first page footer, represented by HeaderFooter. |
FIRST_PAGE_HEADER | Contains text of the first page header, represented by HeaderFooter. |
FOOTNOTES | Contains footnote text, represented by Footnote. |
FOOTNOTE_CONTINUATION_NOTICE | Contains the text of the footnote continuation notice separator. |
FOOTNOTE_CONTINUATION_SEPARATOR | Contains the text of the footnote continuation separator. |
FOOTNOTE_SEPARATOR | Contains the text of the footnote separator. |
MAIN_TEXT | Contains the main text of the document, represented by Body. |
NONE | Default value. |
PRIMARY_FOOTER | Contains text of the primary footer. |
PRIMARY_HEADER | Contains text of the primary header. |
TEXTBOX | Contains shape or textbox text, represented by Shape. |
length |
Methods
Method | Description |
---|---|
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.
EVEN_PAGES_FOOTER
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.
FIRST_PAGE_FOOTER
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.
PRIMARY_FOOTER
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:
Parameter | Type | Description |
---|---|---|
storyTypeName | java.lang.String |
Returns: int
getName(int storyType)
public static String getName(int storyType)
Parameters:
Parameter | Type | Description |
---|---|---|
storyType | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int storyType)
public static String toString(int storyType)
Parameters:
Parameter | Type | Description |
---|---|---|
storyType | int |
Returns: java.lang.String