Interface GuiProvider<T extends org.tentackle.pdo.PersistentDomainObject<T>>

  • Type Parameters:
    T - the PDO type
    All Superinterfaces:
    org.tentackle.pdo.DomainContextProvider, org.tentackle.pdo.PdoHolder<T>
    All Known Implementing Classes:
    DefaultGuiProvider, SecurityGuiProvider

    public interface GuiProvider<T extends org.tentackle.pdo.PersistentDomainObject<T>>
    extends org.tentackle.pdo.PdoHolder<T>, org.tentackle.pdo.DomainContextProvider
    Provider of GUI-functionality for a pdo.
    Author:
    harald
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javafx.scene.input.Dragboard createDragboard​(javafx.scene.Node node)
      Creates the dragboard for the pdo.
      PdoEditor<T> createEditor()
      Creates a controller to edit or view this object.
      PdoFinder<T> createFinder()
      Creates a controller to search PDOs.
      javafx.scene.image.ImageView createIcon()
      Gets the PDO's icon.
      The icon is displayed in trees, for example.
      org.tentackle.fx.table.TableConfiguration<T> createTableConfiguration()
      Creates the table configuration.
      org.tentackle.fx.component.FxTableView<T> createTableView()
      Creates the table view for given configuration.
      javafx.scene.control.TreeCell<T> createTreeCell()
      Creates a tree cell for this type of pdo.
      javafx.scene.control.TreeItem<T> createTreeItem()
      Creates the tree item for this pdo.
      void dropDragboard​(javafx.scene.input.Dragboard dragbord)
      Drops the dragboard on the pdo.
      boolean editorExists()
      Returns whether a controller exists to edit or view this object.
      boolean finderExists()
      Returns whether a finder exists to search for PDOs.
      java.util.ResourceBundle getBundle()
      Gets the resource bundle for this provider.
      <P extends org.tentackle.pdo.PersistentDomainObject<P>>
      java.lang.String
      getToolTipText​(P parent)
      Gets the tooltip text with respect to the parent object this object is displayed in a tree.
      <P extends org.tentackle.pdo.PersistentDomainObject<P>>
      java.util.Collection<? extends org.tentackle.pdo.PersistentDomainObject<?>>
      getTreeChildObjects​(P parent)
      Gets the childs with respect to the parent object this object is displayed in the current tree.
      int getTreeExpandMaxDepth()
      Gets the maximum level of expansion allowed in a navigatable object tree.
      The default is 0, i.e.
      <P extends org.tentackle.pdo.PersistentDomainObject<P>>
      java.util.Collection<? extends org.tentackle.pdo.PersistentDomainObject<?>>
      getTreeParentObjects​(P parent)
      Gets the parents with respect to the parent object this object is displayed in the current tree.
      T getTreeRoot()
      Gets the object to be displayed in trees in place of this object.
      <P extends org.tentackle.pdo.PersistentDomainObject<P>>
      java.lang.String
      getTreeText​(P parent)
      Gets the tree text with respect to the parent object this object is displayed in a tree.
      boolean isBundleProvided()
      Returns whether a resource bundle is provided.
      boolean isDragAccepted​(javafx.scene.input.DragEvent event)
      Checks whether drag over the pdo is accepted.
      boolean providesTreeChildObjects()
      Determines whether this object may have child objects that should be visible in a navigatable tree.
      boolean providesTreeParentObjects()
      Determines whether the navigatable object tree should show the parents of this object.
      Objects may be childs of different parents in terms of "being referenced from" or any other relation, for example: the warehouses this customer visited.
      boolean stopTreeExpansion()
      Determines whether tree explansion should stop at this object.
      Sometimes treechilds should not be expanded if in a recursive "expand all".
      • Methods inherited from interface org.tentackle.pdo.DomainContextProvider

        getDomainContext, on, op
      • Methods inherited from interface org.tentackle.pdo.PdoHolder

        getPdo, on, setPdo
    • Method Detail

      • isBundleProvided

        boolean isBundleProvided()
        Returns whether a resource bundle is provided.
        Returns:
        true if provided, false if no bundle
      • getBundle

        java.util.ResourceBundle getBundle()
        Gets the resource bundle for this provider.

        Throws MissingResourceException if no bundle found.

        Returns:
        the resource bundle
      • createIcon

        javafx.scene.image.ImageView createIcon()
        Gets the PDO's icon.
        The icon is displayed in trees, for example.
        Returns:
        the icon
      • editorExists

        boolean editorExists()
        Returns whether a controller exists to edit or view this object.
        Returns:
        true if a controller exists
        See Also:
        createEditor()
      • createEditor

        PdoEditor<T> createEditor()
        Creates a controller to edit or view this object.
        Returns:
        the controller
        Throws:
        org.tentackle.fx.FxRuntimeException - if editorExists() == false
      • finderExists

        boolean finderExists()
        Returns whether a finder exists to search for PDOs.
        Returns:
        true if controller exists
      • createFinder

        PdoFinder<T> createFinder()
        Creates a controller to search PDOs.
        Returns:
        the controller
        Throws:
        org.tentackle.fx.FxRuntimeException - if editorExists() == false
      • createDragboard

        javafx.scene.input.Dragboard createDragboard​(javafx.scene.Node node)
        Creates the dragboard for the pdo.
        Parameters:
        node - the drag source
        Returns:
        the dragboard, null if PDO is not a DnD source
      • isDragAccepted

        boolean isDragAccepted​(javafx.scene.input.DragEvent event)
        Checks whether drag over the pdo is accepted.
        Parameters:
        event - the drag event
        Returns:
        true if accepted, false if PDO does not accept the drag
      • dropDragboard

        void dropDragboard​(javafx.scene.input.Dragboard dragbord)
        Drops the dragboard on the pdo.
        Parameters:
        dragbord - the dragboard
      • getTreeRoot

        T getTreeRoot()
        Gets the object to be displayed in trees in place of this object.
        Returns:
        the object to be displayed in a tree
      • getTreeText

        <P extends org.tentackle.pdo.PersistentDomainObject<P>> java.lang.String getTreeText​(P parent)
        Gets the tree text with respect to the parent object this object is displayed in a tree.
        Type Parameters:
        P - the parent PDO type
        Parameters:
        parent - is the parent object, null if no parent
        Returns:
        the tree text
      • getToolTipText

        <P extends org.tentackle.pdo.PersistentDomainObject<P>> java.lang.String getToolTipText​(P parent)
        Gets the tooltip text with respect to the parent object this object is displayed in a tree.
        Type Parameters:
        P - the parent PDO type
        Parameters:
        parent - is the parent object, null if no parent
        Returns:
        the tooltip text
      • createTreeItem

        javafx.scene.control.TreeItem<T> createTreeItem()
        Creates the tree item for this pdo.
        Returns:
        the tree item
      • createTreeCell

        javafx.scene.control.TreeCell<T> createTreeCell()
        Creates a tree cell for this type of pdo.
        Returns:
        the tree cell
      • stopTreeExpansion

        boolean stopTreeExpansion()
        Determines whether tree explansion should stop at this object.
        Sometimes treechilds should not be expanded if in a recursive "expand all". However they should expand if the user explicitly wants to. If this method returns true, the tree will not further expand this node automatically (only on demand).
        Returns:
        true if expansion should stop.
      • providesTreeChildObjects

        boolean providesTreeChildObjects()
        Determines whether this object may have child objects that should be visible in a navigatable tree.
        Returns:
        true if object may have childs
      • getTreeChildObjects

        <P extends org.tentackle.pdo.PersistentDomainObject<P>> java.util.Collection<? extends org.tentackle.pdo.PersistentDomainObject<?>> getTreeChildObjects​(P parent)
        Gets the childs with respect to the parent object this object is displayed in the current tree.
        Type Parameters:
        P - the parent PDO type
        Parameters:
        parent - the parent object of this object in the tree, null = no parent
        Returns:
        the childs
      • getTreeExpandMaxDepth

        int getTreeExpandMaxDepth()
        Gets the maximum level of expansion allowed in a navigatable object tree.
        The default is 0, i.e. no limit.
        Returns:
        the maximum depth of a subtree of this object, 0 = no limit (default)
      • providesTreeParentObjects

        boolean providesTreeParentObjects()
        Determines whether the navigatable object tree should show the parents of this object.
        Objects may be childs of different parents in terms of "being referenced from" or any other relation, for example: the warehouses this customer visited. Trees may provide a button to make these parents visible. The default implementation returns false.
        Returns:
        true if showing parents is enabled
      • getTreeParentObjects

        <P extends org.tentackle.pdo.PersistentDomainObject<P>> java.util.Collection<? extends org.tentackle.pdo.PersistentDomainObject<?>> getTreeParentObjects​(P parent)
        Gets the parents with respect to the parent object this object is displayed in the current tree.
        Type Parameters:
        P - the parent PDO type
        Parameters:
        parent - the parent object, null if no parent
        Returns:
        the parents
      • createTableConfiguration

        org.tentackle.fx.table.TableConfiguration<T> createTableConfiguration()
        Creates the table configuration.
        Returns:
        the table configuration
      • createTableView

        org.tentackle.fx.component.FxTableView<T> createTableView()
        Creates the table view for given configuration.
        Returns:
        the view