public interface DocListener extends ElementListener
DocListener will perform some
actions when some actions are performed on a Document.ElementListener,
Document,
DocWriter| Modifier and Type | Method and Description |
|---|---|
void |
close()
Signals that the
Document was closed and that no other
Elements will be added. |
boolean |
newPage()
Signals that an new page has to be started.
|
void |
open()
Signals that the
Document has been opened and that
Elements can be added. |
void |
resetPageCount()
Sets the page number to 0.
|
boolean |
setMarginMirroring(boolean marginMirroring)
Parameter that allows you to do left/right margin mirroring (odd/even pages)
|
boolean |
setMarginMirroringTopBottom(boolean marginMirroringTopBottom)
Parameter that allows you to do top/bottom margin mirroring (odd/even pages)
|
boolean |
setMargins(float marginLeft,
float marginRight,
float marginTop,
float marginBottom)
Sets the margins.
|
void |
setPageCount(int pageN)
Sets the page number.
|
boolean |
setPageSize(Rectangle pageSize)
Sets the pagesize.
|
addvoid open()
Document has been opened and that
Elements can be added.void close()
Document was closed and that no other
Elements will be added.
The outputstream of every writer implementing DocListener will be closed.
boolean newPage()
true if the page was added, false if not.boolean setPageSize(Rectangle pageSize)
pageSize - the new pagesizebooleanboolean setMargins(float marginLeft,
float marginRight,
float marginTop,
float marginBottom)
marginLeft - the margin on the leftmarginRight - the margin on the rightmarginTop - the margin on the topmarginBottom - the margin on the bottombooleanboolean setMarginMirroring(boolean marginMirroring)
marginMirroring - boolean setMarginMirroringTopBottom(boolean marginMirroringTopBottom)
marginMirroringTopBottom - void setPageCount(int pageN)
pageN - the new page numbervoid resetPageCount()
Copyright © 2016. All rights reserved.