Class BlockFormatProviderBase<T>
- java.lang.Object
-
- com.vladsch.flexmark.docx.converter.util.BlockFormatProviderBase<T>
-
- All Implemented Interfaces:
BlockFormatProvider<T>
,FormatProvider<T>
- Direct Known Subclasses:
AttributeBlockFormatProvider
,FencedCodeBlockFormatProvider
,FootnoteBlockFormatProvider
,HeadingBlockFormatProvider
,IsolatingBlockFormatProvider
,ListItemBlockFormatProvider
,QuotedFormatProvider
public class BlockFormatProviderBase<T> extends java.lang.Object implements BlockFormatProvider<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
myBaseStyleId
protected DocxContext<T>
myDocx
protected T
myFrame
protected BlockFormatProvider<T>
myParent
protected int
myPCount
-
Fields inherited from interface com.vladsch.flexmark.docx.converter.util.BlockFormatProvider
STYLE_TYPE_NUMBERING
-
-
Constructor Summary
Constructors Constructor Description BlockFormatProviderBase(DocxContext<T> docx, java.lang.String baseStyleId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
adjustPPr(org.docx4j.wml.PPr pPrBase)
void
adjustPPrForFormatting(org.docx4j.wml.PPr pP)
void
close()
finalize, add elements to the document after main part as needed after this method returns no more calls will be made to this providerprotected org.docx4j.wml.Style
getBaseStyle()
protected java.lang.String
getBaseStyleId()
BlockFormatProvider<T>
getBlockParent()
void
getParaRPr(org.docx4j.wml.RPr rPr)
void
getPPr(org.docx4j.wml.PPr pPr)
T
getProviderFrame()
get the node for this formatting blockorg.docx4j.wml.Style
getStyle()
java.lang.String
getStyleId()
these are the hard-coded styles on which this block is based used for reference purposes by children to figure out what they need to combineprotected BlockFormatProvider<T>
getStyleParent()
Get the style parent for the next P of this blockprotected void
inheritBdr(org.docx4j.wml.PPr pPr, org.docx4j.wml.PPr parentPPr)
Inherit left borderprotected void
inheritIndent(org.docx4j.wml.PPr pPrBase, org.docx4j.wml.PPr parentPrBase)
protected void
inheritParentFormat(org.docx4j.wml.PPr pPr, org.docx4j.wml.PPr parentPPr)
void
open()
initialize internal stuff based on the parent for future use optionally add elements to doc before main elements any P creates will call the getPPr(), getParaRPr() and addP() for this provider so don't create elements until you are ready to handle these calls
-
-
-
Field Detail
-
myDocx
protected final DocxContext<T> myDocx
-
myFrame
protected final T myFrame
-
myParent
protected final BlockFormatProvider<T> myParent
-
myBaseStyleId
protected final java.lang.String myBaseStyleId
-
myPCount
protected int myPCount
-
-
Constructor Detail
-
BlockFormatProviderBase
public BlockFormatProviderBase(DocxContext<T> docx, java.lang.String baseStyleId)
-
-
Method Detail
-
adjustPPrForFormatting
public void adjustPPrForFormatting(org.docx4j.wml.PPr pP)
- Specified by:
adjustPPrForFormatting
in interfaceBlockFormatProvider<T>
-
getProviderFrame
public T getProviderFrame()
Description copied from interface:FormatProvider
get the node for this formatting block- Specified by:
getProviderFrame
in interfaceFormatProvider<T>
- Returns:
- node for this format provider
-
open
public void open()
Description copied from interface:FormatProvider
initialize internal stuff based on the parent for future use optionally add elements to doc before main elements any P creates will call the getPPr(), getParaRPr() and addP() for this provider so don't create elements until you are ready to handle these calls- Specified by:
open
in interfaceFormatProvider<T>
-
close
public void close()
Description copied from interface:FormatProvider
finalize, add elements to the document after main part as needed after this method returns no more calls will be made to this provider- Specified by:
close
in interfaceFormatProvider<T>
-
getBaseStyle
protected org.docx4j.wml.Style getBaseStyle()
-
getStyle
public org.docx4j.wml.Style getStyle()
- Specified by:
getStyle
in interfaceFormatProvider<T>
-
getBaseStyleId
protected java.lang.String getBaseStyleId()
-
getStyleId
public java.lang.String getStyleId()
Description copied from interface:FormatProvider
these are the hard-coded styles on which this block is based used for reference purposes by children to figure out what they need to combine- Specified by:
getStyleId
in interfaceFormatProvider<T>
- Returns:
- style id
-
getStyleParent
protected BlockFormatProvider<T> getStyleParent()
Get the style parent for the next P of this block- Returns:
- parent to use for style inheritance
-
getBlockParent
public BlockFormatProvider<T> getBlockParent()
- Specified by:
getBlockParent
in interfaceBlockFormatProvider<T>
-
inheritIndent
protected void inheritIndent(org.docx4j.wml.PPr pPrBase, org.docx4j.wml.PPr parentPrBase)
-
inheritParentFormat
protected void inheritParentFormat(org.docx4j.wml.PPr pPr, org.docx4j.wml.PPr parentPPr)
-
adjustPPr
protected void adjustPPr(org.docx4j.wml.PPr pPrBase)
-
inheritBdr
protected void inheritBdr(org.docx4j.wml.PPr pPr, org.docx4j.wml.PPr parentPPr)
Inherit left bordermust be called after ind has been determined
- Parameters:
pPr
- ppr to setparentPPr
- parent ppr
-
getPPr
public void getPPr(org.docx4j.wml.PPr pPr)
- Specified by:
getPPr
in interfaceBlockFormatProvider<T>
-
getParaRPr
public void getParaRPr(org.docx4j.wml.RPr rPr)
- Specified by:
getParaRPr
in interfaceBlockFormatProvider<T>
-
-