StyledText.getRanges

Returns all the ranges of text that have an associated StyleRange. Returns an empty array if a LineStyleListener has been set. Should not be called if a LineStyleListener has been set since the listener maintains the styles. <p> The ranges array contains start and length pairs. Each pair refers to the corresponding style in the styles array. For example, the pair that starts at rangesn with length ranges[n+1] uses the style at styles[n/2] returned by <code>getStyleRanges(int, int, bool)</code>. </p>

@return the ranges or an empty array if a LineStyleListener has been set.

@exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

@since 3.2

@see #getStyleRanges(bool)

  1. int[] getRanges()
    class StyledText
    int[]
    getRanges
    (
    )
  2. int[] getRanges(int start, int length)

Meta