org.jcon.text
Class BeanReportEngine

java.lang.Object
  extended by org.jcon.text.AbstractReportEngine
      extended by org.jcon.text.BeanReportEngine
All Implemented Interfaces:
java.io.Serializable, TextReportEngine
Direct Known Subclasses:
HierarchicalReportEngine

public class BeanReportEngine
extends AbstractReportEngine

The engine for simple preformatted text reports.

Author:
Paul Reavis
See Also:
Serialized Form

Constructor Summary
BeanReportEngine()
           
BeanReportEngine(java.lang.String format)
           
BeanReportEngine(java.lang.String format, java.util.ArrayList fieldNames)
           
 
Method Summary
 java.util.ArrayList getFieldNames()
          The ordered list of field names, corresponding to the order of the hash symbol fields in the format string.
 java.lang.String getFormat()
          The format string for the engine.
 java.util.ArrayList getTextSubstitutions()
           
 boolean isVariableWidthOnly()
           
 void printField(java.lang.Object source, java.lang.String fieldName, java.io.PrintWriter writer)
          This allows hierarchical or other subclasses to do something different.
 void setFieldNames(java.util.ArrayList newFieldNames)
          The ordered list of field names, corresponding to the order of the hash symbol fields in the format string.
 void setFormat(java.lang.String newFormat)
          The format string for the engine.
 void setTextSubstitutions(java.util.ArrayList newSubs)
           
 void setVariableWidthOnly(boolean tizit)
           
 void writeReport(java.lang.Object source, java.io.PrintWriter printy)
          Generates and writes a report based on the provided source object.
 
Methods inherited from class org.jcon.text.AbstractReportEngine
generateReportFor, writeReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanReportEngine

public BeanReportEngine()

BeanReportEngine

public BeanReportEngine(java.lang.String format,
                        java.util.ArrayList fieldNames)

BeanReportEngine

public BeanReportEngine(java.lang.String format)
Method Detail

writeReport

public void writeReport(java.lang.Object source,
                        java.io.PrintWriter printy)
Generates and writes a report based on the provided source object. Uses org.jcon.data.BeanGraph to resolve properties and node paths on the object.

Specified by:
writeReport in class AbstractReportEngine

printField

public void printField(java.lang.Object source,
                       java.lang.String fieldName,
                       java.io.PrintWriter writer)
This allows hierarchical or other subclasses to do something different.


getFormat

public java.lang.String getFormat()
The format string for the engine. It consists of whatever additional text is needed, wrapped around fields marked by hash symbols (e.g. "This is a format with two fields: ###### and #####").


setFormat

public void setFormat(java.lang.String newFormat)
The format string for the engine. It consists of whatever additional text is needed, wrapped around fields marked by hash symbols (e.g. "This is a format with two fields: ###### and #####").


getFieldNames

public java.util.ArrayList getFieldNames()
The ordered list of field names, corresponding to the order of the hash symbol fields in the format string.


getTextSubstitutions

public java.util.ArrayList getTextSubstitutions()

setTextSubstitutions

public void setTextSubstitutions(java.util.ArrayList newSubs)

setFieldNames

public void setFieldNames(java.util.ArrayList newFieldNames)
The ordered list of field names, corresponding to the order of the hash symbol fields in the format string.


isVariableWidthOnly

public boolean isVariableWidthOnly()

setVariableWidthOnly

public void setVariableWidthOnly(boolean tizit)