Class PdoComponentAddon<T extends org.tentackle.pdo.PersistentDomainObject<T>>

  • Type Parameters:
    T - the PDO type

    public class PdoComponentAddon<T extends org.tentackle.pdo.PersistentDomainObject<T>>
    extends java.lang.Object
    Adds style, context-menu and function-keys to components bound to a PDO.
    • Constructor Summary

      Constructors 
      Constructor Description
      PdoComponentAddon​(org.tentackle.fx.FxComponent component, java.util.function.Supplier<T> pdoSupplier)
      Creates the addon.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T createPdo()
      Creates a new PDO.
      void edit()
      Edit or view current pdo.
      T getPdo()
      Gets the PDO.
      boolean isInSearchOrEdit()
      Returns whether search or edit dialog is currently displayed.
      void search()
      Search for a PDO.
      T searchPdo​(T proxy)
      Modal search of the pdo.
      java.util.List<T> selectAll​(T proxy)
      Returns a list of all pdos.
      Used in comboboxes and choiceboxes to initialize the component's drop down list.
      void setPdo​(T pdo)
      Sets the PDO.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PdoComponentAddon

        public PdoComponentAddon​(org.tentackle.fx.FxComponent component,
                                 java.util.function.Supplier<T> pdoSupplier)
        Creates the addon.
        Parameters:
        component - the fx component
        pdoSupplier - a supplier for the currently displayed PDO
    • Method Detail

      • getPdo

        public T getPdo()
        Gets the PDO.
        Returns:
        the pdo
      • setPdo

        public void setPdo​(T pdo)
        Sets the PDO.
        Parameters:
        pdo - the pdo
      • isInSearchOrEdit

        public boolean isInSearchOrEdit()
        Returns whether search or edit dialog is currently displayed.
        Returns:
        true if within search or edit
      • edit

        public void edit()
        Edit or view current pdo.
      • search

        public void search()
        Search for a PDO.
      • createPdo

        public T createPdo()
        Creates a new PDO.
        Returns:
        the pdo
      • searchPdo

        public T searchPdo​(T proxy)
        Modal search of the pdo.
        Parameters:
        proxy - the proxy pdo (possibly presetted with partial search criteria)
        Returns:
        the selected pdo, null if none
      • selectAll

        public java.util.List<T> selectAll​(T proxy)
        Returns a list of all pdos.
        Used in comboboxes and choiceboxes to initialize the component's drop down list.
        Parameters:
        proxy - the proxy pdo
        Returns:
        the list of all allowed PDOs