Class FlowLayoutTextField

  • All Implemented Interfaces:
    Field, TextField

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

      • FlowLayoutTextField

        @Deprecated(since="10.1",
                    forRemoval=true)
        public FlowLayoutTextField​(FieldElement[] textElements,
                                   int startX,
                                   int width,
                                   int maxLines,
                                   HighlightFactory hlFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        use the constructor that takes a list
        This constructor will create a text field that will render one line of text. If metrics.stringWidth(text) > width, then the text will be wrapped. If text contains the highlight string, then it will be highlighted using the highlight color.
        Parameters:
        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
      • FlowLayoutTextField

        public FlowLayoutTextField​(java.util.List<FieldElement> elements,
                                   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 wrapped. If text contains the highlight string, then it will be highlighted using the highlight color.
        Parameters:
        elements - 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