fr.opensagres.xdocreport.document.docx.textstyling
Class DocxDocumentHandler

java.lang.Object
  extended by java.io.Writer
      extended by fr.opensagres.xdocreport.document.textstyling.AbstractDocumentHandler
          extended by fr.opensagres.xdocreport.document.docx.textstyling.DocxDocumentHandler
All Implemented Interfaces:
IDocumentHandler, ITransformResult, Closeable, Flushable, Appendable

public class DocxDocumentHandler
extends AbstractDocumentHandler

Document handler implementation to build docx fragment content.


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.opensagres.xdocreport.document.textstyling.IDocumentHandler
IDocumentHandler.TextLocation
 
Field Summary
protected  IDocxStylesGenerator styleGen
           
 
Fields inherited from class java.io.Writer
lock
 
Fields inherited from interface fr.opensagres.xdocreport.document.textstyling.ITransformResult
TEXT_BEFORE_PROPERTY, TEXT_BODY_PROPERTY, TEXT_END_PROPERTY
 
Constructor Summary
DocxDocumentHandler(BufferedElement parent, IContext context, String entryName)
           
 
Method Summary
protected  void doEndOrderedList()
           
 void doEndTable(TableProperties properties)
           
 void doEndTableCell()
           
 void doEndTableRow()
           
protected  void doEndUnorderedList()
           
protected  void doStartOrderedList(ListProperties properties)
           
protected  void doStartTable(TableProperties properties)
           
 void doStartTableCell(TableCellProperties properties)
           
 void doStartTableRow(TableRowProperties properties)
           
protected  void doStartUnorderedList(ListProperties properties)
           
 void endBold()
           
 void endDocument()
           
 void endHeading(int level)
           
 void endItalics()
           
 void endListItem()
           
 void endParagraph()
           
 void endSpan()
           
 void endStrike()
           
 void endSubscript()
           
 void endSuperscript()
           
 void endUnderline()
           
 void handleImage(String ref, String label)
           
 void handleLineBreak()
           
 void handleReference(String ref, String label)
           
 void handleString(String content)
           
 void startBold()
           
 void startDocument()
           
 void startHeading(int level, HeaderProperties properties)
           
 void startItalics()
           
 void startListItem(ListItemProperties properties)
           
 void startParagraph(ParagraphProperties properties)
           
 void startSpan(SpanProperties properties)
           
 void startStrike()
           
 void startSubscript()
           
 void startSuperscript()
           
 void startUnderline()
           
 
Methods inherited from class fr.opensagres.xdocreport.document.textstyling.AbstractDocumentHandler
close, endOrderedList, endTable, endTableCell, endTableRow, endUnorderedList, flush, getContext, getCurrentListIndex, getCurrentListOrder, getCurrentWriter, getEntryName, getParent, getTextBefore, getTextBody, getTextEnd, popTempWriter, pushTempWriter, setTextLocation, startOrderedList, startTable, startTableCell, startTableRow, startUnorderedList, toString, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

styleGen

protected final IDocxStylesGenerator styleGen
Constructor Detail

DocxDocumentHandler

public DocxDocumentHandler(BufferedElement parent,
                           IContext context,
                           String entryName)
Method Detail

startDocument

public void startDocument()

endDocument

public void endDocument()
                 throws IOException
Throws:
IOException

startBold

public void startBold()

endBold

public void endBold()

startItalics

public void startItalics()

endItalics

public void endItalics()

startUnderline

public void startUnderline()
                    throws IOException
Throws:
IOException

endUnderline

public void endUnderline()
                  throws IOException
Throws:
IOException

startStrike

public void startStrike()
                 throws IOException
Throws:
IOException

endStrike

public void endStrike()
               throws IOException
Throws:
IOException

startSubscript

public void startSubscript()
                    throws IOException
Throws:
IOException

endSubscript

public void endSubscript()
                  throws IOException
Throws:
IOException

startSuperscript

public void startSuperscript()
                      throws IOException
Throws:
IOException

endSuperscript

public void endSuperscript()
                    throws IOException
Throws:
IOException

handleString

public void handleString(String content)
                  throws IOException
Specified by:
handleString in interface IDocumentHandler
Overrides:
handleString in class AbstractDocumentHandler
Throws:
IOException

startParagraph

public void startParagraph(ParagraphProperties properties)
                    throws IOException
Throws:
IOException

endParagraph

public void endParagraph()
                  throws IOException
Throws:
IOException

startListItem

public void startListItem(ListItemProperties properties)
                   throws IOException
Throws:
IOException

endListItem

public void endListItem()
                 throws IOException
Throws:
IOException

startHeading

public void startHeading(int level,
                         HeaderProperties properties)
                  throws IOException
Throws:
IOException

endHeading

public void endHeading(int level)
                throws IOException
Throws:
IOException

startSpan

public void startSpan(SpanProperties properties)
               throws IOException
Throws:
IOException

endSpan

public void endSpan()
             throws IOException
Throws:
IOException

doStartOrderedList

protected void doStartOrderedList(ListProperties properties)
                           throws IOException
Specified by:
doStartOrderedList in class AbstractDocumentHandler
Throws:
IOException

doStartUnorderedList

protected void doStartUnorderedList(ListProperties properties)
                             throws IOException
Specified by:
doStartUnorderedList in class AbstractDocumentHandler
Throws:
IOException

doEndUnorderedList

protected void doEndUnorderedList()
                           throws IOException
Specified by:
doEndUnorderedList in class AbstractDocumentHandler
Throws:
IOException

doEndOrderedList

protected void doEndOrderedList()
                         throws IOException
Specified by:
doEndOrderedList in class AbstractDocumentHandler
Throws:
IOException

handleReference

public void handleReference(String ref,
                            String label)
                     throws IOException
Throws:
IOException

handleImage

public void handleImage(String ref,
                        String label)
                 throws IOException
Throws:
IOException

handleLineBreak

public void handleLineBreak()
                     throws IOException
Throws:
IOException

doStartTable

protected void doStartTable(TableProperties properties)
                     throws IOException
Specified by:
doStartTable in class AbstractDocumentHandler
Throws:
IOException

doEndTable

public void doEndTable(TableProperties properties)
                throws IOException
Specified by:
doEndTable in class AbstractDocumentHandler
Throws:
IOException

doStartTableRow

public void doStartTableRow(TableRowProperties properties)
                     throws IOException
Specified by:
doStartTableRow in class AbstractDocumentHandler
Throws:
IOException

doEndTableRow

public void doEndTableRow()
                   throws IOException
Specified by:
doEndTableRow in class AbstractDocumentHandler
Throws:
IOException

doStartTableCell

public void doStartTableCell(TableCellProperties properties)
                      throws IOException
Specified by:
doStartTableCell in class AbstractDocumentHandler
Throws:
IOException

doEndTableCell

public void doEndTableCell()
                    throws IOException
Specified by:
doEndTableCell in class AbstractDocumentHandler
Throws:
IOException


Copyright © 2013. All Rights Reserved.