Class StringFormat

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

public class StringFormat extends Object implements IFormat
StringFormat

Class to format String value

  • Constructor Details

    • StringFormat

      public StringFormat(int maxChar)
      Create a StringFormat instance
    • StringFormat

      public StringFormat()
      Create a StringFormat instance
  • Method Details

    • 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 String format(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 String getTextFormat()
      Internal use
      Specified by:
      getTextFormat in interface IFormat
    • createFormat

      public static StringFormat createFormat(String text) throws Exception
      Create a StringFormat instance
      Throws:
      Exception