Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.editor.fold/1 1.5.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.api.editor.fold
Class FoldHierarchyEvent

    java.lang.Object
      java.util.EventObject
          org.netbeans.api.editor.fold.FoldHierarchyEvent

All Implemented Interfaces:
  Serializable

    public final class FoldHierarchyEvent

extends EventObject

Event describing the changes done in the hierarchy.
The structural changes are described by the lists of added and removed folds.
State changes are described by a list of `FoldStateChange`s.
In addition there is a description of the offset range that was affected by the change. This is useful for the editor to recreate the affected views and repaint the affected area.

Added folds can have either collapsed or expanded initial state.

See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.EventObject
`source`

Method Summary
`Fold` | `getAddedFold(int addedFoldIndex)` Get the fold with the given index added to the hierarchy.
`int` | `getAddedFoldCount()` Get the number of folds that were added to the hierarchy.
`int` | `getAffectedEndOffset()` Get the ending offset in the offset area affected by this change.
`int` | `getAffectedStartOffset()` Get the first offset in the underlying document affected by this change.
`FoldStateChange` | `getFoldStateChange(int index)` Get the fold state change at the given index.
`int` | `getFoldStateChangeCount()` Get the number of the fold state changes contained in this event.
`Fold` | `getRemovedFold(int removedFoldIndex)` Get the fold with the given index removed from the fold hierarchy.
`int` | `getRemovedFoldCount()` Get the number of folds removed from the hierarchy.
`String` | `toString()`

Methods inherited from class java.util.EventObject
`getSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getRemovedFoldCount

    public int getRemovedFoldCount()

  Get the number of folds removed from the hierarchy.

  Returns:
    >=0 number of removed folds.

### getRemovedFold

    public Fold getRemovedFold(int removedFoldIndex)

  Get the fold with the given index removed from the fold hierarchy.

  Parameters:
    `removedFoldIndex` - >=0 and <`getRemovedFoldCount()` index of the removed fold.

### getAddedFoldCount

    public int getAddedFoldCount()

  Get the number of folds that were added to the hierarchy.

  Returns:
    >=0 number of added folds.

### getAddedFold

    public Fold getAddedFold(int addedFoldIndex)

  Get the fold with the given index added to the hierarchy.

  Parameters:
    `addedFoldIndex` - >=0 and <`getAddedFoldCount()` index of the added fold.

### getFoldStateChangeCount

    public int getFoldStateChangeCount()

  Get the number of the fold state changes contained in this event.

  Returns:
    >=0 number of fold state changes.

### getFoldStateChange

    public FoldStateChange getFoldStateChange(int index)

  Get the fold state change at the given index.

  Parameters:
    `index` - >=0 and <`getFoldStateChangeCount()` index of the fold state change.

### getAffectedStartOffset

    public int getAffectedStartOffset()

  Get the first offset in the underlying document affected by this change.

  Returns:
    >=0 first offset affected by the change.

### getAffectedEndOffset

    public int getAffectedEndOffset()

  Get the ending offset in the offset area affected by this change.

  Returns:
    >=`getAffectedStartOffset()` end of the offset area affected by the change.

### toString

    public String toString()

  Overrides:
    `toString` in class `EventObject`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.editor.fold/1 1.5.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.