Class FxContainerDelegate

java.lang.Object
org.tentackle.fx.FxControlDelegate
org.tentackle.fx.FxContainerDelegate
All Implemented Interfaces:
FxContainer, FxControl
Direct Known Subclasses:
FxAccordionDelegate, FxAnchorPaneDelegate, FxBorderPaneDelegate, FxButtonBarDelegate, FxDialogPaneDelegate, FxFlowPaneDelegate, FxGridPaneDelegate, FxHBoxDelegate, FxPaneDelegate, FxScrollPaneDelegate, FxSplitPaneDelegate, FxStackPaneDelegate, FxTabDelegate, FxTabPaneDelegate, FxTextFlowDelegate, FxTilePaneDelegate, FxTitledPaneDelegate, FxToolBarDelegate, FxVBoxDelegate

public abstract class FxContainerDelegate extends FxControlDelegate implements FxContainer
Delegate implementing FxContainer.
Author:
harald
  • Constructor Details

    • FxContainerDelegate

      public FxContainerDelegate()
      Parent constructor.
  • Method Details

    • getContainer

      public abstract FxContainer getContainer()
      Gets the container of this delegate.
      Returns:
      the container
    • 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
    • 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
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNode

      public javafx.scene.Node getNode()
      Gets the container as a node.
      Returns:
      the node
    • 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
    • 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
    • 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
    • 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
      Overrides:
      setBindable in class FxControlDelegate
      Parameters:
      bindable - true if bindable, else not eligible for the binding process
    • 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
      Overrides:
      setChangeable in class FxControlDelegate
      Parameters:
      changeable - true the user can edit the data, false if show only
    • 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
    • setContainerChangeable

      protected void setContainerChangeable(List<?> components, boolean changeable)
      Updates the container changeable flag of all components.
      Parameters:
      components - the components
      changeable - true if changeable
    • clearErrors

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