Interface Behaviour


  • public interface Behaviour
    The Behaviour interface encapsulates the options to control lazy tree behaviour in different cases.

    All options are per Element, i.e. the behaviour may be different for different elements of the tree.

    The choice of a particular behaviour is up to the browser implementation.

    Since:
    7.0
    Author:
    Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    See Also:
    Element
    • Field Detail

      • DEFAULT_BEHAVIOUR

        static final Behaviour DEFAULT_BEHAVIOUR
        Holds the options that are applicable in most cases.
    • Method Detail

      • isOpenWhenOnlyChild

        boolean isOpenWhenOnlyChild​(@NotNull
                                    Element element)
        Returns whether the element should be opened automatically if it is the only child.

        Example:

         node A
           node B
             node C
             node D
         
        The value of this option affects whether the node B should be opened when one opens node A.
        Returns:
        whether the element should be opened automatically if it is the only child