|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.kuix.core.focus.FocusManager
public class FocusManager
Field Summary | |
---|---|
protected Widget |
focusedWidget
|
protected Widget |
rootWidget
|
Constructor Summary | |
---|---|
FocusManager(Widget rootWidget,
boolean loop)
Construct a FocusManager |
Method Summary | |
---|---|
void |
addShortcutHandler(Widget widget)
Add a shortcut key event handler to shortcuts list |
ScrollPane |
findFirstScrollPaneParent(Widget widget)
Try to retrieve the direct or indirect parent scrollPane of the given widget instance. |
Widget |
getFocusedWidget()
Returns the focused widget. |
Widget |
getVirtualFocusedWidget()
Returns the focused widget. |
boolean |
isLoop()
|
boolean |
processKeyEvent(byte type,
int kuixKeyCode)
Process a key event |
boolean |
processPointerEvent(byte type,
int x,
int y)
Process a pointer event |
protected boolean |
processSoftKeyEvent(byte type,
int kuixKeyCode)
Process key event if it's generated by soft key |
void |
removeShortcutHandler(Widget widget)
Remove a shortcut key event handler to shortcuts list |
void |
requestFirstFocus()
Request focus for the first focusable widget |
void |
requestFocus(Widget widget)
Request the widget focus |
void |
requestLastFocus()
Request focus for the last focusable widget |
void |
requestOtherFocus(boolean forward,
Alignment direction)
Request the forward or backward focusable Widget . |
void |
requestOtherFocus(Widget startWidget,
boolean forward,
Alignment direction)
Request the forward or backward focusable Widget . |
void |
reset()
Reset the focues widget |
void |
setLoop(boolean loop)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Widget rootWidget
protected Widget focusedWidget
Constructor Detail |
---|
public FocusManager(Widget rootWidget, boolean loop)
FocusManager
rootWidget
- loop
- Method Detail |
---|
public boolean isLoop()
public void setLoop(boolean loop)
loop
- the loop to setpublic Widget getFocusedWidget()
public Widget getVirtualFocusedWidget()
TabFolder
the current TabItem
's focused widget is returned.focusedWidget
member.
public void reset()
public void addShortcutHandler(Widget widget)
widget
- the widget that handle the shortcut key eventpublic void removeShortcutHandler(Widget widget)
widget
- the widget that handle the shortcut key eventpublic ScrollPane findFirstScrollPaneParent(Widget widget)
widget
instance.
widget
-
ScrollPane
if it exists or
null
public void requestFocus(Widget widget)
widget
focus
widget
- public void requestOtherFocus(Widget startWidget, boolean forward, Alignment direction)
Widget
. The forward or
backward focusable widget search start from widget
.direction
helps to catch the best previous focusable
widget. Set direction
to null
to use only
widget tree navigation.
startWidget
- direction
- public void requestOtherFocus(boolean forward, Alignment direction)
Widget
.direction
helps to catch the best previous focusable
widget. Set direction
to null
to use only
widget tree navigation.
direction
- public void requestFirstFocus()
public void requestLastFocus()
public boolean processKeyEvent(byte type, int kuixKeyCode)
type
- kuixKeyCode
-
true
if the event do something, else false
protected boolean processSoftKeyEvent(byte type, int kuixKeyCode)
type
- kuixKeyCode
-
true
if the event do something, else false
public boolean processPointerEvent(byte type, int x, int y)
type
- x
- y
-
true
if the event do something, else false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |