Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.editor.folding
Class AbstractFoldingBlock

java.lang.Object
  extended by oracle.javatools.editor.folding.AbstractFoldingBlock
All Implemented Interfaces:
FoldingBlock
Direct Known Subclasses:
DefaultFoldingBlock

public abstract class AbstractFoldingBlock
extends java.lang.Object
implements FoldingBlock

Defines common behavior for an object that describes a collapsible source code block in a code folding data model.

Since:
10.1.3

Constructor Summary
AbstractFoldingBlock()
           
 
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<FoldingBlock> getChildren()
          Returns an iterator over the child blocks contained directly by this source code block.
abstract  int getEndOffset()
          Returns the ending caret offset of this source code block.
 FoldingBlock getParent()
          Returns the block that contains this source code block.
abstract  java.lang.String getReplacementText()
          Returns the abbreviated text used to represent this source code block in the code editor when the block is collapsed.
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFoldingBlock

public AbstractFoldingBlock()
Method Detail

isExpanded

public boolean isExpanded()
Description copied from interface: FoldingBlock
Returns whether this source code block is expanded.

Specified by:
isExpanded in interface FoldingBlock
Returns:
true if the block is expanded

setExpanded

public void setExpanded(boolean isExpanded)
Description copied from interface: FoldingBlock
Sets whether this source code block is expanded.

Specified by:
setExpanded in interface FoldingBlock
Parameters:
isExpanded - true if the block is expanded

getParent

public FoldingBlock getParent()
Description copied from interface: FoldingBlock
Returns the block that contains this source code block.

Specified by:
getParent in interface FoldingBlock
Returns:
the containing block

setParent

public void setParent(FoldingBlock parent)
Description copied from interface: FoldingBlock
Sets the block that contains this source code block.

Specified by:
setParent in interface FoldingBlock
Parameters:
parent - the containing block

add

public void add(FoldingBlock child)
Description copied from interface: FoldingBlock
Adds the specified child block to this source code block.

Specified by:
add in interface FoldingBlock
Parameters:
child - the child block to add

remove

public void remove(FoldingBlock child)
Description copied from interface: FoldingBlock
Removes the specified child block from this source code block.

Specified by:
remove in interface FoldingBlock
Parameters:
child - the child block to remove

removeAll

public void removeAll()
Description copied from interface: FoldingBlock
Removes all child blocks from this source code block.

Specified by:
removeAll in interface FoldingBlock

getChildCount

public int getChildCount()
Description copied from interface: FoldingBlock
Returns the number of child blocks contained directly by this source code block.

Specified by:
getChildCount in interface FoldingBlock
Returns:
the number of child blocks contained by the block

getChildren

public java.util.Iterator<FoldingBlock> getChildren()
Description copied from interface: FoldingBlock
Returns an iterator over the child blocks contained directly by this source code block.

Specified by:
getChildren in interface FoldingBlock
Returns:
an iterator over the children of the block

length

public int length()
Description copied from interface: FoldingBlock
Returns the length in characters of this source code block.

Specified by:
length in interface FoldingBlock
Returns:
the length in characters of the block

bounds

public boolean bounds(int offset)
Description copied from interface: FoldingBlock
Returns whether the specified caret offset falls inside the bounds of this source code block.

Specified by:
bounds in interface FoldingBlock
Parameters:
offset - the caret offset to test
Returns:
true if the offset is inside the bounds of the block

getStartOffset

public abstract int getStartOffset()
Description copied from interface: FoldingBlock
Returns the starting caret offset of this source code block.

Specified by:
getStartOffset in interface FoldingBlock
Returns:
the starting caret offset of the block

getEndOffset

public abstract int getEndOffset()
Description copied from interface: FoldingBlock
Returns the ending caret offset of this source code block.

Specified by:
getEndOffset in interface FoldingBlock
Returns:
the ending caret offset of the block

getReplacementText

public abstract java.lang.String getReplacementText()
Description copied from interface: FoldingBlock
Returns the abbreviated text used to represent this source code block in the code editor when the block is collapsed.

Specified by:
getReplacementText in interface FoldingBlock
Returns:
the abbreviated replacement text for the block

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

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