Class WrappingVerticalLayoutTextField

    • Constructor Detail

      • WrappingVerticalLayoutTextField

        public WrappingVerticalLayoutTextField​(FieldElement textElement,
                                               int startX,
                                               int width,
                                               int maxLines,
                                               HighlightFactory hlFactory)
        This constructor will create a text field from an single AttributedString. The string will be word wrapped.
        Parameters:
        textElement - the AttributedString 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
    • Method Detail

      • dataToScreenLocation

        public RowColLocation dataToScreenLocation​(int index,
                                                   int offset)
        Finds the corresponding row, column for string index, and offset
        Specified by:
        dataToScreenLocation in interface TextField
        Overrides:
        dataToScreenLocation in class VerticalLayoutTextField
        Parameters:
        index - index into the string array
        offset - offset into the indexed string.
        Returns:
        row and column in the screen coordinate system.