fr.opensagres.xdocreport.document.textstyling
Class AbstractDocumentHandler

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

public abstract class AbstractDocumentHandler
extends Writer
implements IDocumentHandler

Abstract class for document handler IDocumentHandler.


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.opensagres.xdocreport.document.textstyling.IDocumentHandler
IDocumentHandler.TextLocation
 
Field Summary
 
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
AbstractDocumentHandler(BufferedElement parent, IContext context, String entryName)
           
 
Method Summary
 void close()
           
protected abstract  void doEndOrderedList()
           
protected abstract  void doEndUnorderedList()
           
protected abstract  void doStartOrderedList(ListProperties properties)
           
protected abstract  void doStartUnorderedList(ListProperties properties)
           
 void endOrderedList()
          End ordered list.
 void endUnorderedList()
          End unordered list.
 void flush()
           
 IContext getContext()
           
protected  int getCurrentListIndex()
           
protected  boolean getCurrentListOrder()
           
 Writer getCurrentWriter()
           
 String getEntryName()
           
 BufferedElement getParent()
           
 String getTextBefore()
           
 String getTextBody()
           
 String getTextEnd()
           
 void handleString(String s)
          Text content.
 void setTextLocation(IDocumentHandler.TextLocation location)
           
 void startOrderedList(ListProperties properties)
          Start ordered list.
 void startUnorderedList(ListProperties properties)
          Start unordered list.
 String toString()
           
 void write(char[] arg0, int arg1, int arg2)
           
 
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
 
Methods inherited from interface fr.opensagres.xdocreport.document.textstyling.IDocumentHandler
endBold, endDocument, endHeading, endItalics, endListItem, endParagraph, handleImage, handleLineBreak, handleReference, startBold, startDocument, startHeading, startItalics, startListItem, startParagraph
 

Constructor Detail

AbstractDocumentHandler

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

handleString

public void handleString(String s)
                  throws IOException
Description copied from interface: IDocumentHandler
Text content.

Specified by:
handleString in interface IDocumentHandler
Throws:
IOException

startOrderedList

public final void startOrderedList(ListProperties properties)
                            throws IOException
Description copied from interface: IDocumentHandler
Start ordered list.

Specified by:
startOrderedList in interface IDocumentHandler
Throws:
IOException

endOrderedList

public final void endOrderedList()
                          throws IOException
Description copied from interface: IDocumentHandler
End ordered list.

Specified by:
endOrderedList in interface IDocumentHandler
Throws:
IOException

startUnorderedList

public final void startUnorderedList(ListProperties properties)
                              throws IOException
Description copied from interface: IDocumentHandler
Start unordered list.

Specified by:
startUnorderedList in interface IDocumentHandler
Throws:
IOException

endUnorderedList

public final void endUnorderedList()
                            throws IOException
Description copied from interface: IDocumentHandler
End unordered list.

Specified by:
endUnorderedList in interface IDocumentHandler
Throws:
IOException

getCurrentListOrder

protected boolean getCurrentListOrder()

getCurrentListIndex

protected int getCurrentListIndex()

getParent

public BufferedElement getParent()

getContext

public IContext getContext()

getTextBefore

public String getTextBefore()
Specified by:
getTextBefore in interface ITransformResult

getTextBody

public String getTextBody()
Specified by:
getTextBody in interface ITransformResult

getTextEnd

public String getTextEnd()
Specified by:
getTextEnd in interface ITransformResult

setTextLocation

public void setTextLocation(IDocumentHandler.TextLocation location)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

write

public void write(char[] arg0,
                  int arg1,
                  int arg2)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

getCurrentWriter

public Writer getCurrentWriter()

getEntryName

public String getEntryName()

toString

public String toString()
Overrides:
toString in class Object

doStartUnorderedList

protected abstract void doStartUnorderedList(ListProperties properties)
                                      throws IOException
Throws:
IOException

doStartOrderedList

protected abstract void doStartOrderedList(ListProperties properties)
                                    throws IOException
Throws:
IOException

doEndUnorderedList

protected abstract void doEndUnorderedList()
                                    throws IOException
Throws:
IOException

doEndOrderedList

protected abstract void doEndOrderedList()
                                  throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.