Class ExpandableNode
java.lang.Object
org.eclipse.jface.viewers.internal.ExpandableNode
The expandable placeholder element to be used for viewer items that represent
 an expandable tree or table element.
 
 The idea of ExpandableNode is to allow viewers to show only some
 subset of children that would otherwise all appear below parent element. The
 main purpose of this is to prevent UI freezes with viewers that can offer lot
 of elements but can't efficiently handle such amount using SWT.
 
The node consists of a parent element, list of all children of this parent and the offset to which child elements are supposed to be created and shown in the viewer.
- 
Constructor SummaryConstructorsConstructorDescriptionExpandableNode(Object[] children, int startOffSet, int limit, StructuredViewer viewer) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddElement(Object element) Client can useAbstractTableViewer.add(Object[])to add an element beyond visible range.booleanReturns true if the given element is present in the all elements.Object[]Returns original list of elements of the parent.getLabel()Returns label shown for the node in the viewer.intgetLimit()intThe viewer is supposed to show subset of original elements as children of this node up to this offset (but not including it).Object[]This method returns those children of the current node which are supposed to be not created / shown yet in the viewer.
- 
Constructor Details- 
ExpandableNode- Parameters:
- children- non null list of children
- startOffSet- first not shown item index
- limit- current child limit of the viewer
- viewer- owner of the node
 
 
- 
- 
Method Details- 
getOffsetpublic int getOffset()The viewer is supposed to show subset of original elements as children of this node up to this offset (but not including it). In other worlds, this is the index of first invisible element under this node.- Returns:
- current offset in the original list of elements
 
- 
getLimitpublic int getLimit()- Returns:
- limit value
 
- 
getRemainingElementsThis method returns those children of the current node which are supposed to be not created / shown yet in the viewer.- Returns:
- all remaining elements from original array starting with the element at offset index
 
- 
getAllElementsReturns original list of elements of the parent.- Returns:
- original list of elements of the parent
 
- 
getLabelReturns label shown for the node in the viewer.- Returns:
- label shown for the node in the viewer
 
- 
addElementClient can useAbstractTableViewer.add(Object[])to add an element beyond visible range. It must be tracked to render whenExpandableNodenode is clicked.
- 
containsReturns true if the given element is present in the all elements.- Returns:
- returns if it finds in all the elements.
 
 
-