Class FxActiveWidget<W extends javafx.scene.layout.Region>

    • Constructor Detail

      • FxActiveWidget

        public FxActiveWidget​(W widget)
        The constructor.
        Parameters:
        widget - the JavaFx widget.
    • Method Detail

      • registerFocusChangeHandler

        protected void registerFocusChangeHandler()
        See Also:
        registerHandlers()
      • getAccessKey

        public char getAccessKey()
        Specified by:
        getAccessKey in interface UiActiveWidget
        Returns:
        the access key of this widget. If the access key is pressed together with the [shift] and [alt] keys this widget will be invoked means that it is clicked. If not an action item (button, link, etc.) it will get the focus. Will be UiActiveWidget.ACCESS_KEY_NONE if no access key is defined.
      • isFocused

        public boolean isFocused()
        Specified by:
        isFocused in interface UiWidget
        Returns:
        true if this widget is active and currently has the focus (the cursor is placed in the widget e.g. a text input and it will receive keyboard events), false otherwise.
      • setFocused

        public boolean setFocused()
        Description copied from interface: UiWidget
        This method sets the focus to this widget. In case of a UiComposite it will set the focus to the first child capable of taking the focus.
        NOTE:
        You can only set the focus. To actually remove it, you need to set it in a different widget.
        Specified by:
        setFocused in interface UiWidget
        Returns:
        true if the focus has been set successfully, false otherwise. You can normally ignore the result. It is only relevant for composite widgets such as panels, that delegate the call recursively and may not contain any child that can take the focus.