public class TextFragmentBox extends ContentBox
Modifier and Type | Field and Description |
---|---|
int |
length
The fragment's length in characters.
|
int |
offset
The character offset at which this fragment begins.
|
Constructor and Description |
---|
TextFragmentBox(TextFlow textflow)
Creates a new TextFragmentBox for the given text flow.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsPoint(int x,
int y)
This method must be called on a block that is completely positioned and
committed.
|
int |
getAscent()
Returns the textflow's font's ascent.
|
int |
getDescent()
Returns the textflow's font's descent.
|
boolean |
isRightToLeft()
Returns
true if the bidi level is odd. |
boolean |
isTruncated()
Returns
true if the fragment should be rendered as
truncated. |
void |
setTruncated(boolean value)
Marks the fragment as having been truncated.
|
java.lang.String |
toString() |
getBaseline, getBidiLevel, requiresBidi, setBidiLevel
public int length
public int offset
public TextFragmentBox(TextFlow textflow)
textflow
- the text flowpublic boolean containsPoint(int x, int y)
FlowBox
containsPoint
in class FlowBox
x
- Xy
- Ytrue
if the FlowBox contains the pointFlowBox.containsPoint(int, int)
public int getAscent()
public int getDescent()
getDescent
in class FlowBox
FlowBox.getAscent()
public boolean isRightToLeft()
true
if the bidi level is odd. Right to left
fragments should be queried and rendered with the RLO control character
inserted in front.true
if right-to-leftpublic boolean isTruncated()
true
if the fragment should be rendered as
truncated.true
if the fragment is truncatedpublic void setTruncated(boolean value)
value
- true
if the fragment is truncatedpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.