Interface FxControl

All Known Subinterfaces:
FxComponent, FxContainer, FxTextComponent
All Known Implementing Classes:
AbstractTextFieldDelegate, FxAccordion, FxAccordionDelegate, FxAnchorPane, FxAnchorPaneDelegate, FxBorderPane, FxBorderPaneDelegate, FxButtonBar, FxButtonBarDelegate, FxCheckBox, FxCheckBoxDelegate, FxChoiceBox, FxChoiceBoxDelegate, FxColorPicker, FxColorPickerDelegate, FxComboBox, FxComboBoxDelegate, FxComponentDelegate, FxContainerDelegate, FxControlDelegate, FxDatePicker, FxDatePickerDelegate, FxDialogPane, FxDialogPaneDelegate, FxFlowPane, FxFlowPaneDelegate, FxGridPane, FxGridPaneDelegate, FxHBox, FxHBoxDelegate, FxHTMLEditor, FxHTMLEditorDelegate, FxListView, FxListViewDelegate, FxPane, FxPaneDelegate, FxPasswordField, FxPasswordFieldDelegate, FxRadioButton, FxRadioButtonDelegate, FxScrollPane, FxScrollPaneDelegate, FxSplitPane, FxSplitPaneDelegate, FxStackPane, FxStackPaneDelegate, FxTab, FxTabDelegate, FxTableView, FxTableViewDelegate, FxTabPane, FxTabPaneDelegate, FxTextArea, FxTextAreaDelegate, FxTextComponentDelegate, FxTextField, FxTextFieldDelegate, FxTextFlow, FxTextFlowDelegate, FxTilePane, FxTilePaneDelegate, FxTitledPane, FxTitledPaneDelegate, FxToggleButton, FxToggleButtonDelegate, FxToolBar, FxToolBarDelegate, FxTreeTableView, FxTreeTableViewDelegate, FxTreeView, FxTreeViewDelegate, FxVBox, FxVBoxDelegate, TotalsTableView

public interface FxControl
Parent interface of all FxComponents and FxContainers.
Author:
harald
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ReadOnlyBooleanProperty
    Gets the changeable property.
    javafx.beans.property.BooleanProperty
    Gets the viewModified property.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    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
    Gets the changeable property.
    Gets the lazily created component delegate.
    Gets the online-help URL.
    Gets the parent container.
    void
    Invalidates the saved view.
    boolean
    Determines whether this container is bindable.
    boolean
    Returns if this control is changeable.
    boolean
    Returns whether setContainerChangeable is ignored by this control.
    boolean
    Returns whether the user has modified the view since the last updateView().
    void
    Removes a model-to-view listener.
    void
    Removes a view-to-model listener.
    void
    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
    setContainerChangeable(boolean containerChangeable)
    Invoked when setChangeable() is invoked on the container of this component.
    void
    setContainerChangeableIgnored(boolean containerChangeableIgnored)
    Sets whether to ignore setContainerChangeable.
    void
    setHelpUrl(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
    Displays online help if configured.
    Returns the classname plus optional fx:id.
    void
    Walks up the component hierarchy and updates the viewModified property.
    This is done by comparing the saved view value with the current view.
    void
    Updates the model according to the view.
    void
    Updates the view according to the model.
    javafx.beans.property.BooleanProperty
    Gets the viewModified property.
  • Property Details

  • Method Details

    • 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 changeable property.
      See Also:
    • 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
    • setContainerChangeableIgnored

      void setContainerChangeableIgnored(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.
      See Also:
    • 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(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

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

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

      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