com.aspose.words

Interface IFieldResultFormatter

  • public interface IFieldResultFormatter 

Implement this interface if you want to control how the field result is formatted.

Method Summary
abstract java.lang.Stringformat(double value, int format)
Called when Aspose.Words applies a number format switch, i.e. \* Ordinal.
abstract java.lang.Stringformat(java.lang.String value, int format)
Called when Aspose.Words applies a capitalization format switch, i.e. \* Upper.
abstract java.lang.StringformatDateTime(java.util.Date value, java.lang.String format, int calendarType)
Called when Aspose.Words applies a date/time format switch, i.e. \@ "dd.MM.yyyy".
abstract java.lang.StringformatNumeric(double value, java.lang.String format)
Called when Aspose.Words applies a numeric format switch, i.e. \# "#.##".
 

    • Method Detail

      • format

        public abstract java.lang.String format(double value, int format)
        Called when Aspose.Words applies a number format switch, i.e. \* Ordinal. The implementation should return null to indicate that the default formatting should be applied.
        Parameters:
        format - A GeneralFormat value.
      • format

        public abstract java.lang.String format(java.lang.String value, int format)
        Called when Aspose.Words applies a capitalization format switch, i.e. \* Upper. The implementation should return null to indicate that the default formatting should be applied.
        Parameters:
        format - A GeneralFormat value.
      • formatDateTime

        public abstract java.lang.String formatDateTime(java.util.Date value, java.lang.String format, int calendarType)
        Called when Aspose.Words applies a date/time format switch, i.e. \@ "dd.MM.yyyy". The implementation should return null to indicate that the default formatting should be applied.
        Parameters:
        calendarType - A CalendarType value.
      • formatNumeric

        public abstract java.lang.String formatNumeric(double value, java.lang.String format)
        Called when Aspose.Words applies a numeric format switch, i.e. \# "#.##". The implementation should return null to indicate that the default formatting should be applied.