jet.bean
Class TextParameter

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

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

The TextParameter class is used for exporting to Text. It contains all the information for exporting report results to normal text and SDF (for example CSV) text formats.

See Also:
Serialized Form

Constructor Summary
TextParameter()
           
 
Method Summary
 TextParameter copy()
          Adding this method for MailInformation can clone this object.
 char getDelimiter()
          Get the delimiter.
 int getResolution()
          Gets the resolution.
 int getUDCHHeight()
          Gets the user defined character height.
 int getUDCHWidth()
          Gets the user defined character width.
 boolean isCompress()
          Gets the flag that indexes whether to compress reports when exporting to text.
 boolean IsForMail()
          Gets the flag whether to produce the file for mail body.
 boolean isForWinExport()
          Gets the flag that indexes whether to export to Windows system or not.
 boolean isHasHeadFoot()
          Gets the flag that indexes whether to include the header and footer when exporting to text.
 boolean isNormalTextFile()
          Gets the flag that indexes whether to export to normal text or not.
 boolean isRepeat()
          Gets the flag that indexes whether to repeat the above line content if the column content is null.
 boolean isUseDelimiter()
          Uses the delimiter to delimit each column.
 boolean isUseQuoteMark()
          Gets the flag to use quotation marks.
 void setCompress(boolean isCompress)
          Sets the flag that indexes whether to compress reports when exporting to text.
 void setDelimiter(char delimiter)
          Sets the delimiter if it is needed when exporting to SDF file.
 void setForMail(boolean forMail)
          Sets the flag whether to produce the text file for email body.
 void setForWinExport(boolean forWin)
          Sets the flag that indexes whether to export reports to Windows system or not.
 void setHasHeadFoot(boolean hasHeadFoot)
          Sets the flag that indexes whether to include the header and footer when exporting to text.
 void setNormalTextFile(boolean isNormalText)
          Sets the flag that indexes whether to export to normal text or not.
 void setRepeat(boolean isRepeat)
          Sets the flag that indexes whether to repeat the above line content if the column content is null.
 void setResolution(int resolution)
          Sets the resolution when exporting reports to text, which may be 96 or 72.
 void setUDCHHeight(int udchHeight)
          Sets the user defined character height.
 void setUDCHWidth(int udchWidth)
          Sets the user defined character width.
 void setUseQuoteMark(boolean useQuoteMark)
          Sets the falg that indexes whether to use quotation marks or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextParameter

public TextParameter()
Method Detail

setNormalTextFile

public void setNormalTextFile(boolean isNormalText)
Sets the flag that indexes whether to export to normal text or not. The default value is true.

Parameters:
isNormalText - the flag whether it is normal format text or not

isNormalTextFile

public boolean isNormalTextFile()
Gets the flag that indexes whether to export to normal text or not.

Returns:
true specifies to export to normal text file

setHasHeadFoot

public void setHasHeadFoot(boolean hasHeadFoot)
Sets the flag that indexes whether to include the header and footer when exporting to text. The default value is true.

Parameters:
hasHeadFoot - the flag whether to export the header and footer to file or not

isHasHeadFoot

public boolean isHasHeadFoot()
Gets the flag that indexes whether to include the header and footer when exporting to text.

Returns:
true when exporting the header and footer to text file

setCompress

public void setCompress(boolean isCompress)
Sets the flag that indexes whether to compress reports when exporting to text. The default value is false.

Parameters:
isCompress - the flag whether to compress reports or not Notice: The compressing processor does not work satisfactorily. So we strongly advise that you set the flag to false.

isCompress

public boolean isCompress()
Gets the flag that indexes whether to compress reports when exporting to text. The default value is false.

Returns:
true when compress blank line

setResolution

public void setResolution(int resolution)
Sets the resolution when exporting reports to text, which may be 96 or 72.

Parameters:
resolution - the resolution when converting the Unit to pixel

getResolution

public int getResolution()
Gets the resolution.

Returns:
the resolution used when exporting to text file

setForWinExport

public void setForWinExport(boolean forWin)
Sets the flag that indexes whether to export reports to Windows system or not. The default value is for Windows system.

Parameters:
forWin - the flag whether to export to Windows system or not

isForWinExport

public boolean isForWinExport()
Gets the flag that indexes whether to export to Windows system or not.

Returns:
true when exporting the text file as Windows format text file

setDelimiter

public void setDelimiter(char delimiter)
Sets the delimiter if it is needed when exporting to SDF file. If the delimiter is null, please do not invoke it.

Parameters:
delimiter - the delimiter of each data for Delimiter format text file Notice: only for SDF text export

isUseDelimiter

public boolean isUseDelimiter()
Uses the delimiter to delimit each column.

Returns:
true if the user has set the delimiter value

getDelimiter

public char getDelimiter()
Get the delimiter.

Returns:
the delimiter that separates each element

setRepeat

public void setRepeat(boolean isRepeat)
Sets the flag that indexes whether to repeat the above line content if the column content is null.

Parameters:
isRepeat - the flag whether to repeat the above line content if the column content is null Notice: only for SDF file

isRepeat

public boolean isRepeat()
Gets the flag that indexes whether to repeat the above line content if the column content is null.

Returns:
true if repeated above element when it is null

setForMail

public void setForMail(boolean forMail)
Sets the flag whether to produce the text file for email body.

Parameters:
forMail - the flag whether the result is for mail body or not

IsForMail

public boolean IsForMail()
Gets the flag whether to produce the file for mail body.

Returns:
true for mail body

setUseQuoteMark

public void setUseQuoteMark(boolean useQuoteMark)
Sets the falg that indexes whether to use quotation marks or not.

Parameters:
useQuoteMark - the flag whether to use quotation marks for data or not Notice: only for SDF text file export

isUseQuoteMark

public boolean isUseQuoteMark()
Gets the flag to use quotation marks.

Returns:
true each element will be quoted by quotation marks when exporting to text

setUDCHWidth

public void setUDCHWidth(int udchWidth)
Sets the user defined character width.

Parameters:
udchWidth - the user defined character width Notice: If the udchHeight is bigger than zero, the width value must be less than 11. Otherwise the width value will have no effect. Notice: only for exporting to normal text file

getUDCHWidth

public int getUDCHWidth()
Gets the user defined character width.

Returns:
the user defined character width

setUDCHHeight

public void setUDCHHeight(int udchHeight)
Sets the user defined character height.

Parameters:
udchHeight - the user defined character height Notice: only for exporting to normal text file

getUDCHHeight

public int getUDCHHeight()
Gets the user defined character height.

Returns:
user defined character height

copy

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

Returns:
TextParameter clone this object