|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.text.BreakIterator
public final class BreakIterator
| Field Summary | ||
|---|---|---|
static int |
ALLOW_LINE_BREAK_ON_NON_BREAK_SPACE
This flag modifies the LINE_ITERATOR_TYPE break iterator. |
|
static int |
CHARACTER_ITERATOR_TYPE
Use an iterator that finds grapheme cluster boundaries. |
|
static int |
DONE
This value is returned by any of the break iterator methods when the BreakIterator object has reached the start or end of the text, or if invalid offsets are used. |
|
static int |
LINE_BREAK_CJK_AS_ALPHABETIC
This flag modifies the LINE_ITERATOR_TYPE break iterator. |
|
static int |
LINE_ITERATOR_TYPE
Use an iterator that finds possible line breaks. |
|
static int |
SENTENCE_ITERATOR_TYPE
Use an iterator that finds sentence boundaries. |
|
static int |
WORD_BREAK_FULL_STOP_AS_NON_WORD
This flag modifies the WORD_ITERATOR_TYPE break iterator. |
|
static int |
WORD_BREAK_HYPHEN_AS_MIDLETTER
This flag modifies the WORD_ITERATOR_TYPE break iterator. |
|
static int |
WORD_ITERATOR_TYPE
Use an iterator that finds word boundaries. |
|
| Method Summary | ||
|---|---|---|
static BreakIterator |
createInstance(int aType)
Creates a BreakIterator object with default behaviour. |
|
static BreakIterator |
createInstance(int aType,
int aFlags)
Creates a BreakIterator object. |
|
int |
first()
|
|
int |
following(int aPos)
Method searches for the first boundary following the specified offset. |
|
int |
getIteratorBreakingType()
Method returns break iterator type for this Breakiterator object |
|
int |
last()
|
|
int |
next()
Method searches for the boundary following to the current boundary. |
|
int |
next(int aCount)
Method searches for the boundary following the aCount of boundaries from the current position. |
|
int |
preceding(int aPos)
Method searches for the last boundary preceding the specfied offset. |
|
int |
previous()
Method searches for the boundary preceding the current boundary. |
|
int |
previous(int aCount)
Method searches for the boundary preceding the aCount of boundaries from the current position. |
|
void |
setText(char[] aString)
Sets text data as char array for this break iterator. |
|
void |
setText(char[] aString,
int aOffset,
int aLength)
Sets text data as StringBuffer for this break iterator. |
|
void |
setText(String aString)
Sets text data as String for this break iterator. |
|
void |
setText(String aString,
int aOffset,
int aLength)
Sets text data as String for this break iterator. |
|
void |
setText(StringBuffer aString)
Sets text data as StringBuffer for this break iterator. |
|
void |
setText(StringBuffer aString,
int aOffset,
int aLength)
Sets text data as StringBuffer for this break iterator. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CHARACTER_ITERATOR_TYPE
public static final int WORD_ITERATOR_TYPE
public static final int LINE_ITERATOR_TYPE
public static final int SENTENCE_ITERATOR_TYPE
public static final int ALLOW_LINE_BREAK_ON_NON_BREAK_SPACE
public static final int LINE_BREAK_CJK_AS_ALPHABETIC
public static final int WORD_BREAK_HYPHEN_AS_MIDLETTER
public static final int WORD_BREAK_FULL_STOP_AS_NON_WORD
public static final int DONE
| Method Detail |
|---|
public static BreakIterator createInstance(int aType,
int aFlags)
aType - is the iterator type.
It must be either CHARACTER_ITERATOR_TYPE, WORD_ITERATOR_TYPE, LINE_ITERATOR_TYPE or SENTENCE_ITERATOR_TYPE.aFlags - the flags used to modify the behaviour of the iterator; use the value 0 for standard behaviour.
public static BreakIterator createInstance(int aType)
aType - is the iterator type.
It must be either CHARACTER_ITERATOR_TYPE, WORD_ITERATOR_TYPE, LINE_ITERATOR_TYPE or SENTENCE_ITERATOR_TYPE.
public void setText(String aString)
strToBreak - Represents string data to be
analyzed by Break Iterator while looking for breaks.
public void setText(String aString,
int aOffset,
int aLength)
strToBreak - Represents string data to be
analyzed by Break Iterator while looking for breaks.aOffset - Offset from the startaLength - Number of character to process.public void setText(StringBuffer aString)
strToBreak - Represents StringBuffer data to be
analyzed by Break Iterator while looking for breaks.
public void setText(StringBuffer aString,
int aOffset,
int aLength)
strToBreak - Represents StringBuffer data to be
analyzed by Break Iterator while looking for breaks.aOffset - Offset from the startaLength - Number of character to process.public void setText(char[] aString)
strToBreak - Represents char array data to be
analyzed by Break Iterator while looking for breaks.
public void setText(char[] aString,
int aOffset,
int aLength)
strToBreak - Represents StringBuffer data to be
analyzed by Break Iterator while looking for breaks.aOffset - Offset from the startaLength - Number of character to process.public int getIteratorBreakingType()
public int first()
public int last()
public int following(int aPos)
aPos - Offset to start search from.
public int preceding(int aPos)
aPos - Offset to start search from.
public int next()
public int next(int aCount)
aCount - Number of break points to skip before valid break is returned.
public int previous()
public int previous(int aCount)
aCount - Number of break points to skip before valid break is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal