public class FourRpLayouter extends LayoutedPagesProducer implements DataConsumer, java.io.Serializable
FourRpProcessor
and PXMLLayouter
containing the methods of both classes. For details refer
to the respective documentation.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
FourRpLayouter()
Creates a FourRpLayouter object.
|
|
FourRpLayouter(java.lang.String filename,
LayoutedPagesConsumer consumer)
Creates a FourRpLayouter object for the specified template file
that outputs to the given consumer object.
|
Modifier and Type | Method and Description |
---|---|
GreContentHandler |
createContentHandler()
Creates a content handler into which the input document can be
streamed thru the rendering pipe.
|
java.lang.Integer |
getDebugLevel()
Returns the debug level.
|
java.io.File |
getInputLogFile() |
void |
logInputToFile(java.io.File logFile,
boolean logOnly)
Specifies to log the input to an XML file.
|
boolean |
logOnly() |
void |
runFromJAXBObject(java.lang.Object data)
Uses
JAXB to stream the object
data thru the rendering pipe. |
void |
runFromXML(java.lang.String fileName)
Streams the specified file thru the rendering pipe.
|
void |
setAuthor(java.lang.String author)
Sets the report's author metadata attribute.
|
void |
setBottomMargin(java.lang.String bottomMarginExpression)
Specifies the bottom margin as a PXML numeric expression (e.g.
|
void |
setConsumer(LayoutedPagesConsumer consumer)
Sets the output consumer.
|
void |
setCreator(java.lang.String creator)
Sets the report creator.
|
void |
setDebugLevel(java.lang.Integer level)
Sets the debug level as determined by the
level . |
void |
setEnvironment(org.xml.sax.Attributes values)
Specifies variable values in the private environment of the report
Can be used to specify the value of environment variables like GREOUTPUTDIR or user defined variables for the purpose of using the values in calls to the RTL function Runtime.getEnvironmentVariable().
|
void |
setFGLLocalizationCharset(java.lang.String fglLocalizationCharset)
Specified the
charset in which the
".42s" localization files are encoded. |
void |
setFGLLocalizationNumberFormat(java.lang.String fglLocalizationNumberFormat)
Specifies the format pattern to be used for number formatting.
|
void |
setFGLLocalizationResourcePath(java.lang.String[] fglLocalizationResourcePath)
Specifies the search path for localization (".42s") files.
|
void |
setKeywords(java.lang.String keywords)
Sets the report's keywords meta data attribute.
|
void |
setLeftMargin(java.lang.String leftMarginExpression)
Specifies the left margin as a PXML numeric expression (e.g.
|
void |
setMarkOverfullBoxesInDocument(java.lang.Boolean markOverfullBoxesInDocument)
Activates visual marking of overfull boxes if true.
|
void |
setPageLength(java.lang.String pageLengthExpression)
Specifies the page height as a PXML numeric expression (e.g.
|
void |
setPageWidth(java.lang.String pageWidthExpression)
Specifies the page width as a PXML numeric expression (e.g.
|
void |
setRecordingFileName(java.lang.String recordingFileName)
Specifies input recording for the purpose of play back or debugging.
|
void |
setRenderingHints(org.xml.sax.Attributes values)
Specifies rendering hints to be used during the rendering process
Can be used to specify the value of rendering hints.
|
void |
setReportFileName(java.lang.String reportFileName)
Specifies the template file that is used for the transformation of
the input.
|
void |
setRightMargin(java.lang.String rightMarginExpression)
Specifies the right margin as a PXML numeric expression (e.g.
|
void |
setSubject(java.lang.String subject)
Sets the report subject.
|
void |
setTitle(java.lang.String title)
Sets the report title.
|
void |
setTopMargin(java.lang.String topMarginExpression)
Specifies the top margin as a PXML numeric expression (e.g.
|
public static final java.lang.String legalCopyright
protected FourRpLayouter()
public FourRpLayouter(java.lang.String filename, LayoutedPagesConsumer consumer)
filename
- A '.4rp' fileconsumer
- A LayoutedPageConsumersetReportFileName(java.lang.String)
public void setRecordingFileName(java.lang.String recordingFileName)
recordingFileName
.
In the case of a remote
connection the file is
created on the remote server.recordingFileName
- Name of the XML file in which the input is to be written.public java.lang.Integer getDebugLevel()
getDebugLevel
in interface DataConsumer
setDebugLevel(java.lang.Integer)
public void setDebugLevel(java.lang.Integer level)
level
.
Only Messages with a message level lower or equal to level
will be displayed and logged.
There following six message levels are defined:
server
.setDebugLevel
in interface DataConsumer
level
- Messages with a level higher than this value will not be displayed or logged.java.lang.IllegalArgumentException
- if the level
is not in the range 0..9public void setPageWidth(java.lang.String pageWidthExpression)
pageWidthExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setPageLength(java.lang.String pageLengthExpression)
pageLengthExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setLeftMargin(java.lang.String leftMarginExpression)
leftMarginExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setTopMargin(java.lang.String topMarginExpression)
topMarginExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setRightMargin(java.lang.String rightMarginExpression)
rightMarginExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setBottomMargin(java.lang.String bottomMarginExpression)
bottomMarginExpression
- A PXML numeric expression.java.lang.IllegalArgumentException
- if the expression isn't a valid PXML numeric expressionpublic void setTitle(java.lang.String title)
FourRpProcessor
.title
- The report title.public void setAuthor(java.lang.String author)
FourRpProcessor
.author
- The report's author metadata attribute.public void setCreator(java.lang.String creator)
FourRpProcessor
.creator
- The report creator.public void setSubject(java.lang.String subject)
FourRpProcessor
.subject
- The report subject.public void setKeywords(java.lang.String keywords)
FourRpProcessor
.keywords
- The report's keywords.public void setMarkOverfullBoxesInDocument(java.lang.Boolean markOverfullBoxesInDocument)
false
.markOverfullBoxesInDocument
- whether overfull boxes are visually marked.public void setConsumer(LayoutedPagesConsumer consumer)
setConsumer
in class LayoutedPagesProducer
consumer
- The output consumer.public void setFGLLocalizationCharset(java.lang.String fglLocalizationCharset)
charset
in which the
".42s" localization files are encoded. By default the system
encoding is assumed.fglLocalizationCharset
- An encoding name supported by the JVM (see Charset.availableCharsets()
)public void setFGLLocalizationResourcePath(java.lang.String[] fglLocalizationResourcePath)
fglLocalizationResourcePath
- Array of directories to searchpublic void setFGLLocalizationNumberFormat(java.lang.String fglLocalizationNumberFormat)
fglLocalizationNumberFormat
- A FGL compatible format patternpublic void setReportFileName(java.lang.String reportFileName)
reportFileName
- A '.4rp' fileFourRpLayouter(java.lang.String, com.fourjs.report.runtime.LayoutedPagesConsumer)
public void setEnvironment(org.xml.sax.Attributes values)
values
- An attribute set defining the environmentFourRpLayouter(java.lang.String, com.fourjs.report.runtime.LayoutedPagesConsumer)
public void setRenderingHints(org.xml.sax.Attributes values)
values
- An attribute set defining the valuesFourRpLayouter(java.lang.String, com.fourjs.report.runtime.LayoutedPagesConsumer)
public GreContentHandler createContentHandler() throws org.xml.sax.SAXException
createContentHandler
in interface DataConsumer
org.xml.sax.SAXException
- if the handler can't be obtained due to an errorpublic void runFromJAXBObject(java.lang.Object data) throws javax.xml.bind.JAXBException, org.xml.sax.SAXException
JAXB
to stream the object
data
thru the rendering pipe.runFromJAXBObject
in interface DataConsumer
data
- A Java object annotated for JAXP processingjavax.xml.bind.JAXBException
- if the serialization of the object failsorg.xml.sax.SAXException
- if processing the object's data failspublic void runFromXML(java.lang.String fileName) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
runFromXML
in interface DataConsumer
fileName
- The XML input documentjava.io.IOException
- if reading the data failsorg.xml.sax.SAXException
- if processing data failsjavax.xml.parsers.ParserConfigurationException
- if parsing the data failspublic void logInputToFile(java.io.File logFile, boolean logOnly)
logInputToFile
in interface DataConsumer
logFile
- The location of the output filelogOnly
- Specifies to suppress any further processing of the inputpublic java.io.File getInputLogFile()
getInputLogFile
in interface DataConsumer
public boolean logOnly()
logOnly
in interface DataConsumer