Interface IFormattableDocument

  • All Known Subinterfaces:
    IFormattableSubDocument
    All Known Implementing Classes:
    FilteredSubDocument, FormattableDocument, MaxLineWidthDocument, RootDocument, SubDocument

    public interface IFormattableDocument

    A FormattableDocument is a stateful object that holds a list of replacers. Each replacer is responsible for a text region inside this document. The document can be populated with replacers in any order. However, it is not possible and not intended to register two or more replacers for the same or overlapping region.

    Eventually, all replacers are invoked from the beginning of the document to the end of the document. Each replacer produces text replacements for their region. A ITextReplacerContext is passed on from replacer to replacer and holds state such as the current indentation level.

    Besides this, a formattable document

    • offers convenience API to define formatting for HiddenRegions. See ITextRegionAccess for a definition of HiddenRegions and IHiddenRegionFormatter for how they can be formatted.
    • supports conditional formatting. For example, it can try to format a region into the current line and. if that doesn't work, apply an alternative strategy.
    Since:
    2.8
    Noextend:
    This interface is not intended to be extended by clients.
    Noimplement:
    This interface is not intended to be implemented by clients.