Interface ContentProvider

    • Method Detail

      • getName

        String getName​(Object obj)
        Gets the name of the object.

        The name must be an unique identifier relative to the parent item. It will be used as node names in the tree so that they will construct the item path.

        obj - the object
        the name
      • getLabel

        String getLabel​(Object obj)
        Gets the label to be used when displaying the given object.
        obj - the object
        the label
      • getFacets

        String[] getFacets​(Object object)
        Gets the object facets.

        Facets are arbitrary strings that should describe object capabilities and can be used to decorate later the item.

        In a web environment they may be translated to CSS classes.

        item facets
      • isContainer

        boolean isContainer​(Object obj)
        Whether the given object may have children (e.g it's a container).
        obj - the object to test
        true if it may have children, false otherwise
      • getElements

        Object[] getElements​(Object input)
        Gets the top level items.

        The items will be shown on the top level of the tree. These items are computed from the tree input that will be considered the tree root. The tree root is not visible.

        input - the tree view input
        the top level items
      • getChildren

        Object[] getChildren​(Object obj)
        Gets the children for the given object.

        This method is used to populate the nested branches of the tree.

        obj - the object
        the children or null if no children are supported