Package org.fife.ui.rsyntaxtextarea.folding

## Class FoldCollapser

- java.lang.Object
- - org.fife.ui.rsyntaxtextarea.folding.FoldCollapser

-     public class FoldCollapser
      extends Object

  Collapses folds based on their type. You can create an instance of this class to collapse all comment blocks when opening a new file, for example.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FoldCollapser()` | Creates an instance that collapses all comment blocks.
    `FoldCollapser​(int typeToCollapse)` | Creates an instance that collapses all blocks of the specified type.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addTypeToCollapse​(int typeToCollapse)` | Adds a type of fold to collapse.
    `void` | `collapseFolds​(FoldManager fm)` | Collapses any relevant folds known by the fold manager.
    `protected void` | `collapseImpl​(Fold fold)` | Collapses the specified fold, and any of its child folds, as appropriate.
    `boolean` | `getShouldCollapse​(Fold fold)` | Returns whether a specific fold should be collapsed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FoldCollapser

          public FoldCollapser()

      Creates an instance that collapses all comment blocks.

    - #### FoldCollapser

          public FoldCollapser​(int typeToCollapse)

      Creates an instance that collapses all blocks of the specified type.
      Parameters:
        `typeToCollapse` - The type to collapse.
      See Also:
        `FoldType`

  - ### Method Detail

    - #### addTypeToCollapse

          public void addTypeToCollapse​(int typeToCollapse)

      Adds a type of fold to collapse.
      Parameters:
        `typeToCollapse` - The type of fold to collapse.

    - #### collapseFolds

          public void collapseFolds​(FoldManager fm)

      Collapses any relevant folds known by the fold manager.
      Parameters:
        `fm` - The fold manager.

    - #### collapseImpl

          protected void collapseImpl​(Fold fold)

      Collapses the specified fold, and any of its child folds, as appropriate.
      Parameters:
        `fold` - The fold to examine.
      See Also:
        `getShouldCollapse(Fold)`

    - #### getShouldCollapse

          public boolean getShouldCollapse​(Fold fold)

      Returns whether a specific fold should be collapsed.
      Parameters:
        `fold` - The fold to examine.
      Returns:
        Whether the fold should be collapsed.