|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.component.table.RichList
public class RichList
The RichList class provides an API that makes it more convenient to access the Table API Model-View-Controller structure to make a patterned list of Bitmaps and Strings. Consider the RichList as a structure containing data formatted in a certain way. The RichList can have add, delete, insert and set operations on its data.
Constructor Summary | ||
---|---|---|
RichList(Manager manager,
boolean imageSpaceUsed,
int numberOfLabelFields,
int numberOfDescriptionFields)
Creates a RichList instance and adds the relevant material to a provided manager. |
Method Summary | ||
---|---|---|
void |
add(Object[] data)
Adds an array of data to the bottom of the RichList. |
|
Object[] |
get(int rowIndex)
Retrieves the contents of a specific row in the RichList. |
|
void |
insert(int rowIndex,
Object[] data)
Adds an array of data at a particular position in the RichList. |
|
void |
remove(int rowIndex)
Removes the contents of a specific row in the RichList and removes them from the screen as well. |
|
void |
set(int rowIndex,
int objectIndex,
Object data)
Overwrites an object stored at a specified row index and column index in the RichList with a new object and updates the screen with this information as well. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RichList(Manager manager, boolean imageSpaceUsed, int numberOfLabelFields, int numberOfDescriptionFields)
manager
- The Manager object that will hold the contents of a RichListimageSpaceUsed
- If set to true, there will be an "Image Space" in the top left corner of
every row of data reserved for an image with a size of 50 pixels by 50 pixels.numberOfLabelFields
- The number of text objects that should be put on the right side of
the image, as part of the "Labels Space". If an image is not used, the "Label Space" is aligned to the left side of the allowed space.numberOfDescriptionFields
- the number of text objects that should be put below the image
and the labels, as part of the "Descriptions Space". If an image is not used, these will be below the "Label Space".
IllegalArgumentException
- if the manager provided to the constructor is null or if numberOfLabelFields or numberOfDescriptionFields
are negative values.Method Detail |
---|
public void add(Object[] data)
data
- An array of objects that will be added to the RichList and subsequently
displayed on the screen.
IllegalArgumentException
- if the array provided is logically inconsistent with
the rest of the data stored or contains something other than Strings, Bitmaps or Fields.public void remove(int rowIndex)
rowIndex
- The row index of the RichList row whose contents must be removed.
IndexOutOfBoundsException
- if the index is below 0 or above the number of rows stored.public Object[] get(int rowIndex)
rowIndex
- The row index of the RichList row whose contents must be retrieved.
IndexOutOfBoundsException
- if the index is below 0 or above the number of rows stored.public void set(int rowIndex, int objectIndex, Object data)
rowIndex
- The index of the RichList row that contains the data to be overridden.objectIndex
- The logical index of the object to be overridden within a RichList row.
This follows the ordering of the objects in the array that was passed earlier via the @see RichList#add calldata
- Either a String, a Bitmap or a Field object that will take the place of
the old object that is being overridden.
IllegalArgumentException
- if the data provided is not a String, a Bitmap or a Fieldpublic void insert(int rowIndex, Object[] data)
rowIndex
- The index of the RichList row where the new information will be inserted.data
- An array of objects that will be added to the RichList and subsequently
displayed on the screen.
IllegalArgumentException
- if the array provided is logically inconsistent with
the rest of the data stored or contains something other than Strings, Bitmaps or Fields.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.