Replaces the styles in the given range with new styles. This method
effectively deletes the styles in the given range and then adds the
the new styles.
<p>
Note: Because a 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>setStyleRanges(int, int, int[], StyleRange[])</code>
can be used to share styles and reduce memory usage.
</p><p>
Should not be called if a LineStyleListener has been set since the
listener maintains the styles.
</p>
@param start offset of first character where styles will be deleted
@param length length of the range to delete styles in
@param ranges StyleRange objects containing the new style information.
The ranges should not overlap and should be within the specified start
and length. The style rendering is undefined if the ranges do overlap
or are ill-defined. Must not be null.
@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 either start or end is outside the valid range (0 <= offset <= getCharCount())</li>
</ul>
Replaces the styles in the given range with new styles. This method effectively deletes the styles in the given range and then adds the the new styles. <p> Note: Because a 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>setStyleRanges(int, int, int[], StyleRange[])</code> can be used to share styles and reduce memory usage. </p><p> Should not be called if a LineStyleListener has been set since the listener maintains the styles. </p>
@param start offset of first character where styles will be deleted @param length length of the range to delete styles in @param ranges StyleRange objects containing the new style information. The ranges should not overlap and should be within the specified start and length. The style rendering is undefined if the ranges do overlap or are ill-defined. Must not be null. @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 either start or end is outside the valid range (0 <= offset <= getCharCount())</li> </ul>
@since 2.0
@see #setStyleRanges(int, int, int[], StyleRange[])