|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CodeFoldingModel
The interface that defines the data model for a code editor that supports collapsible source code blocks.
Method Summary | |
---|---|
void |
addCodeFoldingModelListener(CodeFoldingModelListener listener)
Adds a listener for changes to the data model. |
java.lang.String |
getAbbreviatedText(java.lang.Object block)
Returns the abbreviated text to be used in place of the specified folding block when the block is collapsed. |
java.util.Iterator |
getChildren(java.lang.Object block)
Returns an Iterator over the children of the specified
folding block. |
java.lang.Object[] |
getCollapsedBlocks()
Returns the set of all collapsed blocks in the model; any collapsed block that also has a collapsed ancestor must be excluded from the return array. |
java.lang.Object |
getFirstBlockAtLine(int line)
Returns the first collapsible source code block at the specified line. |
java.lang.Object |
getParent(java.lang.Object block)
Returns the parent block for the specified folding block. |
java.lang.Object |
getRoot()
Returns the root block in the data model. |
java.lang.Object |
getSmallestEnclosingBlock(int offset)
Returns the smallest collapsible source code block that contains the specified character offset. |
int[] |
getTextOffsets(java.lang.Object block,
int[] offsets)
Stores the start and end character offsets of the specified block into the specified two-element integer array, and returns that array; if the specified array is null , a new array is allocated. |
java.lang.String |
getToolTipText(java.lang.Object block)
Returns the tooltip text to display when the mouse is hovering over the specified source code block and the block is collapsed. |
boolean |
isExpanded(java.lang.Object block)
Returns whether the specified folding block is expanded. |
void |
readLock()
Acquires a read lock on the model. |
void |
readUnlock()
Releases the previously acquired read lock on the model. |
void |
removeCodeFoldingModelListener(CodeFoldingModelListener listener)
Removes a listener from the data model. |
void |
setExpanded(java.lang.Object block,
boolean isExpanded)
Sets whether the specified folding block should be expanded. |
Method Detail |
---|
void readLock()
void readUnlock()
java.lang.Object getRoot()
The client must acquire a lock on the model before calling this method.
null
if there is no root
block in the modeljava.util.Iterator getChildren(java.lang.Object block)
Iterator
over the children of the specified
folding block. The return value may not be null
; if the
block contains no children, an empty Iterator
should be
returned.
The client must acquire a lock on the model before calling this method.
block
- the parent folding block from this data source
null
.java.lang.Object getParent(java.lang.Object block)
The client must acquire a lock on the model before calling this method.
block
- the child folding block from this data source
null
if the specified
block is the rootjava.lang.Object getSmallestEnclosingBlock(int offset)
The client must acquire a lock on the model before calling this method.
offset
- the target character offset
null
if the model is empty or the offset is
invalidjava.lang.Object getFirstBlockAtLine(int line)
The client must acquire a lock on the model before calling this method.
line
- the target line
null
if the model is empty or the offset is invalidjava.lang.Object[] getCollapsedBlocks()
The client must acquire a lock on the model before calling this method.
null
int[] getTextOffsets(java.lang.Object block, int[] offsets)
null
, a new array is allocated.
The client must acquire a lock on the model before calling this method.
block
- a folding block from this data sourceoffsets
- a two-element integer array; if null
,
a new array is allocated
java.lang.String getToolTipText(java.lang.Object block)
The client must acquire a lock on the model before calling this method.
block
- the target source code block
java.lang.String getAbbreviatedText(java.lang.Object block)
The client must acquire a lock on the model before calling this method.
block
- a folding block from this data source
boolean isExpanded(java.lang.Object block)
This method may be called without acquiring a lock on the model.
block
- a folding block from this data source
true
if the folding block is expandedvoid setExpanded(java.lang.Object block, boolean isExpanded)
This method may be called without acquiring a lock on the model.
block
- a folding block from this data sourceisExpanded
- true
if the folding block should
be expandedvoid addCodeFoldingModelListener(CodeFoldingModelListener listener)
This method may be called without acquiring a lock on the model.
listener
- the listener to addvoid removeCodeFoldingModelListener(CodeFoldingModelListener listener)
This method may be called without acquiring a lock on the model.
listener
- the listener to remove
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |