|
|||||||||
| 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.SimpleList
public class SimpleList
The SimpleList class provides an API that makes it more convenient to access the Table API Model-View-Controller structure to make a list of Strings, one on top of the other. The SimpleList can have add, delete and set operations on its data.
| Constructor Summary | ||
|---|---|---|
SimpleList(Manager manager)
Creates a SimpleList instance and adds the relevant material to a provided manager. |
||
| Method Summary | ||
|---|---|---|
void |
add(String data)
Adds a String of data to the bottom of the SimpleList and updates the screen accordingly. |
|
void |
add(String data,
int index)
Adds a String of data at a specific position in the SimpleList and updates the screen accordingly. |
|
String |
get(int index)
Retrieves a String stored at a specific position in the SimpleList. |
|
int |
getFocusRow()
Get the row number that has focus. |
|
void |
remove(int index)
Removes a String of data at a specific position in the SimpleList and updates the screen accordingly. |
|
void |
set(int index,
String data)
Overwrites a String stored a specific position in the SimpleList with a given String. |
|
void |
setCommand(CommandHandler command,
ReadOnlyCommandMetadata metadata,
Object context)
Set the command that will be executed when a row in a SimpleList field clicked on. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleList(Manager manager)
manager - The Manager object that will hold the contents of a SimpleList| Method Detail |
|---|
public void add(String data)
data - A String that will be added to the bottom of the list.
IllegalArgumentException - if a null value is provided instead of a valid string.
Note: An empty String is considered a valid argument.
public void add(String data,
int index)
data - A String to be added to the list.index - An integer specifying the row at which the new String should be inserted.
IllegalArgumentException - if a null value is provided instead of a valid string or if the index provided
is either less than zero or greater than the current TableModel size.
Note: An empty String is considered a valid argument.public void remove(int index)
index - An integer specifying the row position of the String that is to be removed.
IllegalArgumentException - if the index provided is not a valid row in the TableModelpublic String get(int index)
index - An integer specifying the row position of the String that is to be retrieved.
IllegalArgumentException - if the index provided is not a valid row in the TableModel
public void set(int index,
String data)
index - An integer specifying the row position of the String that is to be retrieved.data - A String object that will replace the existing one.
IllegalArgumentException - if the index provided is not a valid row in the TableModel
public void setCommand(CommandHandler command,
ReadOnlyCommandMetadata metadata,
Object context)
command - The command to execute when a row is clicked.metadata - The metadata that goes with the provided command.context - The context object that goes with the provided command.public int getFocusRow()
|
|||||||||
| 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.