Package com.jbstrap.ui
Interface Focusable<T extends Component<?>>
- Type Parameters:
T
- The component type
- All Known Implementing Classes:
CheckboxItem
,CodeViewer
,ColorPicker
,ComboboxItem
,DatePicker
,DateRangePicker
,DualListBox
,FileItem
,Form
,FormItem
,HiddenItem
,Image
,IntegerItem
,Link
,ListItem
,NavBarItem
,NumberItem
,NumberRangeFilter
,PasswordItem
,RadioButtonItem
,SelectorItem
,StaticTextItem
,SwitchItem
,TextItem
,TreeviewNode
public interface Focusable<T extends Component<?>>
Focusable components
Components that can have input focus. The interface handles the placement of focus on the component, and the addition of focus events to the component. These event handlers are:
LosesFocus
eventFocus
eventFocusIn
eventFocusOut
event
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
addFocusHandler
(FocusEventHandler handler) Adds a focus event handler to the component The specified handler will run when the component gains focusdefault T
addFocusInHandler
(FocusInEventHandler handler) Adds a focus in event handler to the component.default T
addFocusOutHandler
(FocusOutEventHandler handler) Adds a focus out event handler to the component.default T
Adds a focus loss event handler.default T
setFocus()
Sets the input focus to the component
-
Method Details
-
setFocus
Sets the input focus to the component- Returns:
- The component
-
addLosesFocusHandler
Adds a focus loss event handler. The specified handler will run when the component loses focus- Parameters:
handler
- TheLosesFoucusEventHandler
implementation- Returns:
- The component
- See Also:
-
addFocusHandler
Adds a focus event handler to the component The specified handler will run when the component gains focus- Parameters:
handler
- TheFocusEventHandler
implementation- Returns:
- The component
- See Also:
-
addFocusInHandler
Adds a focus in event handler to the component. The specified handler will run when the component is about to gain focus.- Parameters:
handler
- TheFocusInEventHandler
implementation- Returns:
- The component
- See Also:
-
addFocusOutHandler
Adds a focus out event handler to the component. The specified handler will run when the component is about to lose focus.- Parameters:
handler
- TheFocusOutEventHandler
implementation- Returns:
- The component
- See Also:
-