Package | Description |
---|---|
org.netbeans.api.editor.fold | |
org.netbeans.spi.editor.fold |
Modifier and Type | Method and Description |
---|---|
static Fold[] |
FoldUtilities.childrenToArray(Fold fold)
Return children of the given fold as array.
|
static Fold[] |
FoldUtilities.childrenToArray(Fold fold,
int index,
int count)
Return children of the given fold as array.
|
static Fold |
FoldUtilities.findCollapsedFold(FoldHierarchy hierarchy,
int startOffset,
int endOffset)
Find a first collapsed fold by going from top-level folds to more nested ones
within the requested bounds.
|
static Fold |
FoldUtilities.findNearestFold(FoldHierarchy hierarchy,
int offset)
Find the fold nearest to the given offset.
|
static Fold |
FoldUtilities.findOffsetFold(FoldHierarchy hierarchy,
int offset)
Find a deepest fold in the hierarchy which contains the offset
or has it as one of its boundaries.
|
Fold |
FoldHierarchyEvent.getAddedFold(int addedFoldIndex)
Get the fold with the given index added
to the hierarchy.
|
Fold |
FoldStateChange.getFold()
Get the fold that has changed its state.
|
Fold |
Fold.getFold(int index)
Get child fold of this fold at the given index.
|
Fold |
Fold.getParent()
Get parent fold of this fold.
|
Fold |
FoldHierarchyEvent.getRemovedFold(int removedFoldIndex)
Get the fold with the given index removed
from the fold hierarchy.
|
Fold |
FoldHierarchy.getRootFold()
Get the root fold of this hierarchy.
|
Modifier and Type | Method and Description |
---|---|
static List |
FoldUtilities.childrenAsList(Fold fold)
Return children of the given fold as modifiable list.
|
static List |
FoldUtilities.childrenAsList(Fold fold,
int index,
int count)
Return children of the given fold as list.
|
static Fold[] |
FoldUtilities.childrenToArray(Fold fold)
Return children of the given fold as array.
|
static Fold[] |
FoldUtilities.childrenToArray(Fold fold,
int index,
int count)
Return children of the given fold as array.
|
void |
FoldHierarchy.collapse(Fold f)
Collapse the given fold.
|
static boolean |
FoldUtilities.containsOffset(Fold fold,
int offset)
Check whether fold contains the given offset.
|
void |
FoldHierarchy.expand(Fold f)
Expand the given fold.
|
static List |
FoldUtilities.find(Fold fold,
Collection foldTypes)
Find direct subfolds of the given fold having any
of the fold types in the given collection.
|
static List |
FoldUtilities.find(Fold fold,
FoldType foldType)
Find direct subfolds of the given fold having certain type.
|
static int |
FoldUtilities.findFoldEndIndex(Fold fold,
int offset)
Find index of the first child of the given fold that ends
above the given offset ("contains" the offset).
|
static int |
FoldUtilities.findFoldStartIndex(Fold fold,
int offset)
Find index of the child of the given fold that
starts right at or below the given offset.
|
static List |
FoldUtilities.findRecursive(Fold fold)
Collect all children of the given fold recursively.
|
static List |
FoldUtilities.findRecursive(Fold fold,
Collection foldTypes)
Recursively find any subfolds of the given fold having any
of the fold types in the given collection.
|
static List |
FoldUtilities.findRecursive(Fold fold,
FoldType foldType)
Recursively find any subfolds of the given fold having certain type.
|
int |
Fold.getFoldIndex(Fold child)
Get index of the given child fold in this fold.
|
static boolean |
FoldUtilities.isEmpty(Fold fold)
Check whether the starting offset of the fold is the same like
its ending offset.
|
static boolean |
FoldUtilities.isRootFold(Fold fold)
Is the given fold a root fold?
|
void |
FoldHierarchy.toggle(Fold f)
Collapse the given fold if it's expanded and expand it if it's
collapsed.
|
Modifier and Type | Method and Description |
---|---|
Fold |
FoldOperation.addToHierarchy(FoldType type,
int startOffset,
int endOffset,
Boolean collapsed,
FoldTemplate template,
String displayOverride,
Object extraInfo,
FoldHierarchyTransaction transaction)
Adds a fold to the hierarchy.
|
Fold |
FoldOperation.addToHierarchy(FoldType type,
String description,
boolean collapsed,
int startOffset,
int endOffset,
int startGuardedLength,
int endGuardedLength,
Object extraInfo,
FoldHierarchyTransaction transaction)
Deprecated.
please use
FoldOperation.addToHierarchy(org.netbeans.api.editor.fold.FoldType, int, int, java.lang.Boolean, org.netbeans.api.editor.fold.FoldTemplate, java.lang.String, java.lang.Object, org.netbeans.spi.editor.fold.FoldHierarchyTransaction) .
This form of call does not support automatic state assignment and fold templates. |
Modifier and Type | Method and Description |
---|---|
void |
FoldManager.expandNotify(Fold expandedFold)
Notify that the fold was expanded automatically
by fold hierarchy infrastructure processing
because its
isExpandNecessary()
return true. |
Object |
FoldOperation.getExtraInfo(Fold fold)
Return extra info object passed to fold at time of its creation.
|
boolean |
FoldOperation.isAddedOrBlocked(Fold fold)
Check whether the fold is currently present in the hierarchy or blocked.
|
boolean |
FoldOperation.isBlocked(Fold fold)
Is the given fold blocked by another fold?
|
boolean |
FoldOperation.isEndDamaged(Fold fold)
Check whether the ending guarded area of the fold
is damaged by a document modification.
|
boolean |
FoldOperation.isStartDamaged(Fold fold)
Check whether the starting guarded area of the fold
is damaged by a document modification.
|
boolean |
FoldOperation.owns(Fold fold)
Check whether this fold operation has produced the given fold.
|
CharSequence |
ContentReader.read(Document d,
Fold f,
FoldTemplate ft)
Acquires text for fold content.
|
void |
FoldManager.removeDamagedNotify(Fold damagedFold)
Notify that the fold was removed from hierarchy automatically
by fold hierarchy infrastructure processing
because it was damaged by a document modification.
|
void |
FoldManager.removeEmptyNotify(Fold epmtyFold)
Notify that the fold was removed from hierarchy automatically
by fold hierarchy infrastructure processing
because it became empty (by a document modification).
|
void |
FoldOperation.removeFromHierarchy(Fold fold,
FoldHierarchyTransaction transaction)
Remove the fold that is either present in the hierarchy or blocked
by another fold.
|