Method Summary |
|
public void | addFoldHierarchyListener(FoldHierarchyListener l) Add listener for changes done in the hierarchy. |
public void | collapse(Fold f) Collapse the given fold. |
public void | collapse(Collection c) Collapse all the folds contained in the given collection.
Note: The hierarchy must be locked prior using of this method.
Parameters: c - collection of the Folds to be collapsed. |
public void | expand(Fold f) Expand the given fold. |
public void | expand(Collection c) Expand all the folds contained in the given collection.
Note: The hierarchy must be locked prior using of this method.
Parameters: c - collection of the Folds to be collapsed. |
public static synchronized FoldHierarchy | get(JTextComponent component) Get the fold hierarchy for the given component. |
public JTextComponent | getComponent() Get the text component for which this fold hierarchy was created. |
public Fold | getRootFold() Get the root fold of this hierarchy. |
public void | lock() Lock the hierarchy for exclusive use. |
public void | removeFoldHierarchyListener(FoldHierarchyListener l) Remove previously added listener for changes done in the hierarchy. |
public void | render(Runnable r) Execute the given runnable over the exclusively locked hierarchy.
Prior using this method the document must be locked.
The document lock can be either readlock
e.g. |
public String | toString() Get a string description of the hierarchy for debugging purposes. |
public void | toggle(Fold f) Collapse the given fold if it's expanded and expand it if it's
collapsed. |
public void | unlock() Unlock the hierarchy from exclusive use. |