| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| private static final String | |
| pack-priv int[][] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv List | |
| pack-priv char[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addLineIndex(int
the start of the line start, int the length of the line length)Adds a line to the end of the line indexes array. |
| pack-priv int[][] | Returns: a new array of line indexesthe start of the line start, int the length of the line length, int[][] the array to which to add the line index linesArray, int the position at which to add the line count)Adds a line index to the end of |
| public void | addTextChangeListener(TextChangeListener
the listener listener)Implements org. TextChangeListener listening for
TextChangingEvent and TextChangedEvent.
|
| pack-priv void | adjustGap(int
the position at which a change is occurring position, int the size of the change sizeHint, int the line where the gap will go line)Adjusts the gap to accommodate a text change that is occurring. |
| pack-priv void | delete(int
the position at which the text to delete starts position, int the length of the text to delete length, int the number of lines that are being deleted numLines)Deletes text. |
| pack-priv void | |
| pack-priv void | expandLinesBy(int
the number to increase the array by numLines)Increases the line indexes array to accommodate more lines. |
| pack-priv boolean | Returns: true if gap exists, false otherwiseReturns whether or not a gap exists in the text store. |
| public int | Returns: the logical length of the text storeImplements org. |
| pack-priv String | Returns: the logical line text (i.e., without the gap) with delimitersthe index of the line to return index)Returns the line at the given index with delimiters. |
| public String | Returns: the logical line text (i.e., without the gap)the index of the line to return index)Implements org. index without delimiters.
|
| public int | Returns: the line indexlogical character offset (i.e., does not include gap) charPosition)Implements org. |
| pack-priv int | Returns: the line indexphysical character offset (i.e., includes gap) position)Returns the line index at the given physical offset. |
| public int | Returns: the number of lines in the text storeImplements org. |
| public String | Returns: the platform line delimiter as specified in the line.separator system property.Implements org. |
| public int | Returns: the logical starting offset of the line. When there are not any lines, getOffsetAtLine(0) is a valid call that should answer 0.index of line lineIndex)Implements org. |
| pack-priv String | Returns: the physical linethe line index index)Returns the physical line at the given index (i.e., with delimiters and the gap). |
| pack-priv String | Returns: the textthe physical start offset of the text to return start, int the physical length of the text to return length)Returns a string representing the continuous content of the text store. |
| public String | Returns: the textthe logical start offset of the text to return start, int the logical length of the text to return length)Implements org. |
| pack-priv void | |
| pack-priv int[][] | Returns: a line indexes array where each line is identified by a start offset and a lengththe logical start offset of the text lineate offset, int the length of the text to lineate, includes gap length, int the number of lines to initially allocate for the line index array,
passed in for efficiency (the exact number of lines may be known) numLines)Calculates the indexes of each line of text in the given range. |
| pack-priv void | |
| pack-priv boolean | Returns: true if ch is a delimiter, false otherwisethe character to test ch)Returns whether or not the given character is a line delimiter. |
| private boolean | |
| pack-priv int | Returns: number of linesthe start of the text to lineate startOffset, int the length of the text to lineate length)Returns the number of lines that are in the specified text. |
| pack-priv int | |
| pack-priv void | moveAndResizeGap(int
the position at which a change is occurring position, int the size of the change size, int the line where the gap should be put newGapLine)Moves the gap and adjusts its size in anticipation of a text change. |
| public void | removeTextChangeListener(TextChangeListener
the listener which should no longer be notified listener)Implements org. TextChangeListener.
|
| public void | replaceTextRange(int
start offset of text to replace start, int start offset of text to replace replaceLength, String start offset of text to replace newText)Implements org. newText starting at position start
for a length of replaceLength.
|
| pack-priv void | |
| public void | setText(String
the text text)Implements org. |
| private void | validateReplace(int
start offset of text to replace start, int start offset of text to replace replaceLength)Validates the replace operation. |
| expandExp | back to summary |
|---|---|
| pack-priv int expandExp | |
| gapEnd | back to summary |
|---|---|
| pack-priv int gapEnd | |
| gapLine | back to summary |
|---|---|
| pack-priv int gapLine | |
| gapStart | back to summary |
|---|---|
| pack-priv int gapStart | |
| highWatermark | back to summary |
|---|---|
| pack-priv int highWatermark | |
| lineCount | back to summary |
|---|---|
| pack-priv int lineCount | |
| LineDelimiter | back to summary |
|---|---|
| private static final String LineDelimiter | |
| lines | back to summary |
|---|---|
| pack-priv int[][] lines | |
| lowWatermark | back to summary |
|---|---|
| pack-priv int lowWatermark | |
| replaceExpandExp | back to summary |
|---|---|
| pack-priv int replaceExpandExp | |
| textListeners | back to summary |
|---|---|
| pack-priv List<StyledTextListener> textListeners | |
| textStore | back to summary |
|---|---|
| pack-priv char[] textStore | |
| DefaultContent | back to summary |
|---|---|
| pack-priv DefaultContent() Creates a new DefaultContent and initializes it. A | |
| addLineIndex | back to summary |
|---|---|
| pack-priv void addLineIndex(int start, int length) Adds a line to the end of the line indexes array. Increases the size of the array if necessary.
| |
| addLineIndex | back to summary |
|---|---|
| pack-priv int[][] addLineIndex(int start, int length, int[][] linesArray, int count) Adds a line index to the end of
| |
| addTextChangeListener | back to summary |
|---|---|
| public void addTextChangeListener(TextChangeListener listener) Implements org. Adds a
| |
| adjustGap | back to summary |
|---|---|
| pack-priv void adjustGap(int position, int sizeHint, int line) Adjusts the gap to accommodate a text change that is occurring.
| |
| delete | back to summary |
|---|---|
| pack-priv void delete(int position, int length, int numLines) Deletes text.
| |
| error | back to summary |
|---|---|
| pack-priv void error(int code) Reports an SWT error.
| |
| expandLinesBy | back to summary |
|---|---|
| pack-priv void expandLinesBy(int numLines) Increases the line indexes array to accommodate more lines.
| |
| gapExists | back to summary |
|---|---|
| pack-priv boolean gapExists() Returns whether or not a gap exists in the text store.
| |
| getCharCount | back to summary |
|---|---|
| public int getCharCount() Implements org. Doc from org. Return the number of characters in the content.
| |
| getFullLine | back to summary |
|---|---|
| pack-priv String getFullLine(int index) Returns the line at the given index with delimiters.
| |
| getLine | back to summary |
|---|---|
| public String getLine(int index) Implements org. Returns the line at
| |
| getLineAtOffset | back to summary |
|---|---|
| public int getLineAtOffset(int charPosition) Implements org. Returns the line at the given offset.
| |
| getLineAtPhysicalOffset | back to summary |
|---|---|
| pack-priv int getLineAtPhysicalOffset(int position) Returns the line index at the given physical offset.
| |
| getLineCount | back to summary |
|---|---|
| public int getLineCount() Implements org. Doc from org. Return the number of lines. Should answer 1 when no text is specified. The StyledText widget relies on this behavior for drawing the cursor.
| |
| getLineDelimiter | back to summary |
|---|---|
| public String getLineDelimiter() Implements org. Returns the line delimiter that should be used by the StyledText
widget when inserting new lines. This delimiter may be different than the
delimiter that is used by the
| |
| getOffsetAtLine | back to summary |
|---|---|
| public int getOffsetAtLine(int lineIndex) Implements org. Returns the logical offset of the given line.
| |
| getPhysicalLine | back to summary |
|---|---|
| pack-priv String getPhysicalLine(int index) Returns the physical line at the given index (i.e., with delimiters and the gap).
| |
| getPhysicalText | back to summary |
|---|---|
| pack-priv String getPhysicalText(int start, int length) Returns a string representing the continuous content of the text store.
| |
| getTextRange | back to summary |
|---|---|
| public String getTextRange(int start, int length) Implements org. Returns a string representing the logical content of the text store (i.e., gap stripped out).
| |
| indexLines | back to summary |
|---|---|
| pack-priv void indexLines() Calculates the indexes of each line in the text store. Assumes no gap exists. Optimized to do less checking. | |
| indexLines | back to summary |
|---|---|
| pack-priv int[][] indexLines(int offset, int length, int numLines) Calculates the indexes of each line of text in the given range.
| |
| insert | back to summary |
|---|---|
| pack-priv void insert(int position, String text) Inserts text.
| |
| isDelimiter | back to summary |
|---|---|
| pack-priv boolean isDelimiter(char ch) Returns whether or not the given character is a line delimiter. Both CR and LF are valid line delimiters.
| |
| isInsideCRLF | back to summary |
|---|---|
| private boolean isInsideCRLF(int pos) | |
| lineCount | back to summary |
|---|---|
| pack-priv int lineCount(int startOffset, int length) Returns the number of lines that are in the specified text.
| |
| lineCount | back to summary |
|---|---|
| pack-priv int lineCount(String text) Returns the number of lines that are in the specified text.
| |
| moveAndResizeGap | back to summary |
|---|---|
| pack-priv void moveAndResizeGap(int position, int size, int newGapLine) Moves the gap and adjusts its size in anticipation of a text change. The gap is resized to actual size + the specified size and moved to the given position.
| |
| removeTextChangeListener | back to summary |
|---|---|
| public void removeTextChangeListener(TextChangeListener listener) Implements org. Removes the specified
| |
| replaceTextRange | back to summary |
|---|---|
| public void replaceTextRange(int start, int replaceLength, String newText) Implements org. Replaces the text with
When sending the TextChangingEvent,
| |
| sendTextEvent | back to summary |
|---|---|
| pack-priv void sendTextEvent(StyledTextEvent event) Sends the text listeners the TextChanged event. | |
| setText | back to summary |
|---|---|
| public void setText(String text) Implements org. Sets the content to text and removes the gap since there are no sensible predictions about where the next change will occur.
| |
| validateReplace | back to summary |
|---|---|
| private void validateReplace(int start, int replaceLength) Validates the replace operation. DefaultContent will not allow the \r\n line delimiter to be split or partially deleted.
| |