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:
LosesFocuseventFocuseventFocusIneventFocusOutevent
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault TaddFocusHandler(FocusEventHandler handler) Adds a focus event handler to the component The specified handler will run when the component gains focusdefault TaddFocusInHandler(FocusInEventHandler handler) Adds a focus in event handler to the component.default TaddFocusOutHandler(FocusOutEventHandler handler) Adds a focus out event handler to the component.default TAdds a focus loss event handler.default TsetFocus()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- TheLosesFoucusEventHandlerimplementation- 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- TheFocusEventHandlerimplementation- 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- TheFocusInEventHandlerimplementation- 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- TheFocusOutEventHandlerimplementation- Returns:
- The component
- See Also:
-