public class GTreeState extends java.lang.ObjectA class to remember the current state of the tree, for things like expanded paths, selected paths and the view location.
This class is used to restore state for uses so that updates to the tree do not cause the user to lose their spot.
- If the number of expanded items is too large, then the tree will spend a large amount of time restoring, thus we limit the size of the expanded paths
- If we have to trim the number of items we remember, we need to do so intelligently so that the user experience seems natural (for example, when trimming what to keep, be sure to first keep what is visible to the user, versus expanded/selected items that are scrolled off the top of the view.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getViewPaths()Returns the top few paths that are visible in the view.
public java.util.List<javax.swing.tree.TreePath> getExpandedPaths()
public java.util.List<javax.swing.tree.TreePath> getSelectedPaths()
public javax.swing.tree.TreePath getViewPaths()Returns the top few paths that are visible in the view.
- the top few paths that are visible in the view.
public void updateStateForMovedNodes()
public boolean isEmpty()
public java.lang.String toString()