|
|||||||||
| 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
net.rim.device.api.lcdui.BlackBerryForm
public class BlackBerryForm
The BlackBerryForm class extends the functionality of the Form class.
The BlackBerryForm class implements Controllable and can be queried
to retrieve BlackBerry-specific Controls. For instance, on devices which support a virtual keyboard,
BlackBerryForm.getControl(String) can be queried to return a VirtualKeyboardControl
object.
| Constructor Summary | ||
|---|---|---|
BlackBerryForm(String title)
Creates a new instance of a BlackBerryForm. |
||
BlackBerryForm(String title,
Item[] items)
Creates a new instance of a BlackBerryForm |
||
| Method Summary | ||
|---|---|---|
Control |
getControl(String controlType)
Obtain the object that implements the specified Control interface. |
|
Control[] |
getControls()
Obtain the collection of Controls
from the object that implements this interface. |
|
| 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, setCommandListener, setTicker, setTitle, sizeChanged |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlackBerryForm(String title)
Form.Form(String)
public BlackBerryForm(String title,
Item[] items)
IllegalStateException - if one of the items is already owned by
another container
NullPointerException - if an element of the items array is nullForm.Form(String, Item[])| Method Detail |
|---|
public Control[] getControls()
ControllableControls
from the object that implements this interface.
Since a single object can implement multiple
Control interfaces, it's necessary
to check each object against different Control
types. For example:
Controllable controllable;
:
Control cs[];
cs = controllable.getControls();
for (int i = 0; i < cs.length; i++) {
if (cs[i] instanceof ControlTypeA)
doSomethingA();
if (cs[i] instanceof ControlTypeB)
doSomethingB();
// etc.
}
The list of Control objects returned
will not contain any duplicates. And the list will not
change over time.
If no Control is supported, a zero length
array is returned.
getControls in interface ControllableControl objects.Controllable.getControls()public Control getControl(String controlType)
ControllableControl interface.
If the specified Control interface is not supported
then null is returned.
If the Controllable supports multiple objects that
implement the same specified Control interface, only
one of them will be returned. To obtain all the
Control's of that type, use the getControls
method and check the list for the requested type.
getControl in interface ControllablecontrolType - the class name of the Control.
The class name
should be given either as the fully-qualified name of the class;
or if the package of the class is not given, the package
javax.microedition.media.control is assumed.
null.
IllegalArgumentException - Thrown if controlType
is null.Controllable.getControl(String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal