Package com.vladsch.flexmark.ast
Class ListItem
java.lang.Object
com.vladsch.flexmark.util.ast.Node
com.vladsch.flexmark.util.ast.ContentNode
com.vladsch.flexmark.util.ast.Block
com.vladsch.flexmark.ast.ListItem
- All Implemented Interfaces:
ParagraphContainer
,ParagraphItemContainer
,BlankLineContainer
,Content
- Direct Known Subclasses:
BulletListItem
,DefinitionItem
,DefinitionTerm
,OrderedListItem
,TaskListItem
public abstract class ListItem
extends Block
implements ParagraphItemContainer, BlankLineContainer, ParagraphContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
protected BasedSequence
protected BasedSequence
private int
private boolean
Fields inherited from class com.vladsch.flexmark.util.ast.ContentNode
lineSegments
Fields inherited from class com.vladsch.flexmark.util.ast.Node
AST_ADAPTER, EMPTY_SEGMENTS, SPLICE
-
Constructor Summary
ConstructorsConstructorDescriptionListItem()
ListItem
(BlockContent blockContent) ListItem
(BasedSequence chars) ListItem
(BasedSequence chars, List<BasedSequence> segments) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
getAstExtra
(@NotNull StringBuilder out) Overridden by ListBlock and any others whose children propagate their blank line to parentint
@NotNull BasedSequence[]
boolean
boolean
boolean
boolean
isItemParagraph
(Paragraph node) boolean
isLoose()
boolean
boolean
boolean
boolean
boolean
boolean
isParagraphWrappingDisabled
(Paragraph node, ListOptions listOptions, DataHolder options) boolean
isTight()
void
setContainsBlankLine
(boolean containsBlankLine) void
setHadBlankAfterItemParagraph
(boolean hadBlankAfterItemParagraph) void
setLoose
(boolean loose) void
setMarkerSuffix
(BasedSequence markerSuffix) void
setOpeningMarker
(BasedSequence openingMarker) void
setPriority
(int priority) void
setTight
(boolean tight) Methods inherited from class com.vladsch.flexmark.util.ast.ContentNode
getContentChars, getContentChars, getContentLines, getContentLines, getLineChars, getLineCount, getSpanningChars, setContent, setContent, setContent, setContentLine, setContentLines
Methods inherited from class com.vladsch.flexmark.util.ast.Node
appendChain, appendChild, astChars, astExtraChars, astString, baseSubSequence, baseSubSequence, countAncestorsOfType, countDirectAncestorsOfType, delimitedSegmentSpan, delimitedSegmentSpanChars, endOfLine, extractChainTo, extractToFirstInChain, getAncestorOfType, getBaseSequence, getBlankLineSibling, getChars, getCharsFromSegments, getChildChars, getChildIterator, getChildOfType, getChildren, getDescendants, getDocument, getEmptyPrefix, getEmptySuffix, getEndLineNumber, getEndOffset, getEndOfLine, getExactChildChars, getFirstChild, getFirstChildAny, getFirstChildAnyNot, getFirstInChain, getGrandParent, getLastChild, getLastChildAny, getLastChildAnyNot, getLastInChain, getLeadSegment, getLineColumnAtEnd, getLineNumber, getNext, getNextAny, getNextAnyNot, getNodeName, getNodeOfTypeIndex, getNodeOfTypeIndex, getOldestAncestorOfTypeAfter, getPrevious, getPreviousAny, getPreviousAnyNot, getReversedChildIterator, getReversedChildren, getReversedDescendants, getSegmentsForChars, getSourceRange, getStartLineNumber, getStartOffset, getStartOfLine, getTextLength, getTrailSegment, hasChildren, hasOrMoreChildren, insertAfter, insertBefore, insertChainAfter, insertChainBefore, isOrDescendantOfType, lineColumnAtIndex, lineColumnAtStart, moveTrailingBlankLines, prependChild, removeChildren, segmentSpan, segmentSpan, segmentSpanChars, segmentSpanChars, segmentSpanChars, segmentSpanCharsToVisible, setChars, setCharsFromContent, setCharsFromContentOnly, setCharsFromSegments, spanningChars, startOfLine, takeChildren, toAstString, toSegmentSpan, toString, toStringAttributes, unlink
-
Field Details
-
openingMarker
-
markerSuffix
-
tight
private boolean tight -
hadBlankAfterItemParagraph
private boolean hadBlankAfterItemParagraph -
containsBlankLine
private boolean containsBlankLine -
priority
private int priority
-
-
Constructor Details
-
ListItem
public ListItem() -
ListItem
-
ListItem
-
ListItem
-
ListItem
-
-
Method Details
-
isOrderedItem
public boolean isOrderedItem() -
getAstExtra
- Overrides:
getAstExtra
in classNode
-
getSegments
- Specified by:
getSegments
in classNode
-
canChangeMarker
public boolean canChangeMarker() -
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
getOpeningMarker
-
setOpeningMarker
-
getMarkerSuffix
-
setMarkerSuffix
-
setTight
public void setTight(boolean tight) -
setLoose
public void setLoose(boolean loose) -
isTight
public boolean isTight() -
isOwnTight
public boolean isOwnTight() -
isLoose
public boolean isLoose() -
isParagraphEndWrappingDisabled
- Specified by:
isParagraphEndWrappingDisabled
in interfaceParagraphContainer
-
isParagraphStartWrappingDisabled
- Specified by:
isParagraphStartWrappingDisabled
in interfaceParagraphContainer
-
isParagraphInTightListItem
- Specified by:
isParagraphInTightListItem
in interfaceParagraphItemContainer
-
isItemParagraph
- Specified by:
isItemParagraph
in interfaceParagraphItemContainer
-
isParagraphWrappingDisabled
public boolean isParagraphWrappingDisabled(Paragraph node, ListOptions listOptions, DataHolder options) - Specified by:
isParagraphWrappingDisabled
in interfaceParagraphItemContainer
-
isInTightList
public boolean isInTightList() -
isHadBlankAfterItemParagraph
public boolean isHadBlankAfterItemParagraph() -
isContainsBlankLine
public boolean isContainsBlankLine() -
setContainsBlankLine
public void setContainsBlankLine(boolean containsBlankLine) -
setHadBlankAfterItemParagraph
public void setHadBlankAfterItemParagraph(boolean hadBlankAfterItemParagraph) -
getLastBlankLineChild
Description copied from class:Node
Overridden by ListBlock and any others whose children propagate their blank line to parent- Overrides:
getLastBlankLineChild
in classNode
- Returns:
- return a child block that can contain the parent's last blank line
-