public class FocusHandler extends Object
Constructor and Description |
---|
FocusHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addElement(Element element)
add the given element to the focushandler (as the last element).
|
void |
addElement(Element element,
Element focusableInsertBeforeElement)
add an element to the focus handler.
|
void |
addElementAfter(Element existingElement,
Element element)
add an element to the focus handler after an existing element already added to it
|
boolean |
canProcessMouseEvents(Element element) |
Element |
findElement(String defaultFocusElementId) |
Element |
getFirstFocusElement()
get first entry.
|
Element |
getKeyboardFocusElement() |
Element |
getMouseFocusElement() |
Element |
getNext(Element current)
get next element.
|
Element |
getPrev(Element current)
get prev element.
|
boolean |
hasAnyElementTheKeyboardFocus() |
boolean |
hasAnyElementTheMouseFocus() |
boolean |
hasExclusiveMouseFocus(Element element) |
boolean |
keyEvent(KeyboardInputEvent inputEvent) |
void |
lostKeyboardFocus(Element elementThatLostFocus) |
void |
lostMouseFocus(Element elementThatLostFocus) |
void |
popState()
restore all states.
|
void |
pushState()
save all states.
|
void |
remove(Element element)
remove this element.
|
void |
requestExclusiveMouseFocus(Element newFocusElement) |
void |
resetFocusElements() |
void |
setKeyFocus(Element newFocusElement)
set the focus to the given element.
|
String |
toString() |
public void addElement(Element element)
element
- element to addpublic void addElement(Element element, Element focusableInsertBeforeElement)
element
- element to addfocusableInsertBeforeElement
- the element before which to add the new elementpublic void addElementAfter(Element existingElement, Element element)
existingElement
- element that already exists in the focushandlerelement
- new element to addpublic Element getNext(Element current)
current
- current elementpublic Element getPrev(Element current)
current
- current elementpublic void remove(Element element)
element
- elementpublic Element getFirstFocusElement()
public void pushState()
public void popState()
public void resetFocusElements()
public void setKeyFocus(Element newFocusElement)
newFocusElement
- new focus elementpublic void lostKeyboardFocus(Element elementThatLostFocus)
public boolean keyEvent(KeyboardInputEvent inputEvent)
public void requestExclusiveMouseFocus(Element newFocusElement)
public boolean hasExclusiveMouseFocus(Element element)
public boolean canProcessMouseEvents(Element element)
public void lostMouseFocus(Element elementThatLostFocus)
public boolean hasAnyElementTheKeyboardFocus()
public boolean hasAnyElementTheMouseFocus()
public Element getKeyboardFocusElement()
public Element getMouseFocusElement()
Copyright © 2013. All Rights Reserved.