Class FlowLayoutTextField

  • All Implemented Interfaces:
    Field, TextField

    public class FlowLayoutTextField
    extends VerticalLayoutTextField
    This class provides a TextField implementation that takes multiple AttributedStrings and places as many that will fit on a line without clipping before continuing to the next line.
    • Constructor Detail

      • FlowLayoutTextField

        public FlowLayoutTextField​(FieldElement[] textElements,
                                   int startX,
                                   int width,
                                   int maxLines,
                                   HighlightFactory hlFactory)
        This constructor will create a text field that will render one line of text. If metrics.stringWidth(text) > width, then the text will be clipped. No wrapping will be performed. If text contains the highlight string, then it will be highlighted using the highlight color.
        textElements - the AttributedStrings to display
        startX - the x position to draw the string
        width - the max width allocated to this field
        maxLines - the max number of lines to display
        hlFactory - the highlight factory