|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.Form
example.text.Favorites
public class Favorites
A Form to handle a Favorites list. The favorites are saved and restored from a RecordStore.
Constructor Summary | |
---|---|
Favorites(java.lang.String title)
Construct a new Favorites Form. |
Method Summary | |
---|---|
void |
addFavorite(java.lang.String string,
java.lang.String url)
Add a new Hyperlink StringItem with the go and delete commands. |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable s)
Handle commands selected by the user. |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Item item)
Called for Commands on Items. |
java.lang.String |
getTitle(int index)
Get the title associated with the item. |
java.lang.String |
getTitle(javax.microedition.lcdui.Item item)
Get the title associated with the item. |
java.lang.String |
getURL(int index)
Get the url associated with the item. |
java.lang.String |
getURL(javax.microedition.lcdui.Item item)
Get the url associated with the item. |
void |
setCommandListener(javax.microedition.lcdui.CommandListener listener)
Interpose on the commandListener. |
void |
setItemCommandListener(javax.microedition.lcdui.ItemCommandListener itemListener)
Interpose on the itemCommandListener. |
Methods inherited from class javax.microedition.lcdui.Form |
---|
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
addCommand, getTicker, getTitle, isShown, removeCommand, setTicker, setTitle, sizeChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Favorites(java.lang.String title)
title
- the titleMethod Detail |
---|
public void setCommandListener(javax.microedition.lcdui.CommandListener listener)
setCommandListener
in class javax.microedition.lcdui.Displayable
listener
- the CommandListener the listener to interpose onpublic void setItemCommandListener(javax.microedition.lcdui.ItemCommandListener itemListener)
itemListener
- the ItemCommandListener to interpose onpublic void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- the commands
- the Displayablepublic void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Item item)
commandAction
in interface javax.microedition.lcdui.ItemCommandListener
c
- the Command invokeditem
- the item it was invoked onpublic void addFavorite(java.lang.String string, java.lang.String url)
string
- a string to add to the listurl
- of the resource to match the stringpublic java.lang.String getTitle(javax.microedition.lcdui.Item item)
item
- for which to get the title
public java.lang.String getURL(javax.microedition.lcdui.Item item)
item
- for which to get the URL
public java.lang.String getTitle(int index)
index
- for which to get the title
public java.lang.String getURL(int index)
index
- for which to get the URL
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |