jet.bean
Class HtmlParameter

java.lang.Object
  extended by jet.bean.HtmlParameter
All Implemented Interfaces:
java.io.Serializable

public class HtmlParameter
extends java.lang.Object
implements java.io.Serializable

The HtmlParameter class is used for exporting to HTML. It contains all the information for exporting report results.

Since:
JDK1.4 2008/06/19 added page level security interface in
See Also:
Serialized Form

Field Summary
static int FORMAT_DEFAULT
          Default image type for exporting.
static int FORMAT_GIF
          Exports image as GIF type.
static int FORMAT_JPEG
          Exports image as JPEG type.
static int FORMAT_PNG
          Exports image as PNG type.
 
Constructor Summary
HtmlParameter()
           
 
Method Summary
 HtmlParameter copy()
          Adding the method for MailInformation can clone this object.
 int getBrowserType()
          Returns the parameter value of BrowserType.
 int getExportImageType()
          Returns the parameter value of ExportImageType.
 int[] getExportPageNumberList()
          Returns the export pageNumber list.
 int[][] getExportPageNumberRange()
          Returns export pageNumber range array.
 boolean getisPlsExporter()
          Get if it is Hmtl PLS format.
 java.lang.String getLastPageURL()
          Returns the parameter value of LastPageURL.
 java.util.Properties getNLSProperties()
          Returns the NLS properties object.
 int getOverflowType()
          Gets the parameter value of OverflowType.
 int getResolution()
          Returns the parameter value of resolution.
 java.lang.String getTitle()
          Returns the parameter value of title.
 java.lang.String getURI()
          Gets URI parameter.
 java.lang.String getUrl()
          Returns the parameter value of URL, only used for pipeline mode JRServer interface.
 boolean hasHyperlink()
          Sets if there are hyperlinks for navigating previous and next pages on the navigation bar of the exported HTML file.
 boolean hasPageNumber()
          Sets if there is page number information showing the current page number and total page number on the navigation bar of the exported HTML file.
 boolean isAbsoluteFontSize()
          Returns the parameter value of isAbsoluteFontSize.
 boolean isDhtml()
          Sets whether to enable the TOC (Table of Contents) when viewing the report in HTML format.
 boolean isEmbededCSS()
          Sets whether to embed the cascading style sheet (CSS) in the exported HTML files; otherwise, the .css file will be generated individually.
 boolean isExportAppletChart()
          Returns the parameter value of isExportAppletChart.
 boolean IsExportToMultiFiles()
          Returns the parameter value of IsExportToMultiFiles.
 boolean isForHtmlMail()
          Returns the parameter value of isForHtmlMail.
 boolean isIncludeDrillDownFile()
          Returns the parameter value of isIncludeDrillDownFile.
 boolean isNoMargin()
          Returns the parameter value of isNoMargin.
 boolean isOnlyExportHtmlBody()
          Gets if exports html body only.
 boolean isSect508Html()
          Returns the property value of isSect508Html.
 boolean isTableFormatHtml()
          Deprecated. the feature was removed from v8
 boolean isUseExtenalCSSValue()
          Returns the parameter value of isUseExtenalCSSValue.
 boolean isUseHtmlTable()
          Returns the parameter value of "isUseHtmlTable".
 boolean isUseScope()
          Returns the parameter value of "isUseScope".
 boolean isWriteCSSInline()
          Gets if writes css in line style.
 void setBrowserType(int browserType)
          Sets browser type.
 void setDhtml(boolean isDhtml)
          Sets if the HTML result contains TOC or not.
 void setEmbededCSS(boolean isEmbededCSS)
          Sets the HTML result uses outer CSS or embedded CSS.
When IsExportToMultiFiles=false, the value is alway true.
 void setExportImageType(int exportImageType)
          Sets the image chart type.
 void setExportPageNumberList(int[] exportPageNumberList)
          Sets the export page number list.
 void setExportPageNumberRange(int[][] exportPageNumberRange)
          Sets the export page number list.
 void setHasHyperlink(boolean hasHyperlink)
          Sets if the HTML result contains page navigator link or not.
 void setHasPageNumber(boolean hasPageNumber)
          Sets if the HTML result contains page number or not.
 void setIsAbsoluteFontSize(boolean isAbsoluteFontSize)
          Sets the font unit.
 void setIsExportAppletChart(boolean isExportChartAsApplet)
          Sets if the HTML result uses Applet or image to draw chart.
 void setIsExportToMultiFiles(boolean multifile)
          Sets if the report will be exported to multiple HTML files or not.
 void setIsHtmlMail(boolean isHtmlMail)
          Sets if the HTML file is for email or not.
 void setIsIncludeDrillDownFile(boolean isIncludeDrillDownFile)
          Sets if the HTML result includes drilldown files or not.
 void setIsNoMargin(boolean isNoMargin)
          Sets if the result file removes margins or not.
 void setisPlsExporter(boolean isPLS)
          Sets if exports to PLS html or not.
 void setIsSect508Html(boolean isSect508Html)
          Sets the IsSect508Html properties object to control the html result according to Section508 standard.
 void setIsTableFormatHtml(boolean isTableFormatHtml)
          Deprecated. the feature was removes from v8
 void setLastPageURL(java.lang.String url)
          Sets last page url of the page navigator link, only used for pipeline mode JRServer interface.
 void setNLSProperties(java.util.Properties properties)
          Sets the NLS properties object to control the navigator button text of the html result.
 void setOnlyExportHtmlBody(boolean isOnlyExportHtmlBody)
          Sets if exports html body only.
 void setOverflowType(int overflowType)
          This is to control the text overflow.
 void setResolution(int resolution)
          Sets resolution.
 void setTitle(java.lang.String title)
          Sets the content of html title.
 void setURI(java.lang.String uri)
          Sets URI parameter.
 void setUrl(java.lang.String url)
          Sets page navigator link url, only used for pipeline mode JRServer interface.
 void setUseExtenalCSSValue(boolean isUseExtenalCSSValue)
          Sets to use user defined ExtenalCSSValue as HTML CSS name.
 void setUseHtmlTable(boolean isUseHtmlTable)
          Sets the parameter value of "isUseHtmlTable".
 void setUseScope(boolean isUseScope)
          Sets the parameter value of "isUseScope".
 void setWriteCSSInline(boolean isWriteCSSInline)
          Sets if writes css in line style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_DEFAULT

public static final int FORMAT_DEFAULT
Default image type for exporting.

See Also:
Constant Field Values

FORMAT_GIF

public static final int FORMAT_GIF
Exports image as GIF type.

See Also:
Constant Field Values

FORMAT_JPEG

public static final int FORMAT_JPEG
Exports image as JPEG type.

See Also:
Constant Field Values

FORMAT_PNG

public static final int FORMAT_PNG
Exports image as PNG type.

See Also:
Constant Field Values
Constructor Detail

HtmlParameter

public HtmlParameter()
Method Detail

setURI

public void setURI(java.lang.String uri)
Sets URI parameter.

Parameters:
uri - URI value

getURI

public java.lang.String getURI()
Gets URI parameter.

Returns:
URI value

setHasHyperlink

public void setHasHyperlink(boolean hasHyperlink)
Sets if the HTML result contains page navigator link or not.

Parameters:
hasHyperlink - "true" with link; "False" otherwise.

hasHyperlink

public boolean hasHyperlink()
Sets if there are hyperlinks for navigating previous and next pages on the navigation bar of the exported HTML file.

Returns:
"true" with link; "False" otherwise.

setHasPageNumber

public void setHasPageNumber(boolean hasPageNumber)
Sets if the HTML result contains page number or not.

Parameters:
hasPageNumber - "true" with page number, "False" otherwise.

hasPageNumber

public boolean hasPageNumber()
Sets if there is page number information showing the current page number and total page number on the navigation bar of the exported HTML file.

Returns:
"true" with page number, "False" otherwise

setDhtml

public void setDhtml(boolean isDhtml)
Sets if the HTML result contains TOC or not.

Parameters:
isDhtml - "true" with TOC, "False" otherwise.

isDhtml

public boolean isDhtml()
Sets whether to enable the TOC (Table of Contents) when viewing the report in HTML format.

Returns:
"true" with TOC, "False" otherwise.

setEmbededCSS

public void setEmbededCSS(boolean isEmbededCSS)
Sets the HTML result uses outer CSS or embedded CSS.
When IsExportToMultiFiles=false, the value is alway true.

Parameters:
isEmbededCSS - "true" the cascading style sheet (CSS) will be embedded in the exported HTML files;
"false" the .css file will be generated individually.

isEmbededCSS

public boolean isEmbededCSS()
Sets whether to embed the cascading style sheet (CSS) in the exported HTML files; otherwise, the .css file will be generated individually.

Returns:
"true" the cascading style sheet (CSS) will be embedded in the exported HTML files;
"false" the .css file will be generated individually.

setIsExportAppletChart

public void setIsExportAppletChart(boolean isExportChartAsApplet)
Sets if the HTML result uses Applet or image to draw chart.

Parameters:
isExportChartAsApplet - "true" uses Applet, "False" uses image.

isExportAppletChart

public boolean isExportAppletChart()
Returns the parameter value of isExportAppletChart.

Returns:
"true" with Applet, "False" with image.

setIsExportToMultiFiles

public void setIsExportToMultiFiles(boolean multifile)
Sets if the report will be exported to multiple HTML files or not.

Parameters:
multifile - If "true", JReport designates a serial number for each HTML page. For example, if you named a 3-page report as "sales", JReport will create three files called sales_1.html, sales_2.html, and sales_3.html.
If "false", all pages including CSS will be exported to one file.

IsExportToMultiFiles

public boolean IsExportToMultiFiles()
Returns the parameter value of IsExportToMultiFiles.

Returns:
If "true", JReport designates a serial number for each HTML page. For example, if you named a 3-page report as "sales", JReport will create three files called sales_1.html, sales_2.html, and sales_3.html.
If "false", all pages including CSS will be exported to one file.

setIsHtmlMail

public void setIsHtmlMail(boolean isHtmlMail)
Sets if the HTML file is for email or not.

Parameters:
isHtmlMail - If true, the image in the HTML result would be added "cid: + filename + .mail@jinfonet.com" else nothing would be added.

isForHtmlMail

public boolean isForHtmlMail()
Returns the parameter value of isForHtmlMail.

Returns:
If true, the image in the HTML result would be added "cid: + filename + .mail@jinfonet.com" else nothing would be added.

setIsIncludeDrillDownFile

public void setIsIncludeDrillDownFile(boolean isIncludeDrillDownFile)
Sets if the HTML result includes drilldown files or not.

Parameters:
isIncludeDrillDownFile - "true" generates drilldown file; "false" otherwise

isIncludeDrillDownFile

public boolean isIncludeDrillDownFile()
Returns the parameter value of isIncludeDrillDownFile.

Returns:
"true" generates drilldown file; "false" otherwise

setIsNoMargin

public void setIsNoMargin(boolean isNoMargin)
Sets if the result file removes margins or not.

Parameters:
isNoMargin - "true" removes the margins originally set when the report was designed.
"false" exports with original margins

isNoMargin

public boolean isNoMargin()
Returns the parameter value of isNoMargin.

Returns:
"true" removes the margins originally set when the report was designed.
"false" exports with original margins

setBrowserType

public void setBrowserType(int browserType)
Sets browser type.

Parameters:
browserType - 0 -- IE ; 1 -- NETSCAPE

getBrowserType

public int getBrowserType()
Returns the parameter value of BrowserType.

Returns:
0 -- IE ; 1 -- NETSCAPE

setExportImageType

public void setExportImageType(int exportImageType)
Sets the image chart type.

Parameters:
exportImageType - 0 -- default; 1 -- GIF; 2 -- JPEG

getExportImageType

public int getExportImageType()
Returns the parameter value of ExportImageType.

Returns:
0 -- default; 1 -- GIF; 2 -- JPEG

setIsAbsoluteFontSize

public void setIsAbsoluteFontSize(boolean isAbsoluteFontSize)
Sets the font unit.

Parameters:
isAbsoluteFontSize - "true" use pixel as font unit
"false" if browserType is IE, use "em" as font unit; else if browserType is Netscape, use "pt" as font unit

isAbsoluteFontSize

public boolean isAbsoluteFontSize()
Returns the parameter value of isAbsoluteFontSize.

Returns:
"true" use pixel as font unit
"false" if browserType is IE, use "em" as font unit, else if browserType is Netscape, use "pt" as font unit

setIsTableFormatHtml

public void setIsTableFormatHtml(boolean isTableFormatHtml)
Deprecated. the feature was removes from v8

Sets to use table tags to export html result. The feature removed from v8, only kept for compatibility.


isTableFormatHtml

public boolean isTableFormatHtml()
Deprecated. the feature was removed from v8

Returns the parameter value of isTableFormatHtml.


setOverflowType

public void setOverflowType(int overflowType)
This is to control the text overflow.

Parameters:
overflowType - 0 -- visible; 1 -- hidden;

getOverflowType

public int getOverflowType()
Gets the parameter value of OverflowType.

Returns:
0 -- visible; 1 -- hidden;

setResolution

public void setResolution(int resolution)
Sets resolution. Different values can implement the "zoom" feature.

Parameters:
resolution - resolution value.

getResolution

public int getResolution()
Returns the parameter value of resolution.

Returns:
resolution value

setTitle

public void setTitle(java.lang.String title)
Sets the content of html title.

Parameters:
content - of html title

getTitle

public java.lang.String getTitle()
Returns the parameter value of title.

Returns:
content of html title

setUrl

public void setUrl(java.lang.String url)
Sets page navigator link url, only used for pipeline mode JRServer interface.

Parameters:
url - URL string

getUrl

public java.lang.String getUrl()
Returns the parameter value of URL, only used for pipeline mode JRServer interface.

Returns:
URL string

setLastPageURL

public void setLastPageURL(java.lang.String url)
Sets last page url of the page navigator link, only used for pipeline mode JRServer interface.

Parameters:
url - last page url

getLastPageURL

public java.lang.String getLastPageURL()
Returns the parameter value of LastPageURL.

Returns:
last page url

setUseExtenalCSSValue

public void setUseExtenalCSSValue(boolean isUseExtenalCSSValue)
Sets to use user defined ExtenalCSSValue as HTML CSS name.

Parameters:
isUseExtenalCSSValue - "true", use user define ExtenalCSSValue, false otherwise

isUseExtenalCSSValue

public boolean isUseExtenalCSSValue()
Returns the parameter value of isUseExtenalCSSValue.

Returns:
"true", use user define ExtenalCSSValue, false otherwise

copy

public HtmlParameter copy()
Adding the method for MailInformation can clone this object.

Returns:

isUseHtmlTable

public boolean isUseHtmlTable()
Returns the parameter value of "isUseHtmlTable". If true, use HTML table element to render DSTableObject and DSCrossTab, else use "div".

Returns:
parameter "isUseHtmlTable" value

setUseHtmlTable

public void setUseHtmlTable(boolean isUseHtmlTable)
Sets the parameter value of "isUseHtmlTable". If true, use HTML table element to render DSTableObject and DSCrossTab, else use "div".

Parameters:
isUseHtmlTable - If true, use HTML table element to render DSTableObject and DSCrossTab, else use "div".

isUseScope

public boolean isUseScope()
Returns the parameter value of "isUseScope". If true, use HTML table element to render DSTableObject and DSCrossTab, and set the row and column header cell with the "scope" value to meet the 508 rules.

Returns:
parameter value of "isUseScope"

setUseScope

public void setUseScope(boolean isUseScope)
Sets the parameter value of "isUseScope". When setUseHtmlTable is true, the parameter is enabled.
If true, when using HTML table element to render DSTableObject and DSCrossTab, write the row and column header cell with "scope" value to meet the 508 rules, else don't output the "scope" property. row header with 'scope="row" ', column header with 'scope="col" '

Parameters:
isUseScope - If true, when using HTML table element to render DSTableObject and DSCrossTab, set the row and column header cell with "scope" value to meet the 508 rules, else don't output the "scope" property.

getNLSProperties

public java.util.Properties getNLSProperties()
Returns the NLS properties object.

Returns:
NLS properties

setNLSProperties

public void setNLSProperties(java.util.Properties properties)
Sets the NLS properties object to control the navigator button text of the html result.

Parameters:
properties - NLS properties

isSect508Html

public boolean isSect508Html()
Returns the property value of isSect508Html.

Returns:
isSect508Html properties value

setIsSect508Html

public void setIsSect508Html(boolean isSect508Html)
Sets the IsSect508Html properties object to control the html result according to Section508 standard.

Parameters:
isSect508Html - true for section508 mode, false is the default mode

getExportPageNumberList

public int[] getExportPageNumberList()
Returns the export pageNumber list.

Returns:
export pageNumber list

setExportPageNumberList

public void setExportPageNumberList(int[] exportPageNumberList)
Sets the export page number list. For example: There are 15 pages in a report. If you set [1,3,15] to the method, the export result will only include page1, page3, and page15.

Parameters:
properties - Array for the export page number list

getExportPageNumberRange

public int[][] getExportPageNumberRange()
Returns export pageNumber range array.

Returns:
export pageNumber range array

setExportPageNumberRange

public void setExportPageNumberRange(int[][] exportPageNumberRange)
Sets the export page number list. For example: There are 15 pages in a report. If you set [[1,2],[14,15]] to the method, the export result will only include page1, page2, page14, and page15.

Parameters:
properties - Array for the export page number range array

isOnlyExportHtmlBody

public boolean isOnlyExportHtmlBody()
Gets if exports html body only.

Returns:
boolean value.

setOnlyExportHtmlBody

public void setOnlyExportHtmlBody(boolean isOnlyExportHtmlBody)
Sets if exports html body only.

Parameters:
boolean - value specifically export to html body only or not

isWriteCSSInline

public boolean isWriteCSSInline()
Gets if writes css in line style.

Returns:
write css in line style or not

setWriteCSSInline

public void setWriteCSSInline(boolean isWriteCSSInline)
Sets if writes css in line style.

Parameters:
isWriteCSSInline - write css in line style or not

setisPlsExporter

public void setisPlsExporter(boolean isPLS)
Sets if exports to PLS html or not.

Parameters:
is - PLS html or not

getisPlsExporter

public boolean getisPlsExporter()
Get if it is Hmtl PLS format.

Returns:
is PLS format or not