Class FxTab

java.lang.Object
javafx.scene.control.Tab
org.tentackle.fx.container.FxTab
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, FxContainer, FxControl

public class FxTab extends javafx.scene.control.Tab implements FxContainer
Extended Tab.
Author:
harald
  • Property Summary

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

    Properties inherited from class javafx.scene.control.Tab

    closable, content, contextMenu, disabled, disable, graphic, id, onClosed, onCloseRequest, onSelectionChanged, selected, style, tabPane, text, tooltip
  • Field Summary

    Fields inherited from class javafx.scene.control.Tab

    CLOSED_EVENT, SELECTION_CHANGED_EVENT, TAB_CLOSE_REQUEST_EVENT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a FxTab.
  • 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.
    void
    Clears all error messages in all components.
    protected FxTabDelegate
    Creates the delegate.
    javafx.collections.ObservableList<?>
    Gets the component nodes maintained by this container.
    Gets the controller of this container.
    <C extends FxController>
    C
    getController(Class<C> clazz)
    Gets the controller along the parent hierarchy that is an instanceof the given class.
    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
    Gets the value of the changeable property.
    boolean
    Returns whether setContainerChangeable is ignored by this control.
    boolean
    Gets the value of the viewModified property.
    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. should be checked within a binding hierarchy.
    void
    setChangeable(boolean changeable)
    Sets the value of the changeable property.
    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
    Sets the controller of this container.
    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 the value of the viewModified property.
    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.
    void
    Updates the view according to the model.
    The method is the same as FxControl.updateView() but skips any focused component.
    javafx.beans.property.BooleanProperty
    Gets the viewModified property.

    Methods inherited from class javafx.scene.control.Tab

    addEventFilter, addEventHandler, buildEventDispatchChain, closableProperty, contentProperty, contextMenuProperty, disabledProperty, disableProperty, getClassCssMetaData, getContent, getContextMenu, getCssMetaData, getGraphic, getId, getOnClosed, getOnCloseRequest, getOnSelectionChanged, getProperties, getPseudoClassStates, getStyle, getStyleableParent, getStyleClass, getTabPane, getText, getTooltip, getTypeSelector, getUserData, graphicProperty, hasProperties, idProperty, isClosable, isDisable, isDisabled, isSelected, onClosedProperty, onCloseRequestProperty, onSelectionChangedProperty, removeEventFilter, removeEventHandler, selectedProperty, setClosable, setContent, setContextMenu, setDisable, setGraphic, setId, setOnClosed, setOnCloseRequest, setOnSelectionChanged, setStyle, setText, setTooltip, setUserData, styleProperty, tabPaneProperty, textProperty, tooltipProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • Constructor Details

    • FxTab

      public FxTab()
      Creates a FxTab.
  • Method Details

    • createDelegate

      protected FxTabDelegate createDelegate()
      Creates the delegate.
      Returns:
      the delegate
    • getDelegate

      public FxTabDelegate getDelegate()
      Description copied from interface: FxControl
      Gets the lazily created component delegate.
      Specified by:
      getDelegate in interface FxControl
      Returns:
      the delegate
    • getParentContainer

      public FxContainer getParentContainer()
      Description copied from interface: FxControl
      Gets the parent container.
      Specified by:
      getParentContainer in interface FxControl
      Returns:
      the parent, null if not a component of a container
    • getComponents

      public javafx.collections.ObservableList<?> getComponents()
      Description copied from interface: FxContainer
      Gets the component nodes maintained by this container.
      Specified by:
      getComponents in interface FxContainer
      Returns:
      list of components
    • setChangeable

      public void setChangeable(boolean changeable)
      Sets the value of the changeable property.
      Specified by:
      setChangeable in interface FxControl
      Property description:
      Parameters:
      changeable - the value for the changeable property
      See Also:
    • isChangeable

      public boolean isChangeable()
      Gets the value of the changeable property.
      Specified by:
      isChangeable in interface FxControl
      Property description:
      Returns:
      the value of the changeable property
      See Also:
    • setContainerChangeable

      public void setContainerChangeable(boolean containerChangeable)
      Description copied from interface: FxControl
      Invoked when setChangeable() is invoked on the container of this component.
      Specified by:
      setContainerChangeable in interface FxControl
      Parameters:
      containerChangeable - true if container is changeable, false if all components readonly
    • setContainerChangeableIgnored

      public void setContainerChangeableIgnored(boolean containerChangeableIgnored)
      Description copied from interface: FxControl
      Sets whether to ignore setContainerChangeable.
      Specified by:
      setContainerChangeableIgnored 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
    • changeableProperty

      public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
      Description copied from interface: FxControl
      Gets the changeable property.
      Specified by:
      changeableProperty in interface FxControl
      Returns:
      the changeable property
      See Also:
    • updateViewNonFocused

      public void updateViewNonFocused()
      Description copied from interface: FxContainer
      Updates the view according to the model.
      The method is the same as FxControl.updateView() but skips any focused component.
      Specified by:
      updateViewNonFocused in interface FxContainer
    • updateView

      public void updateView()
      Description copied from interface: FxControl
      Updates the view according to the model.
      Specified by:
      updateView in interface FxControl
    • updateModel

      public void updateModel()
      Description copied from interface: FxControl
      Updates the model according to the view.
      Specified by:
      updateModel in interface FxControl
    • saveView

      public void saveView()
      Description copied from interface: FxControl
      Creates a copy of the value shown to the user.
      Specified by:
      saveView in interface FxControl
    • invalidateSavedView

      public void invalidateSavedView()
      Description copied from interface: FxControl
      Invalidates the saved view.
      Specified by:
      invalidateSavedView in interface FxControl
    • triggerViewModified

      public void triggerViewModified()
      Description copied from interface: FxControl
      Walks up the component hierarchy and updates the viewModified property.
      This is done by comparing the saved view value with the current view.
      Specified by:
      triggerViewModified in interface FxControl
    • setViewModified

      public void setViewModified(boolean viewModified)
      Sets the value of the viewModified property.
      Specified by:
      setViewModified in interface FxControl
      Property description:
      Parameters:
      viewModified - the value for the viewModified property
      See Also:
    • isViewModified

      public boolean isViewModified()
      Gets the value of the viewModified property.
      Specified by:
      isViewModified in interface FxControl
      Property description:
      Returns:
      the value of the viewModified property
      See Also:
    • viewModifiedProperty

      public javafx.beans.property.BooleanProperty viewModifiedProperty()
      Description copied from interface: FxControl
      Gets the viewModified property.
      Specified by:
      viewModifiedProperty in interface FxControl
      Returns:
      the viewModified property
      See Also:
    • 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(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 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
    • toGenericString

      public String toGenericString()
      Description copied from interface: FxControl
      Returns the classname plus optional fx:id.
      Specified by:
      toGenericString in interface FxControl
      Returns:
      the generic string for diagnostics and logging
    • clearErrors

      public void clearErrors()
      Description copied from interface: FxContainer
      Clears all error messages in all components.
      Specified by:
      clearErrors in interface FxContainer
    • getController

      public FxController getController()
      Description copied from interface: FxContainer
      Gets the controller of this container.
      Specified by:
      getController in interface FxContainer
      Returns:
      the controller, null if nested container without a controller
    • setController

      public void setController(FxController controller)
      Description copied from interface: FxContainer
      Sets the controller of this container.
      Specified by:
      setController in interface FxContainer
      Parameters:
      controller - the controller, null if nested container without a controller
    • getController

      public <C extends FxController> C getController(Class<C> clazz)
      Description copied from interface: FxContainer
      Gets the controller along the parent hierarchy that is an instanceof the given class.
      Specified by:
      getController in interface FxContainer
      Type Parameters:
      C - the controller type
      Parameters:
      clazz - the controller class
      Returns:
      the controller, null if no such controller
    • 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
    • removeModelToViewListener

      public void removeModelToViewListener(ModelToViewListener listener)
      Description copied from interface: FxControl
      Removes a model-to-view listener.
      Specified by:
      removeModelToViewListener in interface FxControl
      Parameters:
      listener - the value listener to remove
    • 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
    • removeViewToModelListener

      public void removeViewToModelListener(ViewToModelListener listener)
      Description copied from interface: FxControl
      Removes a view-to-model listener.
      Specified by:
      removeViewToModelListener in interface FxControl
      Parameters:
      listener - the value listener to remove