public class FoldingRegionWindow extends java.lang.Object implements FoldRegion
EMPTY_ARRAY
BY_START_OFFSET
BY_START_OFFSET_THEN_END_OFFSET
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
documentChanged(DocumentEvent e) |
FoldRegionImpl |
getDelegate() |
Document |
getDocument()
Returns the document to which the marker belongs.
|
Editor |
getEditor() |
int |
getEndOffset()
Returns the end offset of the text range covered by the marker.
|
FoldingGroup |
getGroup() |
long |
getId() |
static FoldingRegionWindow |
getInjectedRegion(FoldRegion hostRegion) |
java.lang.String |
getPlaceholderText()
Returns the placeholder text displayed when the fold region is collapsed.
|
int |
getStartOffset()
Returns the start offset of the text range covered by the marker.
|
<T> T |
getUserData(Key<T> key) |
boolean |
isExpanded()
Checks if the fold region is currently expanded.
|
boolean |
isGreedyToLeft() |
boolean |
isGreedyToRight() |
boolean |
isGutterMarkEnabledForSingleLine() |
boolean |
isValid()
Checks if the marker has been invalidated by deleting the entire fragment of text
containing the marker.
|
<T> void |
putUserData(Key<T> key,
T value)
Add a new user data value to this object.
|
void |
setExpanded(boolean expanded)
Expands or collapses the fold region.
|
void |
setGreedyToLeft(boolean greedy)
Sets the value indicating whether the text added exactly at the beginning of the
marker should be included in the text range of the marker.
|
void |
setGreedyToRight(boolean greedy)
Sets the value indicating whether the text added exactly at the end of the
marker should be included in the text range of the marker.
|
void |
setGutterMarkEnabledForSingleLine(boolean value)
By default, gutter mark (for collapsing/expanding the region using mouse) is not shown for a folding region, if it's contained within
a single document line.
|
void |
setPlaceholderText(java.lang.String text)
Updates region's placeholder text.
|
boolean |
shouldNeverExpand()
If
true , this region is always in a collapsed state, FoldRegion.setExpanded(boolean) does nothing for it. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
areInnerHighlightersMuted, setInnerHighlightersMuted
dispose, getDocument, getEndOffset, getStartOffset, isGreedyToLeft, isGreedyToRight, isValid, setGreedyToLeft, setGreedyToRight
getUserData, putUserData
public boolean isExpanded()
FoldRegion
isExpanded
in interface FoldRegion
public void setExpanded(boolean expanded)
FoldRegion
setExpanded
in interface FoldRegion
expanded
- true if the region should be expanded, false otherwise.public java.lang.String getPlaceholderText()
FoldRegion
getPlaceholderText
in interface FoldRegion
public Editor getEditor()
getEditor
in interface FoldRegion
public FoldingGroup getGroup()
getGroup
in interface FoldRegion
public boolean shouldNeverExpand()
FoldRegion
true
, this region is always in a collapsed state, FoldRegion.setExpanded(boolean)
does nothing for it. No marker is displayed
in gutter for such a region.shouldNeverExpand
in interface FoldRegion
FoldingModelEx.createFoldRegion(int, int, String, FoldingGroup, boolean)
public FoldRegionImpl getDelegate()
public void setGutterMarkEnabledForSingleLine(boolean value)
FoldRegion
setGutterMarkEnabledForSingleLine
in interface FoldRegion
FoldRegion.isGutterMarkEnabledForSingleLine()
,
EditorSettings.setAllowSingleLogicalLineFolding(boolean)
public boolean isGutterMarkEnabledForSingleLine()
isGutterMarkEnabledForSingleLine
in interface FoldRegion
FoldRegion.setGutterMarkEnabledForSingleLine(boolean)
public void setPlaceholderText(java.lang.String text)
FoldRegion
FoldingModel.runBatchFoldingOperation(Runnable)
, like any other
operations with fold regions.setPlaceholderText
in interface FoldRegion
public static FoldingRegionWindow getInjectedRegion(FoldRegion hostRegion)
public Document getDocument()
RangeMarker
getDocument
in interface RangeMarker
public int getStartOffset()
RangeMarker
getStartOffset
in interface RangeMarker
getStartOffset
in interface Segment
public int getEndOffset()
RangeMarker
getEndOffset
in interface RangeMarker
getEndOffset
in interface Segment
public boolean isValid()
RangeMarker
isValid
in interface RangeMarker
public void setGreedyToLeft(boolean greedy)
RangeMarker
setGreedyToLeft
in interface RangeMarker
greedy
- true if text added at the beginning is included in the range, false otherwise.public void setGreedyToRight(boolean greedy)
RangeMarker
setGreedyToRight
in interface RangeMarker
greedy
- true if text added at the end is included in the range, false otherwise.public <T> T getUserData(Key<T> key)
getUserData
in interface UserDataHolder
public <T> void putUserData(Key<T> key, T value)
UserDataHolder
putUserData
in interface UserDataHolder
public void documentChanged(DocumentEvent e)
documentChanged
in interface RangeMarkerEx
public long getId()
getId
in interface RangeMarkerEx
public boolean isGreedyToRight()
isGreedyToRight
in interface RangeMarker
public boolean isGreedyToLeft()
isGreedyToLeft
in interface RangeMarker
public void dispose()
dispose
in interface RangeMarker
public java.lang.String toString()
toString
in class java.lang.Object