|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.ui.component.ActiveRichTextField.RegionQueue
Collects the arrays of regions and fonts common to rich-text fields.
| Field Summary | ||
byte[] |
attributes
Text attributes for regions. |
|
int[] |
backgroundColors
Background colours for regions. |
|
long[] |
cookieID
Cookie IDs for regions. |
|
Font[] |
fonts
Text font faces for regions. |
|
int[] |
foregroundColors
Foreground colours for regions. |
|
int[] |
offsets
Text positioning offests. |
|
| Constructor Summary | ||
ActiveRichTextField.RegionQueue(int initMaxRegions,
int initMaxFonts)
Creates a new RegionQueue instance for the specified string. |
||
| Method Summary | ||
byte |
appendFont(Font font)
Adds a new font into the master table. |
|
byte |
appendFont(Font font,
int foregroundColor,
int backgroundColor)
Adds a new font into the master table. |
|
boolean |
appendRegion(int offset,
byte attribute,
long id)
Appends a region into the table set. |
|
protected void |
resizeBuffers(int newCapacity)
Resizes all buffers to accomodate a new maximum size. |
|
void |
trim()
Trims arrays in preparation for passing to a rich-text field |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
| Constructor Detail |
public ActiveRichTextField.RegionQueue(int initMaxRegions,
int initMaxFonts)
initMaxRegions - Initial size of region arrayinitMaxFonts - Initial size of font array| Method Detail |
public final void trim()
public final byte appendFont(Font font)
font - Font to add; if null, add the system default font.public final byte appendFont(Font font, int foregroundColor, int backgroundColor)
font - Font add; if null, add the system default font.foregroundColor - Color to use when drawing the foreground.backgroundColor - Color to use when drawing the background.protected void resizeBuffers(int newCapacity)
This method is used to expand the buffers beyond current maximum, and also to trim the buffers down to the exact size utilized.
Subclasses that override this method must not set _maxregions.
newCapacity - New total number of regions allocated.
public boolean appendRegion(int offset,
byte attribute,
long id)
If the offset parameter is not strictly greater than the previous region offset then the method call will have no effect.
Subclasses that overload this method must call this method first so that any region resizing can be achieved. On return from this method, the number of regions has been updated, so the calling methods must set their table information at an index equal to one less than the number of regions.
offset - The non-inclusive character offset marking the end of
this region.attribute - The font ID returned by appendFont(net.rim.device.api.ui.Font).id - Optional cookie object associated with this region.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.