Class ParagraphFragment
java.lang.Object
com.atlassian.confluence.content.render.xhtml.storage.macro.inlinebody.ParagraphFragment
- All Implemented Interfaces:
Fragment
Represents a paragraph fragment.
You can add InlineMacroFragment
s to this fragment as well as merge other paragraph fragments into it under certain conditions (see canMerge(ParagraphFragment)
.
-
Constructor Summary
ConstructorsConstructorDescriptionParagraphFragment
(XMLEventFactory xmlEventFactory) ParagraphFragment
(XMLEventReader xmlEventReader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a fragment to this paragraph fragment.boolean
canMerge
(ParagraphFragment paragraphFragment) True if the specified paragraph fragment can be merged into the current paragraph fragment.events()
boolean
-
Constructor Details
-
ParagraphFragment
-
ParagraphFragment
- Throws:
XMLStreamException
-
-
Method Details
-
add
Add a fragment to this paragraph fragment.- Parameters:
fragment
- the fragment to add.
-
canMerge
True if the specified paragraph fragment can be merged into the current paragraph fragment. This will only be possible if: (a) the last fragment added to the paragraph is an inline macro fragment AND (b) the attributes of the specified paragraph and this paragraph are equal- Parameters:
paragraphFragment
- the paragraph fragment to merge- Returns:
- True if the specified paragraph fragment can be merged, false otherwise.
-
bodyEvents
- Returns:
- a read-only list of xml events constituting the body of the paragraph fragment (i.e. excluding the start and end paragraph events)
-
events
-
isAutoCursorTarget
public boolean isAutoCursorTarget() -
attributes
- Returns:
- a read-only set of attributes on this paragraph fragment
-