Class DefaultTristateTreeModel<E>

    • Constructor Detail

      • DefaultTristateTreeModel

        public DefaultTristateTreeModel​(TreeNode<E> root)
        Creates a tristate tree with the specified note as the root.
        Parameters:
        root - the root (cannot be null).
      • DefaultTristateTreeModel

        public DefaultTristateTreeModel​(TreeNode<E> root,
                                        boolean emptyChildAsLeaf)
        Creates a tristate tree with the specified note as the root.
        Parameters:
        root - the root (cannot be null).
        emptyChildAsLeaf - whether to treat the zero size of children node as a leaf node.
    • Method Detail

      • fireTristateSelectionChanged

        protected void fireTristateSelectionChanged​(int[] path)
      • addPartialPath

        public boolean addPartialPath​(int[] path)
      • addPartialPaths

        public boolean addPartialPaths​(int[][] paths)
      • removePartialPath

        public boolean removePartialPath​(int[] path)
      • removePartialPaths

        public boolean removePartialPaths​(int[][] paths)
      • isPathPartial

        public boolean isPathPartial​(int[] path)
      • getPartialPath

        public int[] getPartialPath()
      • getPartialPaths

        public int[][] getPartialPaths()
      • clearPartial

        public void clearPartial()
      • getPartials

        public java.util.Set<E> getPartials()
        Description copied from interface: TristateModel
        Returns the current partial selection.
        Specified by:
        getPartials in interface TristateModel<E>
      • isPartial

        public boolean isPartial​(java.lang.Object child)
        Description copied from interface: TristateModel
        Returns whether the item is partially selected.
        Specified by:
        isPartial in interface TristateModel<E>
        Parameters:
        child - a data item
      • addToPartial

        public boolean addToPartial​(E child)
      • removeFromPartial

        public boolean removeFromPartial​(java.lang.Object child)