Class TextSpan


  • public final class TextSpan
    extends java.lang.Object
    Describes glyphs spans in a label.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int beginPosition
      The begin position in a label of this span, in glyph (i.e.
      int endPosition
      The end position in a label of this span, in glyph (i.e.
      @NotNull Style style
      The style associated with this span.
    • Constructor Summary

      Constructors 
      Constructor Description
      TextSpan​(int beginPosition, int endPosition, @NotNull Style style)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(@Nullable java.lang.Object obj)  
      int hashCode()  
      @NotNull java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • beginPosition

        public final int beginPosition
        The begin position in a label of this span, in glyph (i.e. grapheme cluster) count.
      • endPosition

        public final int endPosition
        The end position in a label of this span, in glyph (i.e. grapheme cluster) count.
      • style

        @NotNull
        public final @NotNull Style style
        The style associated with this span.
    • Constructor Detail

      • TextSpan

        public TextSpan​(int beginPosition,
                        int endPosition,
                        @NotNull
                        @NotNull Style style)
        Constructor.
        Parameters:
        beginPosition - begin index inside the span
        endPosition - end index inside the span
        style - the span style.
    • Method Detail

      • equals

        public boolean equals​(@Nullable
                              @Nullable java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        @NotNull
        public @NotNull java.lang.String toString()
        Overrides:
        toString in class java.lang.Object