Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.javatools.editor.folding
Interface FoldingBlock

All Known Implementing Classes:
AbstractFoldingBlock, DefaultFoldingBlock

public interface FoldingBlock

Defines the requirements for an object that can be used to describe a collapsible source code block in the default code folding model. It is not a requirement for code folding blocks to implement this interface; rather, it is provided as an implementation convenience when using the default code folding model.

Since:
10.1.3

Method Summary
 void add(FoldingBlock child)
          Adds the specified child block to this source code block.
 boolean bounds(int offset)
          Returns whether the specified caret offset falls inside the bounds of this source code block.
 int getChildCount()
          Returns the number of child blocks contained directly by this source code block.
 java.util.Iterator getChildren()
          Returns an iterator over the child blocks contained directly by this source code block.
 int getEndOffset()
          Returns the ending caret offset of this source code block.
 FoldingBlock getParent()
          Returns the block that contains this source code block.
 java.lang.String getReplacementText()
          Returns the abbreviated text used to represent this source code block in the code editor when the block is collapsed.
 int getStartOffset()
          Returns the starting caret offset of this source code block.
 boolean isExpanded()
          Returns whether this source code block is expanded.
 int length()
          Returns the length in characters of this source code block.
 void remove(FoldingBlock child)
          Removes the specified child block from this source code block.
 void removeAll()
          Removes all child blocks from this source code block.
 void setExpanded(boolean isExpanded)
          Sets whether this source code block is expanded.
 void setParent(FoldingBlock parent)
          Sets the block that contains this source code block.
 

Method Detail

isExpanded

boolean isExpanded()
Returns whether this source code block is expanded.

Returns:
true if the block is expanded

setExpanded

void setExpanded(boolean isExpanded)
Sets whether this source code block is expanded.

Parameters:
isExpanded - true if the block is expanded

getParent

FoldingBlock getParent()
Returns the block that contains this source code block.

Returns:
the containing block

setParent

void setParent(FoldingBlock parent)
Sets the block that contains this source code block.

Parameters:
parent - the containing block

add

void add(FoldingBlock child)
Adds the specified child block to this source code block.

Parameters:
child - the child block to add

remove

void remove(FoldingBlock child)
Removes the specified child block from this source code block.

Parameters:
child - the child block to remove

removeAll

void removeAll()
Removes all child blocks from this source code block.


getChildCount

int getChildCount()
Returns the number of child blocks contained directly by this source code block.

Returns:
the number of child blocks contained by the block

getChildren

java.util.Iterator getChildren()
Returns an iterator over the child blocks contained directly by this source code block.

Returns:
an iterator over the children of the block

getStartOffset

int getStartOffset()
Returns the starting caret offset of this source code block.

Returns:
the starting caret offset of the block

getEndOffset

int getEndOffset()
Returns the ending caret offset of this source code block.

Returns:
the ending caret offset of the block

length

int length()
Returns the length in characters of this source code block.

Returns:
the length in characters of the block

bounds

boolean bounds(int offset)
Returns whether the specified caret offset falls inside the bounds of this source code block.

Parameters:
offset - the caret offset to test
Returns:
true if the offset is inside the bounds of the block

getReplacementText

java.lang.String getReplacementText()
Returns the abbreviated text used to represent this source code block in the code editor when the block is collapsed.

Returns:
the abbreviated replacement text for the block

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.