EspressReport 6.6

quadbase.reportdesigner.util
Class StringFormat

java.lang.Object
  extended by quadbase.reportdesigner.util.StringFormat
All Implemented Interfaces:
IFormat

public class StringFormat
extends java.lang.Object
implements IFormat

StringFormat

Class to format String value


Field Summary
 
Fields inherited from interface quadbase.reportdesigner.util.IFormat
BARCODE, DATETIME, IMAGEURL, LOCALEDATETIME, LOCALENUMERIC, LOGICAL, NUMERIC, STRING, TEXTURL
 
Constructor Summary
StringFormat()
          Create a StringFormat instance
StringFormat(int maxChar)
          Create a StringFormat instance
 
Method Summary
static StringFormat createFormat(java.lang.String text)
          Create a StringFormat instance
 java.lang.String format(java.lang.Object obj)
          Define quadbase.reportdesigner.util.IFormat Format the object if it is an instance of Boolean, otherwise call the default toString() method
 int getFormatType()
          Define quadbase.reportdesigner.util.IFormat Return the type of quadbase.reportdesigner.util.IFormat
 int getMaxCharacter()
          Return the maximum number of characters that can be displayed on the report cell (column)
 java.lang.String getTextFormat()
          Internal use
 void setMaxCharacter(int i)
          Set the maximum number of characters that can be displayed on the report cell (column)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringFormat

public StringFormat(int maxChar)
Create a StringFormat instance


StringFormat

public StringFormat()
Create a StringFormat instance

Method Detail

getFormatType

public int getFormatType()
Define quadbase.reportdesigner.util.IFormat Return the type of quadbase.reportdesigner.util.IFormat

Specified by:
getFormatType in interface IFormat
Returns:
IFormat.STRING

format

public java.lang.String format(java.lang.Object obj)
Define quadbase.reportdesigner.util.IFormat Format the object if it is an instance of Boolean, otherwise call the default toString() method

Specified by:
format in interface IFormat
Parameters:
obj - The target object
Returns:
Formatted string

setMaxCharacter

public void setMaxCharacter(int i)
Set the maximum number of characters that can be displayed on the report cell (column)


getMaxCharacter

public int getMaxCharacter()
Return the maximum number of characters that can be displayed on the report cell (column)


getTextFormat

public java.lang.String getTextFormat()
Internal use

Specified by:
getTextFormat in interface IFormat

createFormat

public static StringFormat createFormat(java.lang.String text)
                                 throws java.lang.Exception
Create a StringFormat instance

Throws:
java.lang.Exception

EspressReport 6.6