|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--menu.Page | +--PropertyPage
A PropertyPage is used to display lists of properties whose values can be obtained using the System.getProperty(keyString) or midlet.getAppProperty(keyString) methods. The list of properties that the PropertyPage displays is controlled by information provided to the constructor.
If the midlet parameter is null, then the requested properties are considered to be system properties and System.getProperty is used. If midlet is not null, then midlet.getAppProperty is used.
A String[] can be provided containing the explicit names of the properties. In this case, the PropertyPage looks up the value for each property and then displays the name and the value.
Alternatively, the caller can provide a prefix String and a String array containing the suffixes. In this case, the PropertyPage builds the key strings itself using the format prefix[n]suffix. Given a prefix, it adds the string "1", then adds each of the suffixes in turn, and uses the result as a key string. Then n is incremented and the process is repeated until for some value of n, none of the possible keys have a value. Note that if you want hyphens before and after the "n", you need to put them in the prefix and suffix Strings, since they are NOT added automatically.
Constructor Summary | |
PropertyPage(java.lang.String label,
javax.microedition.midlet.MIDlet midlet,
java.lang.String[] names)
Initialize a new PropertyPage object using the supplied parameters and default values where needed. |
|
PropertyPage(java.lang.String label,
javax.microedition.midlet.MIDlet midlet,
java.lang.String prefix,
java.lang.String[] names)
Initialize a new PropertyPage object using the supplied parameters and default values where needed. |
|
PropertyPage(java.lang.String label,
java.lang.String title,
javax.microedition.lcdui.Image icon,
javax.microedition.midlet.MIDlet midlet,
java.lang.String prefix,
java.lang.String[] suffix)
Initialize a new PropertyPage object using the supplied parameters. |
Method Summary | |
int |
doCommandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
Process the user command and return an integer value telling the PageMgr what to do next. |
javax.microedition.lcdui.Displayable |
getDisplayable()
Return the Displayable object for this PropertyPage, completely filled in and ready to display. |
Methods inherited from class menu.Page |
getIcon, getLabel, getLinkedPage, getPrevious, getTitle, setPrevious |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertyPage(java.lang.String label, java.lang.String title, javax.microedition.lcdui.Image icon, javax.microedition.midlet.MIDlet midlet, java.lang.String prefix, java.lang.String[] suffix)
label
- short label for this page (as might be used in
a menu)title
- longer label for this page (as might be used in
a screen title)icon
- small icon for this page (as might be used in
a toolbar or menumidlet
- the midlet for which these properties are stored. If
null, then the properties are system properties. If not, then they
are application properties.prefix
- property name prefix String for generating a series
of property names. If prefix is null, then no names are
generated, they are just used directly from the array given
in the suffix parameter.suffix
- a String[] of property names or suffixes.public PropertyPage(java.lang.String label, javax.microedition.midlet.MIDlet midlet, java.lang.String prefix, java.lang.String[] names)
label
- short label for this page (as might be used in
a menu)midlet
- the midlet for which these properties are stored. If
null, then the properties are system properties. If not, then they
are application properties.prefix
- property name prefix String for generating a series
of property names. If prefix is null, then no names are
generated, they are just used directly from the array given
in the suffix parameter.public PropertyPage(java.lang.String label, javax.microedition.midlet.MIDlet midlet, java.lang.String[] names)
midlet
- the midlet for which these properties are stored. If
null, then the properties are system properties. If not, then they
are application properties.label
- short label for this page (as might be used in
a menu)names
- a String array containing the names of the
properties of interest.Method Detail |
public int doCommandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
doCommandAction
in class Page
c
- a Command object identifying the command.d
- the Displayable on which this event has occurred
public javax.microedition.lcdui.Displayable getDisplayable()
getDisplayable
in class Page
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |