|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Object
Component
Shell
public class Shell
Shell is a root of single user interface screen.
Shells are placed on stack which manipulated
by pushShell(Shell) and pushShell(Shell).
Popup is special case of Shell that is placed on window so that previous shell(s) on stack will be partly visible as well.
Popup| Constructor Summary | |
|---|---|
Shell(Component child)
Creates a new Shell with specified component as content. |
|
| Method Summary | |
|---|---|
void |
computeLayout()
Computes the actual position and dimensions of every component on the screen. |
Component |
focused()
Returns the currently focused component on shell. |
void |
setActionHandler(ActionCallback callback)
Sets the action callback for this Shell. |
void |
setFocused(Component focused)
Sets the focused component. |
void |
setFocused(Component focused,
boolean ensureVisibility)
Sets the focused component. |
void |
setKeyHandler(KeyCallback callback)
Sets the key callback for this Shell. |
void |
setMenuHandler(MenuCallback callback)
Sets the menu callback for this Shell. |
void |
setSoftKeyHandler(SoftKeyCallback callback)
Sets the soft key callback for this Shell. |
void |
updateMenu()
Updates SOFTKEY_OK, SOFTKEY_MIDDLE
and SOFTKEY_BACK
assosiations. |
| Methods inherited from class Component |
|---|
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size |
| Methods inherited from class Object |
|---|
toString, equals, hashCode |
| Methods inherited from |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Shell(Component child)
child - Content of shell| Method Detail |
|---|
public Component focused()
null
if no components are currently focusedpublic void setFocused(Component focused)
setFocused(focused, true).
focused - Component to receive focussetFocused(Component, boolean)
public void setFocused(Component focused,
boolean ensureVisibility)
focused - Component to receive focusensureVisibility - If true the system
will attempt to align enclosing Scrollable (if any)
so that component is visible. Setting this parameter
to false will prevent that behaviour, but
then the view port must be aligned manually.setFocused(Component)public void computeLayout()
Sometimes it is necessary to know the position or dimensions of Components before the Shell is made visible and this method is provided to serve that purpose. Computation is potentionally a slow operation and it should only be done when absolutely necessary.
public void setActionHandler(ActionCallback callback)
Script.actionPerformed(Shell, Component, int).
callback - Callback to use or null to
use the generic callbackpublic void setMenuHandler(MenuCallback callback)
Script.getMenu(Shell, Component).
callback - Callback to use or null to
use the generic callbackpublic void setSoftKeyHandler(SoftKeyCallback callback)
Script.getSoftKey(Shell, Component, int).
callback - Callback to use or null to
use the generic callbackpublic void setKeyHandler(KeyCallback callback)
Script.keyAction(Component, int, int).
callback - Callback to use or null to
use the generic callbackpublic void updateMenu()
SOFTKEY_OK, SOFTKEY_MIDDLE
and SOFTKEY_BACK
assosiations. The Script.getSoftKey(Shell, Component, int) callback is used
to obtain the MenuItems.
This method does not call the flushScreen(boolean)
automatically so it might be necessary to call
that function as well.
Key associations are assigned when Shell is pushed on screen, but this method is provided in case the they need to be changed on the fly.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||