Interface FxControl

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addModelToViewListener​(ModelToViewListener listener)
      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.
      void addViewToModelListener​(ViewToModelListener listener)
      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.
      javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
      Gets the changaeble property.
      FxControlDelegate getDelegate()
      Gets the lazily created component delegate.
      java.lang.String getHelpUrl()
      Gets the online-help URL.
      FxContainer getParentContainer()
      Gets the parent container.
      void invalidateSavedView()
      Invalidates the saved view.
      boolean isBindable()
      Determines whether this container is bindable.
      boolean isChangeable()
      Returns if this control is changeable.
      boolean isContainerChangeableIgnored()
      Returns whether setContainerChangeable is ignored by this control.
      boolean isViewModified()
      Returns whether the user has modified the view since the last updateView().
      void removeModelToViewListener​(ModelToViewListener listener)
      Removes a model-to-view listener.
      void removeViewToModelListener​(ViewToModelListener listener)
      Removes a view-to-model listener.
      void saveView()
      Creates a copy of the value shown to the user.
      void setBindable​(boolean bindable)
      Sets whether this control is bindable, i.e.
      void setChangeable​(boolean changeable)
      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.
      void setContainerChangableIgnored​(boolean containerChangeableIgnored)
      Sets whether to ignore setContainerChangeable.
      void setContainerChangeable​(boolean containerChangeable)
      Invoked when setChangeable() is invoked on the container of this component.
      void setHelpUrl​(java.lang.String helpUrl)
      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.
      void setViewModified​(boolean viewModified)
      Sets whether the view has been modified.
      void showHelp()
      Displays online help if configured.
      java.lang.String toGenericString()
      Returns the classname plus optional fx:id.
      void triggerViewModified()
      Walks up the component hierarchy and updates the viewModified property.
      This is done by comparing the saved view value with the current view.
      void updateModel()
      Updates the model according to the view.
      void updateView()
      Updates the view according to the model.
      javafx.beans.property.BooleanProperty viewModifiedProperty()
      Gets the viewModified property.
    • Method Detail

      • getDelegate

        FxControlDelegate getDelegate()
        Gets the lazily created component delegate.
        Returns:
        the delegate
      • getParentContainer

        FxContainer getParentContainer()
        Gets the parent container.
        Returns:
        the parent, null if not a component of a container
      • setChangeable

        void setChangeable​(boolean changeable)
        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.
        Parameters:
        changeable - true the user can edit the data, false if show only
      • isChangeable

        boolean isChangeable()
        Returns if this control is changeable.
        Returns:
        true the user can edit the data, false if show only
      • changeableProperty

        javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
        Gets the changaeble property.
        Returns:
        the property
      • setContainerChangeable

        void setContainerChangeable​(boolean containerChangeable)
        Invoked when setChangeable() is invoked on the container of this component.
        Parameters:
        containerChangeable - true if container is changeable, false if all components readonly
      • setContainerChangableIgnored

        void setContainerChangableIgnored​(boolean containerChangeableIgnored)
        Sets whether to ignore setContainerChangeable.
        Parameters:
        containerChangeableIgnored - true if ignore, default is false
      • isContainerChangeableIgnored

        boolean isContainerChangeableIgnored()
        Returns whether setContainerChangeable is ignored by this control.
        Returns:
        true if ignore
      • updateView

        void updateView()
        Updates the view according to the model.
      • updateModel

        void updateModel()
        Updates the model according to the view.
      • saveView

        void saveView()
        Creates a copy of the value shown to the user.
      • invalidateSavedView

        void invalidateSavedView()
        Invalidates the saved view.
      • triggerViewModified

        void triggerViewModified()
        Walks up the component hierarchy and updates the viewModified property.
        This is done by comparing the saved view value with the current view.
      • setViewModified

        void setViewModified​(boolean viewModified)
        Sets whether the view has been modified.
        Parameters:
        viewModified - true if user has modified the visual representation
      • isViewModified

        boolean isViewModified()
        Returns whether the user has modified the view since the last updateView().
        Returns:
        true if user changed the visual representation
      • viewModifiedProperty

        javafx.beans.property.BooleanProperty viewModifiedProperty()
        Gets the viewModified property.
        Returns:
        the property
      • setBindable

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

        boolean isBindable()
        Determines whether this container is bindable.
        Returns:
        true if bindable, else not eligible for the binding process
      • setHelpUrl

        void setHelpUrl​(java.lang.String helpUrl)
        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.
        Parameters:
        helpUrl - the help url
      • getHelpUrl

        java.lang.String getHelpUrl()
        Gets the online-help URL.
        Returns:
        the help url, default is null
      • showHelp

        void showHelp()
        Displays online help if configured.
      • toGenericString

        java.lang.String toGenericString()
        Returns the classname plus optional fx:id.
        Returns:
        the generic string for diagnostics and logging
      • addModelToViewListener

        void addModelToViewListener​(ModelToViewListener listener)
        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.
        Parameters:
        listener - the value listener to add
      • removeModelToViewListener

        void removeModelToViewListener​(ModelToViewListener listener)
        Removes a model-to-view listener.
        Parameters:
        listener - the value listener to remove
      • addViewToModelListener

        void addViewToModelListener​(ViewToModelListener listener)
        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.
        Parameters:
        listener - the value listener to add
      • removeViewToModelListener

        void removeViewToModelListener​(ViewToModelListener listener)
        Removes a view-to-model listener.
        Parameters:
        listener - the value listener to remove