Class JDPFormatDoc
java.lang.Object
|
+----JDPFormatDoc
- public class JDPFormatDoc
- extends Object
Class JDPFormatDoc represents a class for formatting reports into html and other formats.
-
CSV
-
-
EXCEL
-
-
HTML
-
-
PLAIN
-
-
JDPFormatDoc(JDPUser)
- Creates a document formatter.
-
addComponent(Component)
- Add the component to be drawn.
-
addDetailHeader(String[])
- Add a detail header to the output document
-
addDetailLine(String[])
- Add a detail line to the output document
-
addGrid(JDPTextGrid)
- Add a JDPTextGrid to the document with the grid turned on
-
addGrid(JDPTextGrid, int)
- Add a JDPTextGrid to the document with the specified grid width
-
addHeader(String, String)
- Set the title of the document
-
addReport(JDPTextGrid)
- Add a JDPTextGrid to the document with the grid turned off
-
createDetailHeader(String[], int, int, int)
- Add a detail header to the output document
-
createDetailHeader(String[], int, int, int, String)
- Add a detail header to the output document
-
createDetailLine(String[])
- Add a detail line to the output document
-
createHeader(String, String)
- Set the title of the document
-
finishOutput()
- Finish off the document
-
finishOutput(int)
- Finish off the document
-
getFinishedDocument()
- Retrieve the text for the finished document
-
initDocument(int)
- Initialise a new document by creating the necessary header
-
loadDocument()
- Load the finished document to an external viewer
-
setBody(String)
- Set the body of the document
-
setTitle(String)
- Set the title of the document
HTML
public static final int HTML
CSV
public static final int CSV
PLAIN
public static final int PLAIN
EXCEL
public static final int EXCEL
JDPFormatDoc
public JDPFormatDoc(JDPUser user)
- Creates a document formatter.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
initDocument
public void initDocument(int docType)
- Initialise a new document by creating the necessary header
- Parameters:
- docType - the type of document to create and initialise
setTitle
public void setTitle(String docTitle)
- Set the title of the document
- Parameters:
- title - the title of the document
setBody
public void setBody(String bodyParams)
- Set the body of the document
- Parameters:
- bodyParams - the body parameters of the document
addHeader
public void addHeader(String header,
String headerTag)
- Set the title of the document
- Parameters:
- title - the title of the document
createHeader
public String createHeader(String header,
String headerTag)
- Set the title of the document
- Parameters:
- title - the title of the document
addDetailHeader
public void addDetailHeader(String detailHeaders[])
- Add a detail header to the output document
- Parameters:
- detailHeaders - the headers for a detail line of the output document
createDetailHeader
public String createDetailHeader(String detailHeaders[],
int border,
int cellpadding,
int cellspacing)
- Add a detail header to the output document
- Parameters:
- detailHeaders - the headers for a detail line of the output document
createDetailHeader
public String createDetailHeader(String detailHeaders[],
int border,
int cellpadding,
int cellspacing,
String width)
- Add a detail header to the output document
- Parameters:
- detailHeaders - the headers for a detail line of the output document
addDetailLine
public void addDetailLine(String detailData[])
- Add a detail line to the output document
- Parameters:
- detailData - the data for a detail line of the output document
createDetailLine
public String createDetailLine(String detailData[])
- Add a detail line to the output document
- Parameters:
- detailData - the data for a detail line of the output document
finishOutput
public void finishOutput()
- Finish off the document
finishOutput
public void finishOutput(int toStackSize)
- Finish off the document
getFinishedDocument
public String getFinishedDocument()
- Retrieve the text for the finished document
- Returns:
- the text for the finished document
loadDocument
public void loadDocument()
- Load the finished document to an external viewer
addComponent
public void addComponent(Component comp)
- Add the component to be drawn. This routine will add the component
and all of it's subcomponents to the document. Some components are not
yet supported. This method may be called for each individual component
also.
- Parameters:
- component - the component to be added to the document
addReport
public void addReport(JDPTextGrid grid)
- Add a JDPTextGrid to the document with the grid turned off
- Parameters:
- grid - the text grid to be add to the document
addGrid
public void addGrid(JDPTextGrid grid)
- Add a JDPTextGrid to the document with the grid turned on
- Parameters:
- grid - the text grid to be add to the document
addGrid
public void addGrid(JDPTextGrid grid,
int borderWidth)
- Add a JDPTextGrid to the document with the specified grid width
- Parameters:
- grid - the text grid to be add to the document
- gridwidth - the width in pixels of the grid