Class FxControlDelegate

    • Constructor Detail

      • FxControlDelegate

        public FxControlDelegate()
        Creates a control delegate.
    • Method Detail

      • setViewModified

        public void setViewModified​(boolean viewModified)
        Description copied from interface: FxControl
        Sets whether the view has been modified.
        Specified by:
        setViewModified in interface FxControl
        Parameters:
        viewModified - true if user has modified the visual representation
      • isViewModified

        public boolean isViewModified()
        Description copied from interface: FxControl
        Returns whether the user has modified the view since the last FxControl.updateView().
        Specified by:
        isViewModified in interface FxControl
        Returns:
        true if user changed the visual representation
      • viewModifiedProperty

        public javafx.beans.property.BooleanProperty viewModifiedProperty()
        Description copied from interface: FxControl
        Gets the viewModified property.
        Specified by:
        viewModifiedProperty in interface FxControl
        Returns:
        the property
      • setChangeable

        public void setChangeable​(boolean changeable)
        Description copied from interface: FxControl
        Set the control to be changeable.
        This is a unified abstraction and will be translated to setEditable or setDisabled, whatever is appropriate to this control.
        Specified by:
        setChangeable in interface FxControl
        Parameters:
        changeable - true the user can edit the data, false if show only
      • isControlChangeable

        protected boolean isControlChangeable()
        Gets the last intended changeability for this control.
        Might differ from effective changeability if container changed its changeability.
        Returns:
        the control's changeability regardless of the effective changeability
      • isChangeable

        public boolean isChangeable()
        Description copied from interface: FxControl
        Returns if this control is changeable.
        Specified by:
        isChangeable in interface FxControl
        Returns:
        true the user can edit the data, false if show only
      • changeableProperty

        public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
        Description copied from interface: FxControl
        Gets the changaeble property.
        Specified by:
        changeableProperty in interface FxControl
        Returns:
        the property
      • updateChangeable

        protected void updateChangeable​(boolean changeable)
        Updates other properties if changeable is bound to something else.
        Parameters:
        changeable - the flag
      • createChangeableProperty

        protected javafx.beans.property.ReadOnlyBooleanWrapper createChangeableProperty​(boolean changeable)
        Creates the changeable property.
        Parameters:
        changeable - the initial value
        Returns:
        the property
      • setContainerChangableIgnored

        public void setContainerChangableIgnored​(boolean containerChangeableIgnored)
        Description copied from interface: FxControl
        Sets whether to ignore setContainerChangeable.
        Specified by:
        setContainerChangableIgnored in interface FxControl
        Parameters:
        containerChangeableIgnored - true if ignore, default is false
      • isContainerChangeableIgnored

        public boolean isContainerChangeableIgnored()
        Description copied from interface: FxControl
        Returns whether setContainerChangeable is ignored by this control.
        Specified by:
        isContainerChangeableIgnored in interface FxControl
        Returns:
        true if ignore
      • setBindable

        public void setBindable​(boolean bindable)
        Description copied from interface: FxControl
        Sets whether this control is bindable, i.e. should be checked within a binding hierarchy.
        Specified by:
        setBindable in interface FxControl
        Parameters:
        bindable - true if bindable, else not eligible for the binding process
      • isBindable

        public boolean isBindable()
        Description copied from interface: FxControl
        Determines whether this container is bindable.
        Specified by:
        isBindable in interface FxControl
        Returns:
        true if bindable, else not eligible for the binding process
      • setHelpUrl

        public void setHelpUrl​(java.lang.String helpUrl)
        Description copied from interface: FxControl
        Sets the online-help URL.
        If a help url is set, a browser will be launched to show that url if there is no help url for the control the help was requested for.
        Specified by:
        setHelpUrl in interface FxControl
        Parameters:
        helpUrl - the help url
      • getHelpUrl

        public java.lang.String getHelpUrl()
        Description copied from interface: FxControl
        Gets the online-help URL.
        Specified by:
        getHelpUrl in interface FxControl
        Returns:
        the help url, default is null
      • showHelp

        public void showHelp()
        Description copied from interface: FxControl
        Displays online help if configured.
        Specified by:
        showHelp in interface FxControl
      • addModelToViewListener

        public void addModelToViewListener​(ModelToViewListener listener)
        Description copied from interface: FxControl
        Adds a model-to-view listener.
        The listener will be invoked before the binding operation.
        If the control is a container, the listener will be invoked if any of the container's components get updated.
        Specified by:
        addModelToViewListener in interface FxControl
        Parameters:
        listener - the value listener to add
      • addViewToModelListener

        public void addViewToModelListener​(ViewToModelListener listener)
        Description copied from interface: FxControl
        Adds a view-to-model listener.
        The listener will be invoked after the binding operation.
        If the control is a container, the listener will be invoked if any of the container's components update the model.
        Specified by:
        addViewToModelListener in interface FxControl
        Parameters:
        listener - the value listener to add
      • getModelToViewListeners

        public java.util.Collection<ModelToViewListener> getModelToViewListeners()
        Gets the model-to-view listeners with lazy collection creation.
        Returns:
        the listeners, never null
      • fireModelToViewListeners

        public void fireModelToViewListeners()
        Fires all model-to-view listeners.
      • getViewToModelListeners

        public java.util.Collection<ViewToModelListener> getViewToModelListeners()
        Gets the view-to-model listeners with lazy collection creation.
        Returns:
        the listeners, never null
      • fireViewToModelListeners

        public void fireViewToModelListeners()
        Fires all model-to-view listeners.