|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QTextBoundaryFinder
public class QTextBoundaryFinder
The QTextBoundaryFinder
class provides a way of finding Unicode text boundaries in a string. QTextBoundaryFinder
allows to find Unicode text boundaries in a string, similar to the Unicode text boundary specification (see http://www.unicode.org/reports/tr29/tr29-11.html).
QTextBoundaryFinder
can operate on a QString in four possible modes depending on the value of BoundaryType.
Units of Unicode characters that make up what the user thinks of as a character or basic unit of the language are here called Grapheme clusters. The two unicode characters 'A' + diaeresis do for example form one grapheme cluster as the user thinks of them as one character, yet it is in this case represented by two unicode code points.
Word boundaries are there to locate the start and end of what a language considers to be a word.
Line break boundaries give possible places where a line break might happen and sentence boundaries will show the beginning and end of whole sentences.
Nested Class Summary | |
---|---|
static class |
QTextBoundaryFinder.BoundaryReason
|
static class |
QTextBoundaryFinder.BoundaryReasons
This is a flags class for com.trolltech.qt.core.QTextBoundaryFinder.BoundaryReason |
static class |
QTextBoundaryFinder.BoundaryType
|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QTextBoundaryFinder()
Constructs an invalid QTextBoundaryFinder object. |
|
QTextBoundaryFinder(QTextBoundaryFinder.BoundaryType type,
java.lang.String string)
Creates a QTextBoundaryFinder object of type operating on string. |
|
QTextBoundaryFinder(QTextBoundaryFinder other)
Copies the QTextBoundaryFinder object, other. |
Method Summary | |
---|---|
QTextBoundaryFinder.BoundaryReasons |
boundaryReasons()
Returns the reasons for the boundary finder to have chosen the current position as a boundary. |
QTextBoundaryFinder |
clone()
This method is reimplemented for internal reasons |
boolean |
isAtBoundary()
Returns true if the object's position() is currently at a valid text boundary. |
boolean |
isValid()
Returns true if the text boundary finder is valid; otherwise returns false. |
int |
position()
Returns the current position of the QTextBoundaryFinder . |
void |
setPosition(int position)
Sets the current position of the QTextBoundaryFinder to position. |
java.lang.String |
string()
Returns the string the QTextBoundaryFinder object operates on. |
void |
toEnd()
Moves the finder to the end of the string. |
int |
toNextBoundary()
Moves the QTextBoundaryFinder to the next boundary position and returns that position. |
int |
toPreviousBoundary()
Moves the QTextBoundaryFinder to the previous boundary position and returns that position. |
void |
toStart()
Moves the finder to the start of the string. |
QTextBoundaryFinder.BoundaryType |
type()
Returns the type of the QTextBoundaryFinder . |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QTextBoundaryFinder()
QTextBoundaryFinder
object.
public QTextBoundaryFinder(QTextBoundaryFinder.BoundaryType type, java.lang.String string)
QTextBoundaryFinder
object of type operating on string.
public QTextBoundaryFinder(QTextBoundaryFinder other)
QTextBoundaryFinder
object, other.
Method Detail |
---|
public final QTextBoundaryFinder.BoundaryReasons boundaryReasons()
public final boolean isAtBoundary()
position()
is currently at a valid text boundary.
public final boolean isValid()
QTextBoundaryFinder
is invalid.
public final int position()
QTextBoundaryFinder
. setPosition()
.
public final void setPosition(int position)
QTextBoundaryFinder
to position. If position is out of bounds it will get bound to the valid positions. position()
.
public final java.lang.String string()
QTextBoundaryFinder
object operates on.
public final void toEnd()
setPosition()
, and position()
.
public final int toNextBoundary()
QTextBoundaryFinder
to the next boundary position and returns that position. Returns -1 is there is no next boundary.
public final int toPreviousBoundary()
QTextBoundaryFinder
to the previous boundary position and returns that position. Returns -1 is there is no previous boundary.
public final void toStart()
setPosition()
, and position()
.
public final QTextBoundaryFinder.BoundaryType type()
QTextBoundaryFinder
.
public QTextBoundaryFinder clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |