Top Description Inners Fields Constructors Methods
org.eclipse.swt.custom

pack-priv Class StyledTextRenderer

extends Object
Class Inheritance
Imports
java.util.*, .List, org.eclipse.swt.*, org.eclipse.swt.graphics.*, org.eclipse.swt.widgets.*

A StyledTextRenderer renders the content of a StyledText widget. This class can be used to render to the display or to a printer.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record
pack-priv static class
pack-priv static class
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv int
pack-priv int
pack-priv float
pack-priv static final int
pack-priv Font
pack-priv Font
pack-priv static final int
pack-priv Bullet[]
pack-priv int[]
pack-priv static final int
pack-priv static final boolean
pack-priv StyledTextContent
pack-priv int
pack-priv Device
private FontMetrics
pack-priv boolean
pack-priv static final int
pack-priv boolean
pack-priv static final int
pack-priv boolean
pack-priv static final int
pack-priv Font
pack-priv static final int
pack-priv TextLayout[]
pack-priv int
pack-priv StyledTextRenderer.LineInfo[]
pack-priv int
pack-priv StyledTextRenderer.LineSizeInfo[]
pack-priv boolean
pack-priv StyledTextLineSpacingProvider
pack-priv int
pack-priv int
pack-priv static final boolean
pack-priv int[]
pack-priv int[]
pack-priv Font
pack-priv static final int
pack-priv static final int
pack-priv int
pack-priv StyledText
pack-priv StyleRange[]
pack-priv StyleRange[]
pack-priv int
pack-priv int
pack-priv static final int
pack-priv int
pack-priv int
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv
StyledTextRenderer(Device device, StyledText styledText)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
addMerge(int[] mergeRanges, StyleRange[] mergeStyles, int mergeCount, int modifyStart, int modifyEnd)

pack-priv int
addMerge(StyleRange[] mergeStyles, int mergeCount, int modifyStart, int modifyEnd)

pack-priv void
calculate(int startLine, int lineCount)

pack-priv void
pack-priv void
pack-priv static int
cap(TextLayout layout, int offset)

pack-priv void
clearLineBackground(int startLine, int count)

pack-priv void
clearLineStyle(int startLine, int count)

pack-priv void
pack-priv void
pack-priv void
pack-priv void
drawBullet(Bullet bullet, GC gc, int paintX, int paintY, int index, int lineAscent, int lineDescent)

private void
drawLineBackground(StyledTextRenderer.LineDrawInfo lineInfo, int paintY, GC gc, Color widgetBackground)

private void
drawLineForeground(StyledTextRenderer.LineDrawInfo lineInfo, int paintX, int paintY, GC gc, Color widgetForeground)

pack-priv int
drawLines(int startLine, int endLine, int begX, int begY, int endY, GC gc, Color widgetBackground, Color widgetForeground)

pack-priv int
pack-priv int
getCachedLineHeight(int lineIndex)

pack-priv Font
getFont(int style)

pack-priv FontData[]
getFontData(int style)

pack-priv int
pack-priv int
getLineAlignment(int index, int defaultAlignment)

pack-priv Color
getLineBackground(int index, Color defaultBackground)

pack-priv Bullet
getLineBullet(int index, Bullet defaultBullet)

pack-priv int
pack-priv int
getLineHeight(int lineIndex)

pack-priv int
getLineHeight(int lineIndex, boolean exact)

pack-priv int
getLineIndent(int index, int defaultIndent)

pack-priv boolean
getLineJustify(int index, boolean defaultJustify)

pack-priv StyledTextRenderer.LineSizeInfo
getLineSize(int i)

private int

Returns:

true if the given line index defines custom line spacing and false otherwise.
getLineSpacing
(int
the line index.
lineIndex
)

returns true if the given line index defines custom line spacing and false otherwise.

pack-priv StyledTextLineSpacingProvider
pack-priv int[]
getLineTabStops(int index, int[] defaultTabStops)

pack-priv int
pack-priv int
getLineWrapIndent(int index, int defaultWrapIndent)

pack-priv int
getRangeIndex(int offset, int low, int high)

pack-priv int[]
getRanges(int start, int length)

pack-priv StyleRange
pack-priv StyleRange[]
getStyleRanges(int start, int length, boolean includeRanges)

private StyleRange[]

Returns:

styles range for the given line index and null otherwise.
getStylesForLine
(int
the line index.
lineIndex
)

Returns styles range for the given line index and null otherwise.

pack-priv TextLayout
getTextLayout(int lineIndex)

pack-priv TextLayout
getTextLayout(int lineIndex, int orientation, int width, int lineSpacing)

pack-priv int
public boolean
private Point[]
intersectingRelativeNonEmptySelections(int fromOffset, int toOffset)

pack-priv boolean
isSameLineSpacing(int lineIndex, int newLineSpacing)

private boolean

Returns:

true if the given line can use the default line height and false otherwise.
isVariableHeight
(int
line index
lineIndex
)

Returns true if the given line can use the default line height and false otherwise.

private StyledTextRenderer.LineDrawInfo
makeLineDrawInfo(int lineIndex)

Caches draw-related info that may be expensive to calculate twice when drawing first background and then foreground.

pack-priv void
pack-priv void
reset(int startLine, int lineCount)

pack-priv void
reset(Set<Integer> lines)

pack-priv void
public void
pack-priv void
setFont(Font font, int tabs)

pack-priv void
setLineAlignment(int startLine, int count, int alignment)

pack-priv void
setLineBackground(int startLine, int count, Color background)

pack-priv void
setLineBullet(int startLine, int count, Bullet bullet)

pack-priv void
setLineIndent(int startLine, int count, int indent)

pack-priv void
setLineJustify(int startLine, int count, boolean justify)

pack-priv void
setLineSegmentChars(int startLine, int count, char[] segmentChars)

pack-priv void
setLineSegments(int startLine, int count, int[] segments)

pack-priv void
pack-priv void
setLineTabStops(int startLine, int count, int[] tabStops)

pack-priv void
setLineVerticalIndent(int lineIndex, int verticalLineIndent)

pack-priv void
setLineWrapIndent(int startLine, int count, int wrapIndent)

pack-priv void
setStyleRanges(int[] newRanges, StyleRange[] newStyles)

pack-priv void
pack-priv void
updateBullets(int startLine, int replaceLineCount, int newLineCount, boolean update)

pack-priv void
updateRanges(int start, int replaceCharCount, int newCharCount)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait