|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.Boxed
org.gnu.gtk.TextIter
org.gnome.gtk.TextIter
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.
public class TextIter
The Text Editor objects are discussed in detail in the TextView
widget overview.
Method Summary | |
---|---|
boolean |
beginsTag(TextTag tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
cmp(TextIter other)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
endsTag(TextTag tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
equals(TextIter other)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getAttributes(TextAttributes values)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
TextBuffer |
getBuffer()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getCanInsert(boolean defaultSetting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
char |
getChar()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
getCharsInLine()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
TextChildAnchor |
getChildAnchor()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getEditable(boolean defaultSetting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getEndsLine()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getEndsSentence()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getEndsWord()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getInsideSentence()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getInsideWord()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getIsCursorPosition()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getIsEndIter()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getIsStartIter()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
Language |
getLanguage()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
getLineNumber()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
getLineOffset()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
getOffset()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
Pixbuf |
getPixbuf()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getStartsLine()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getStartsSentence()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
getStartsWord()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
int |
getVisibleLineOffset()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
hasTag(TextTag tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
inRange(TextIter start,
TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
isChildAnchor()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
isPixbuf()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardChar()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardChar(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardCursorPosition()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardCursorPosition(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardLine()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardLine(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardSentenceStart()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardSentenceStart(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardToggle(TextTag tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardWordStart()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveBackwardWordStart(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardChar()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardChar(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardCursorPosition()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardCursorPosition(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardLine()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardLine(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardSentenceEnd()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardSentenceEnd(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardToggle(TextTag tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardWordEnd()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveForwardWordEnd(int count)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
void |
moveToEnd()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
moveToLineEnd()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
searchBackward(java.lang.String str,
TextSearchFlags flags,
TextIter matchStart,
TextIter matchEnd,
TextIter limit)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
boolean |
searchForward(java.lang.String str,
TextSearchFlags flags,
TextIter matchStart,
TextIter matchEnd,
TextIter limit)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
void |
setCharOffset(int charOffset)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
void |
setLine(int lineNumber)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
void |
setLineOffset(int charOnLine)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
void |
setVisibleLineOffset(int charOnLine)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries. |
Methods inherited from class org.gnu.glib.Boxed |
---|
equals, getBoxedFromHandle, hashCode |
Methods inherited from class org.gnu.glib.Struct |
---|
getHandle, getNullHandle |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public TextBuffer getBuffer()
public int getOffset()
public int getLineNumber()
public int getLineOffset()
public int getVisibleLineOffset()
public char getChar()
public Pixbuf getPixbuf()
null
is returned.
public boolean isPixbuf()
public TextChildAnchor getChildAnchor()
null
is returned.
public boolean isChildAnchor()
public boolean beginsTag(TextTag tag)
hasTag(TextTag)
tells you whether an iterator is within a tagged range.
tag
- A TextTag
public boolean endsTag(TextTag tag)
hasTag(TextTag)
tells you whether an iterator is within a tagged range.
tag
- A TextTag
public boolean hasTag(TextTag tag)
public boolean getEditable(boolean defaultSetting)
defaultSetting
will be returned.
You don't want to use this function to decide whether text can be
inserted at iter, because for insertion you don't want to know whether
the char at iter is inside an editable range, you want to know whether a
new character inserted at iter would be inside an editable range. Use
getCanInsert(boolean)
to handle this case.
defaultSetting
- TRUE if text is editable by default
public boolean getCanInsert(boolean defaultSetting)
defaultSetting
- TRUE if text is editable by default
public boolean getStartsWord()
public boolean getEndsWord()
public boolean getInsideWord()
public boolean getStartsLine()
getLineOffset()
would return 0. However this function is potentially more efficient than
getLineOffset()
because it doesn't have to compute the offset,
it just has to see whether it's 0.
public boolean getEndsLine()
public boolean getStartsSentence()
public boolean getEndsSentence()
public boolean getInsideSentence()
public boolean getIsCursorPosition()
public int getCharsInLine()
public boolean getAttributes(TextAttributes values)
TextView.getDefaultAttributes()
.
This will modify values, applying the effects of any tags present at iter. If any tags affected values, the function returns TRUE.
values
- A TextAttributes to be filled in
public Language getLanguage()
public boolean getIsEndIter()
public boolean getIsStartIter()
public boolean moveForwardChar()
public boolean moveBackwardChar()
public boolean moveForwardChar(int count)
count
- Number of characters to move, may be negative
public boolean moveBackwardChar(int count)
count
- Number of characters to move
public boolean moveForwardLine()
public boolean moveBackwardLine()
public boolean moveForwardLine(int count)
public boolean moveBackwardLine(int count)
public boolean moveForwardWordEnd(int count)
moveForwardWordEnd()
up to count
times.
public boolean moveBackwardWordStart(int count)
moveBackwardWordStart()
up to count
times.
public boolean moveForwardWordEnd()
public boolean moveBackwardWordStart()
public boolean moveForwardCursorPosition()
public boolean moveBackwardCursorPosition()
moveForwardCursorPosition()
, but moves backward.
public boolean moveForwardCursorPosition(int count)
moveForwardCursorPosition()
for details.
public boolean moveBackwardCursorPosition(int count)
moveBackwardCursorPosition()
for details.
public boolean moveBackwardSentenceStart()
public boolean moveBackwardSentenceStart(int count)
moveBackwardSentenceStart()
up to count
times, or until it returns FALSE. If count is negative, moves forward
instead of backward.
public boolean moveForwardSentenceEnd()
public boolean moveForwardSentenceEnd(int count)
moveForwardSentenceEnd()
count
times (or
until it returns FALSE). If count is negative, moves backward instead of
forward.
public void setCharOffset(int charOffset)
charOffset
. The charOffset counts
from the start of the entire text buffer, starting with 0.
public void setLine(int lineNumber)
lineNumber
.
If lineNumber is negative or larger than the number of lines in the
buffer, moves iter to the start of the last line in the buffer.
public void setLineOffset(int charOnLine)
public void setVisibleLineOffset(int charOnLine)
setLineOffset(int)
, but the offset is in visible
characters, ie text with a tag making it invisible is not counted in the
offset.
public void moveToEnd()
getChar()
called on the end
iterator returns 0, which is convenient for writing loops.
public boolean moveToLineEnd()
public boolean moveForwardToggle(TextTag tag)
tag
. If no matching tag toggles are found, returns FALSE,
otherwise TRUE. Does not return toggles located at iter, only toggles
after iter. Sets iter to the location of the toggle, or to the end of the
buffer if no toggle is found.
public boolean moveBackwardToggle(TextTag tag)
tag
. If no matching tag toggles are found, returns FALSE,
otherwise TRUE. Does not return toggles located at iter, only toggles
before iter. Sets iter to the location of the toggle, or the start of the
buffer if no toggle is found.
public boolean searchForward(java.lang.String str, TextSearchFlags flags, TextIter matchStart, TextIter matchEnd, TextIter limit)
str
. Any match is returned by
setting matchStart
to the first character of the match and
matchEnd
to the first character after the match. The
search will not continue past limit. Note that a search is a linear or
O(n) operation, so you may wish to use limit to avoid locking up your UI
on large buffers.
If the TextSearchFlags.VISIBLE flag is present, the match may have invisible text interspersed in str. i.e. str will be a possibly-noncontiguous subsequence of the matched range. similarly, if you specify TextSeachFlags.ONLY, the match may have pixbufs or child widgets mixed inside the matched range. If these flags are not given, the match must be exact; the special 0xFFFC character in str will match embedded pixbufs or child widgets.
str
- A search stringflags
- Flags affecting how the search is donematchStart
- Return location for start of matchmatchEnd
- Return location for end of matchlimit
- Bound for the searchof the buffer
public boolean searchBackward(java.lang.String str, TextSearchFlags flags, TextIter matchStart, TextIter matchEnd, TextIter limit)
searchForward(String, TextSearchFlags, TextIter ,
TextIter , TextIter)
, but moves backward.
str
- A search stringflags
- Flags affecting how the search is donematchStart
- Return location for start of matchmatchEnd
- Return location for end of matchlimit
- Bound for the searchof the buffer
public boolean equals(TextIter other)
other
- Iterator to test
public int cmp(TextIter other)
other
- Iterator to test
public boolean inRange(TextIter start, TextIter end)
start
- Start of rangeend
- End of range
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |