|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
example.http.PushExample
public class PushExample
An example MIDlet to fetch a page using an HttpConnection. Refer to the startApp, pauseApp, and destroyApp methods so see how it handles each requested transition.
Field Summary | |
---|---|
(package private) javax.microedition.lcdui.Alert |
alert
user interface alert component. |
(package private) static int |
DefaultTimeout
|
(package private) javax.microedition.lcdui.Display |
display
current display. |
(package private) javax.microedition.lcdui.Command |
exitCommand
user interface command for indicating Exit request. |
(package private) boolean |
imageLoaded
|
(package private) javax.microedition.lcdui.Image |
newsHoundImage
|
(package private) java.lang.String |
url
current requested url. |
(package private) javax.microedition.lcdui.List |
urlList
user interface component containing a list of URLs |
(package private) java.util.Vector |
urls
array of current URLs |
Constructor Summary | |
---|---|
PushExample()
initialize the MIDlet with the current display object. |
Method Summary | |
---|---|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable s)
Respond to commands, including exit |
void |
destroyApp(boolean unconditional)
Destroy must cleanup everything. |
void |
pauseApp()
Pause signals the thread to stop by clearing the thread field. |
(package private) void |
setupList()
Check the attributes in the descriptor that identify url's and titles and initialize the lists of urls and urlList. |
void |
startApp()
Start creates the thread to do the timing. |
Methods inherited from class javax.microedition.midlet.MIDlet |
---|
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int DefaultTimeout
javax.microedition.lcdui.Command exitCommand
javax.microedition.lcdui.List urlList
java.util.Vector urls
javax.microedition.lcdui.Alert alert
javax.microedition.lcdui.Image newsHoundImage
boolean imageLoaded
javax.microedition.lcdui.Display display
java.lang.String url
Constructor Detail |
---|
public PushExample()
Method Detail |
---|
public void startApp()
startApp
in class javax.microedition.midlet.MIDlet
public void pauseApp()
pauseApp
in class javax.microedition.midlet.MIDlet
public void destroyApp(boolean unconditional)
destroyApp
in class javax.microedition.midlet.MIDlet
unconditional
- true if a forced shutdown was requestedvoid setupList()
The attributes are named "ViewTitle-n" and "ViewURL-n". The value "n" must start at "1" and increment by 1.
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- user interface command requesteds
- screen object initiating the request
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |