StyledText.getStyleRanges

Returns the styles for the given text range. <p> 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><p> Note: Because the StyleRange includes the start and length, the same instance cannot occur multiple times in the array of styles. If the same style attributes, such as font and color, occur in multiple StyleRanges, <code>getStyleRanges(int, int, bool)</code> can be used to get the styles without the ranges. </p> @param start the start offset of the style ranges to return @param length the number of style ranges to return

@return the styles or an empty array if a LineStyleListener has been set. The returned styles will reflect the given range. The first returned <code>StyleRange</code> will have a starting offset >= start and the last returned <code>StyleRange</code> will have an ending offset <= start + length - 1

@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> @exception IllegalArgumentException <ul> <li>ERROR_INVALID_RANGE when start and/or end are outside the widget content</li> </ul>

@see #getStyleRanges(int, int, bool)

@since 3.0

Meta