Class TreeTable

    • Constructor Detail

      • TreeTable

        public TreeTable()
        Deprecated.
        Creates an empty TreeTable with a default container.
      • TreeTable

        public TreeTable​(String caption)
        Deprecated.
        Creates an empty TreeTable with a default container.
        Parameters:
        caption - the caption for the TreeTable
      • TreeTable

        public TreeTable​(String caption,
                         Container dataSource)
        Deprecated.
        Creates a TreeTable instance with given captions and data source.
        Parameters:
        caption - the caption for the component
        dataSource - the dataSource that is used to list items in the component
    • Method Detail

      • rowHeadersAreEnabled

        protected boolean rowHeadersAreEnabled()
        Deprecated.
        Description copied from class: Table
        Checks whether row headers are visible.
        Overrides:
        rowHeadersAreEnabled in class Table
        Returns:
        false if row headers are hidden, true otherwise
      • isPartialRowUpdate

        protected boolean isPartialRowUpdate()
        Deprecated.
        Description copied from class: Table
        Subclass and override this to enable partial row updates and additions, which bypass the normal caching mechanism. This is useful for e.g. TreeTable.
        Overrides:
        isPartialRowUpdate in class Table
        Returns:
        true if this update is a partial row update, false if not. For plain Table it is always false.
      • getFirstAddedItemIndex

        protected int getFirstAddedItemIndex()
        Deprecated.
        Description copied from class: Table
        Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
        Overrides:
        getFirstAddedItemIndex in class Table
        Returns:
        The index of the first added item. For plain Table it is always 0.
      • getAddedRowCount

        protected int getAddedRowCount()
        Deprecated.
        Description copied from class: Table
        Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
        Overrides:
        getAddedRowCount in class Table
        Returns:
        the number of rows to be added, starting at the index returned by Table.getFirstAddedItemIndex(). For plain Table it is always 0.
      • getFirstUpdatedItemIndex

        protected int getFirstUpdatedItemIndex()
        Deprecated.
        Description copied from class: Table
        Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism.
        Overrides:
        getFirstUpdatedItemIndex in class Table
        Returns:
        the index of the first item to be updated. For plain Table it is always 0.
      • getUpdatedRowCount

        protected int getUpdatedRowCount()
        Deprecated.
        Description copied from class: Table
        Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism.
        Overrides:
        getUpdatedRowCount in class Table
        Returns:
        the number of rows to update, starting at the index returned by Table.getFirstUpdatedItemIndex(). For plain table it is always 0.
      • setContainerDataSource

        public void setContainerDataSource​(Container newDataSource)
        Deprecated.
        Description copied from class: Table
        Sets the Container that serves as the data source of the viewer. As a side-effect the table's selection value is set to null as the old selection might not exist in new Container.

        All rows and columns are generated as visible using this method. If the new container contains properties that are not meant to be shown you should use Table.setContainerDataSource(Container, Collection) instead, especially if the table is editable.

        Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.

        Specified by:
        setContainerDataSource in interface Container.Viewer
        Overrides:
        setContainerDataSource in class Table
        Parameters:
        newDataSource - the new data source.
        See Also:
        Container.Viewer.setContainerDataSource(Container)
      • getIdByIndex

        protected Object getIdByIndex​(int index)
        Deprecated.
        Description copied from class: Table
        Returns the item ID for the item represented by the index given. Assumes that the current container implements Container.Indexed. See Container.Indexed.getIdByIndex(int) for more information about the exceptions that can be thrown.
        Overrides:
        getIdByIndex in class Table
        Parameters:
        index - the index for which the item ID should be fetched
        Returns:
        the item ID for the given index
      • indexOfId

        protected int indexOfId​(Object itemId)
        Deprecated.
        Overrides:
        indexOfId in class Table
      • areChildrenAllowed

        public boolean areChildrenAllowed​(Object itemId)
        Deprecated.
        Description copied from interface: Container.Hierarchical
        Tests if the Item with given ID can have children.
        Specified by:
        areChildrenAllowed in interface Container.Hierarchical
        Parameters:
        itemId - ID of the Item in the container whose child capability is to be tested
        Returns:
        true if the specified Item exists in the Container and it can have children, false if it's not found from the container or it can't have children.
      • getChildren

        public Collection<?> getChildren​(Object itemId)
        Deprecated.
        Description copied from interface: Container.Hierarchical
        Gets the IDs of all Items that are children of the specified Item. The returned collection is unmodifiable.
        Specified by:
        getChildren in interface Container.Hierarchical
        Parameters:
        itemId - ID of the Item whose children the caller is interested in
        Returns:
        An unmodifiable collection containing the IDs of all other Items that are children in the container hierarchy; null if item does not have any children.
      • getParent

        public Object getParent​(Object itemId)
        Deprecated.
        Description copied from interface: Container.Hierarchical
        Gets the ID of the parent Item of the specified Item.
        Specified by:
        getParent in interface Container.Hierarchical
        Parameters:
        itemId - ID of the Item whose parent the caller wishes to find out.
        Returns:
        the ID of the parent Item. Will be null if the specified Item is a root element.
      • hasChildren

        public boolean hasChildren​(Object itemId)
        Deprecated.
        Description copied from interface: Container.Hierarchical

        Tests if the Item specified with itemId has child Items or if it is a leaf. The Container.Hierarchical.getChildren(Object itemId) method always returns null for leaf Items.

        Note that being a leaf does not imply whether or not an Item is allowed to have children.

        Specified by:
        hasChildren in interface Container.Hierarchical
        Parameters:
        itemId - ID of the Item to be tested
        Returns:
        true if the specified Item has children, false if not (is a leaf)
      • isRoot

        public boolean isRoot​(Object itemId)
        Deprecated.
        Description copied from interface: Container.Hierarchical
        Tests if the Item specified with itemId is a root Item. The hierarchical container can have more than one root and must have at least one unless it is empty. The Container.Hierarchical.getParent(Object itemId) method always returns null for root Items.
        Specified by:
        isRoot in interface Container.Hierarchical
        Parameters:
        itemId - ID of the Item whose root status is to be tested
        Returns:
        true if the specified Item is a root, false if not
      • rootItemIds

        public Collection<?> rootItemIds()
        Deprecated.
        Description copied from interface: Container.Hierarchical
        Gets the IDs of all Items in the container that don't have a parent. Such items are called root Items. The returned collection is unmodifiable.
        Specified by:
        rootItemIds in interface Container.Hierarchical
        Returns:
        An unmodifiable collection containing IDs of all root elements of the container
      • setCollapsed

        public void setCollapsed​(Object itemId,
                                 boolean collapsed)
        Deprecated.
        Sets the Item specified by given identifier as collapsed or expanded. If the Item is collapsed, its children are not displayed to the user.
        Parameters:
        itemId - the identifier of the Item
        collapsed - true if the Item should be collapsed, false if expanded
      • isCollapsed

        public boolean isCollapsed​(Object itemId)
        Deprecated.
        Checks if Item with given identifier is collapsed in the UI.

        Parameters:
        itemId - the identifier of the checked Item
        Returns:
        true if the Item with given id is collapsed
        See Also:
        Collapsible.isCollapsed(Object)
      • setHierarchyColumn

        public void setHierarchyColumn​(Object hierarchyColumnId)
        Deprecated.
        Explicitly sets the column in which the TreeTable visualizes the hierarchy. If hierarchyColumnId is not set, the hierarchy is visualized in the first visible column.
        Parameters:
        hierarchyColumnId -
      • getHierarchyColumnId

        public Object getHierarchyColumnId()
        Deprecated.
        Returns:
        the identifier of column into which the hierarchy will be visualized or null if the column is not explicitly defined.
      • addExpandListener

        public void addExpandListener​(Tree.ExpandListener listener)
        Deprecated.
        Adds an expand listener.
        Parameters:
        listener - the Listener to be added.
      • removeExpandListener

        public void removeExpandListener​(Tree.ExpandListener listener)
        Deprecated.
        Removes an expand listener.
        Parameters:
        listener - the Listener to be removed.
      • fireExpandEvent

        protected void fireExpandEvent​(Object itemId)
        Deprecated.
        Emits an expand event.
        Parameters:
        itemId - the item id.
      • addCollapseListener

        public void addCollapseListener​(Tree.CollapseListener listener)
        Deprecated.
        Adds a collapse listener.
        Parameters:
        listener - the Listener to be added.
      • removeCollapseListener

        public void removeCollapseListener​(Tree.CollapseListener listener)
        Deprecated.
        Removes a collapse listener.
        Parameters:
        listener - the Listener to be removed.
      • fireCollapseEvent

        protected void fireCollapseEvent​(Object itemId)
        Deprecated.
        Emits a collapse event.
        Parameters:
        itemId - the item id.
      • isAnimationsEnabled

        public boolean isAnimationsEnabled()
        Deprecated.
        Returns:
        true if animations are enabled
      • setAnimationsEnabled

        public void setAnimationsEnabled​(boolean animationsEnabled)
        Deprecated.
        Animations can be enabled by passing true to this method. Currently expanding rows slide in from the top and collapsing rows slide out the same way. NOTE! not supported in Internet Explorer 6 or 7.
        Parameters:
        animationsEnabled - true or false whether to enable animations or not.
      • getItemIds

        protected List<Object> getItemIds​(int firstIndex,
                                          int rows)
        Deprecated.
        Overrides:
        getItemIds in class Table
      • readBody

        protected void readBody​(org.jsoup.nodes.Element design,
                                DesignContext context)
        Deprecated.
        Overrides:
        readBody in class Table
      • readItem

        protected Object readItem​(org.jsoup.nodes.Element tr,
                                  Set<String> selected,
                                  DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Reads an Item from a design and inserts it into the data source. Hierarchical select components should override this method to recursively recursively read any child items as well.
        Overrides:
        readItem in class Table
        Parameters:
        tr - a child element representing the item
        selected - A set accumulating selected items. If the item that is read is marked as selected, its item id should be added to this set.
        context - the DesignContext instance used in parsing
        Returns:
        the item id of the new item
      • writeItems

        protected void writeItems​(org.jsoup.nodes.Element design,
                                  DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Writes the data source items to a design. Hierarchical select components should override this method to only write the root items.
        Overrides:
        writeItems in class Table
        Parameters:
        design - the element into which to insert the items
        context - the DesignContext instance used in writing
      • writeItems

        protected void writeItems​(org.jsoup.nodes.Element tbody,
                                  Collection<?> itemIds,
                                  int depth,
                                  DesignContext context)
        Deprecated.
      • writeItem

        protected org.jsoup.nodes.Element writeItem​(org.jsoup.nodes.Element tbody,
                                                    Object itemId,
                                                    DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Writes a data source Item to a design. Hierarchical select components should override this method to recursively write any child items as well.
        Overrides:
        writeItem in class Table
        Parameters:
        tbody - the element into which to insert the item
        itemId - the id of the item to write
        context - the DesignContext instance used in writing
        Returns: