Interface ITextRegionRewriter

    • Method Detail

      • renderToAppendable

        void renderToAppendable​(java.lang.Iterable<? extends ITextReplacement> replacements,
                                java.lang.Appendable result)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • createReplacement

        ITextReplacement createReplacement​(int offset,
                                           int length,
                                           java.lang.String text)
      • renderToAppendable

        void renderToAppendable​(ITextSegment segment,
                                java.lang.Iterable<? extends ITextReplacement> replacements,
                                java.lang.Appendable result)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • renderToString

        java.lang.String renderToString​(java.lang.Iterable<? extends ITextReplacement> replacements)

        Applies all 'replacements' on the ITextRegionAccess this rewriter is responsible for.

        Replaces the text regions in 'input' identified by ITextRegion.getOffset() and ITextRegion.getLength() with ITextReplacement.getReplacementText().

        Returns:
        The text after the replacements have been applied.
      • renderToString

        java.lang.String renderToString​(ITextSegment input,
                                        java.lang.Iterable<? extends ITextReplacement> replacements)
        Applies replacements similar to renderToString(Iterable), but ITextRegion.getOffset() is treated as relative to ITextRegion.getOffset() from 'input'.