Interface IFocusComp

    • Method Detail

      • requestFocus

        default java.lang.String requestFocus()
        Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.

        This method is less precise than requestFocusEx(), but avoids try-catching.

        Returns:
        null for success, otherwise an error message indicating why focus was not able to be changed.
      • requestFocusEx

        default boolean requestFocusEx()
                                throws FocusException
        Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.
        Returns:
        true if focus was changed, false otherwise.
        Throws:
        FocusException - If focus could not be changed.
      • requestFocus

        default java.lang.String requestFocus​(IGProp<?> trigger)
        Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.

        This method is less precise than requestFocusEx(IGProp), but avoids try-catching.

        Parameters:
        trigger - The component triggering the focus, null for none.
        Returns:
        null for success, otherwise an error message indicating why focus was not able to be changed.
      • requestFocusEx

        default boolean requestFocusEx​(IGProp<?> trigger)
                                throws FocusException
        Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.
        Parameters:
        trigger - The component triggering the focus, null for none.
        Returns:
        true if focus was changed, false otherwise.
        Throws:
        FocusException - If focus could not be changed.
      • onFocusLost

        default void onFocusLost​(IFocusComp focusComp,
                                 IGProp<?> trigger,
                                 boolean isRemoteInduced)
        Called to the focused component when it loses focus.

        Focus components override this method if they need to process focus lost.

        Parameters:
        focusComp - Component receiving focus, null for none.
        trigger - The component triggering the focus, null for none.
        isRemoteInduced - Flag indicating this event is due to a remote event.
      • onFocusGained

        default void onFocusGained​(IFocusComp opposite,
                                   IGProp<?> trigger,
                                   boolean isRemoteInduced)
        Called to the component when it receives focus.

        Focus components override this method if they need to process focus lost.

        Parameters:
        opposite - Component losing focus, null for none.
        trigger - The component triggering the focus, null for none.
        isRemoteInduced - Flag indicating this event is due to a remote event.