Class DefaultMarkerProcessor


  • public class DefaultMarkerProcessor
    extends Object
    Provides a default marker processor implementation.
    • Method Detail

      • processAttributes

        public String processAttributes​(TextAttribute atts,
                                        String... text)
        Processes the input text and attributes into a text containing markers at the appropriate positions. The length of the text(s) must match the text attributes specified width.
        Parameters:
        atts - the text attributes that apply to the text.
        text - the text(s) to process
        Returns:
        returns a string with markers
        Throws:
        IllegalArgumentException - if the specified attributes does not match the text.
      • processAttributesRetain

        public String[] processAttributesRetain​(TextAttribute atts,
                                                String[] text)
        Processes the input text chunks and attributes into a text containing markers at the appropriate positions while retaining the text partition as specified by the input array. The length of the texts must match the text attributes specified width.
        Parameters:
        text - the texts to process
        atts - the text attributes that apply to the text.
        Returns:
        returns an array of strings with markers
        Throws:
        IllegalArgumentException - if the specified attributes does not match the text.
      • processAttributesRetain

        public String[] processAttributesRetain​(AttributeWithContext atts,
                                                List<String> text)
        Processes the input text chunks and attributes into a text containing markers at the appropriate positions while retaining the text partition as specified by the input array. The length of the texts must match the text attributes specified width.
        Parameters:
        text - the texts to process
        atts - the text attributes that apply to the text.
        Returns:
        returns an array of strings with markers
        Throws:
        IllegalArgumentException - if the specified attributes does not match the text.