|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.i18n.FieldPosition
public class FieldPosition
Used by Format
and its subclasses to identify fields in formatted
output.
You can use this class's functionality to determine where a certain field starts in the formatted String buffer, which you could then use to position a change box over a given field.
Compatible with java.text.FieldPosition from Java's standard edition.
Constructor Summary | ||
---|---|---|
FieldPosition(int field)
Constructs a new FieldPosition instance for a field. |
Method Summary | ||
---|---|---|
int |
getBeginIndex()
Retrieves position of first character in underlying field. |
|
int |
getEndIndex()
Retrieves position of last character in underlying field. |
|
int |
getField()
Retrieves underlying field's ID. |
|
void |
setBeginIndex(int beginindex)
Sets new first character mark. |
|
void |
setEndIndex(int endindex)
Sets new last character mark. |
|
void |
setField(int field)
Sets new underlying field. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldPosition(int field)
field
- Underlying field for this field position instance.Method Detail |
---|
public int getBeginIndex()
public int getEndIndex()
public int getField()
public void setField(int field)
Invoke this method to set a new underlying field for this position object; this can help you avoid instantiating unnecessary position objects.
field
- ID of new underlying field.public void setBeginIndex(int beginindex)
Invoke this method to specify the "first" character in the
underlying field. Once set, FieldPosition.getBeginIndex()
returns this value.
beginindex
- New first character mark for the underlying field.public void setEndIndex(int endindex)
Invoke this method to specify the "last" character in the
underlying field. Once set, FieldPosition.getEndIndex()
returns this value.
beginindex
- New last character mark for the underlying field.
|
|||||||||
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