public interface Block extends Bounded, BlockParent
Page
.
Blocks can contain Lines
and/or other Blocks (via the BlockParent
interface). Existing implementations generally will not allow a Block to contain both
Blocks and Lines.
Modifier and Type | Method and Description |
---|---|
Block |
crop(Region area)
Returns a
Block that contains only the content held by
this Block that intersects the given "query" area. |
Line |
getLine(int idx)
Returns the
Line at the given index. |
int |
getLineCnt()
Returns the number of
Line s held by this Block. |
java.util.List<? extends Line> |
getLines()
Returns a List view of the
Line s held by this Block. |
void |
pipe(OutputHandler tgt)
Sends all text events associated with this Block to the given
OutputHandler . |
Line |
removeLine(int idx)
Removes the
Line at the given index from this Block, and returns it. |
addChild, getChild, getChildCnt, removeAllChildren, removeChild, replaceChild, sortChildren
java.util.List<? extends Line> getLines()
Line
s held by this Block. The returned List is guaranteed to
offer efficient random access.int getLineCnt()
Line
s held by this Block.Line removeLine(int idx)
Removes the Line
at the given index from this Block, and returns it.
void pipe(OutputHandler tgt)
OutputHandler
.Block crop(Region area)
Block
that contains only the content held by
this Block
that intersects the given "query" area.
If all of the content held by this instance is intersected by the query area, then this
instance may be returned unchanged. If no content in this Block
intersects the query area, then an empty Block
will be
returned.