|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FoldingModel
The interface to represent the code folding information.
There is an assumption that we don't have overlapped folding spans although nested folding spans are allowed.
| Method Summary | |
|---|---|
FoldingSpan |
addFoldingSpan(int startOffset,
int endOffset,
String description)
Adds a folding span to FoldingModel. |
void |
addFoldingSpanListener(FoldingSpanListener l)
Add a listener to the list that's notified each time a change to the line marker occurs. |
void |
collapseAll()
Collapses all the foldings. |
void |
collapseFoldingSpan(FoldingSpan span)
Collapses the folding span. |
void |
expandAll()
Expands all the foldings. |
void |
expandFoldingSpan(FoldingSpan span)
Expands the folding span. |
void |
foldingSpanUpdated(FoldingSpan span)
When a folding span start or end offset, call this method to tell the folding model. |
FoldingSpanListener[] |
getFoldingSpanListeners()
Returns an array of all the FoldingSpanListeners added
to this FoldingModel with addFoldingSpanListener(). |
FoldingSpan[] |
getFoldingSpans()
Gets all the folding spans. |
boolean |
isAdjusting()
Checks if the folding model is in adjusting model. |
boolean |
isEnabled()
Checks if the folding model is enabled. |
void |
removeAllFoldingSpans()
Removes all folding spans that were added before. |
boolean |
removeFoldingSpan(FoldingSpan span)
Removes a folding span that was added before. |
void |
removeFoldingSpanListener(FoldingSpanListener l)
Remove a listener from the list that's notified each time a change to the line marker occurs. |
void |
setAdjusting(boolean adjusting)
Sets the folding model to or from the adjusting mode. |
void |
setEnabled(boolean flag)
Enables or disables this folding model. |
| Method Detail |
|---|
FoldingSpan addFoldingSpan(int startOffset,
int endOffset,
String description)
FoldingSpanEvent.FOLDING_SPAN_ADDED will be fired.
startOffset - the start offset, inclusiveendOffset - the end offset, exclusivedescription - the description of the folding span
boolean removeFoldingSpan(FoldingSpan span)
FoldingSpanEvent.FOLDING_SPAN_REMOVED will be fired if the folding span is removed
successfully.
span - the folding span
void removeAllFoldingSpans()
boolean isAdjusting()
void setAdjusting(boolean adjusting)
adjusting - the flagvoid foldingSpanUpdated(FoldingSpan span)
span - the folding spanFoldingSpan[] getFoldingSpans()
void setEnabled(boolean flag)
flag - the flagboolean isEnabled()
void expandFoldingSpan(FoldingSpan span)
span - the folding spanvoid collapseFoldingSpan(FoldingSpan span)
span - the folding spanvoid expandAll()
void collapseAll()
void addFoldingSpanListener(FoldingSpanListener l)
l - the FoldingSpanListenervoid removeFoldingSpanListener(FoldingSpanListener l)
l - the FoldingSpanListeneraddFoldingSpanListener(com.jidesoft.editor.folding.FoldingSpanListener)FoldingSpanListener[] getFoldingSpanListeners()
FoldingSpanListeners added
to this FoldingModel with addFoldingSpanListener().
FoldingSpanListeners added or an empty
array if no listeners have been added
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||