Package org.eclipse.draw2d.text
Class TextFragmentBox
java.lang.Object
org.eclipse.draw2d.text.FlowBox
org.eclipse.draw2d.text.ContentBox
org.eclipse.draw2d.text.TextFragmentBox
A Geometric object for representing a TextFragment region on a line of Text.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionTextFragmentBox(TextFlow textflow) Creates a new TextFragmentBox for the given text flow.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontainsPoint(int x, int y) This method must be called on a block that is completely positioned and committed.intReturns the textflow's font's ascent.intReturns the textflow's font's descent.booleanReturnstrueif the bidi level is odd.booleanReturnstrueif the fragment should be rendered as truncated.voidsetTruncated(boolean value) Marks the fragment as having been truncated.toString()Methods inherited from class org.eclipse.draw2d.text.ContentBoxgetBaseline, getBidiLevel, requiresBidi, setBidiLevel
- 
Field Details- 
lengthpublic int lengthThe fragment's length in characters.
- 
offsetpublic int offsetThe character offset at which this fragment begins.
 
- 
- 
Constructor Details- 
TextFragmentBoxCreates a new TextFragmentBox for the given text flow.- Parameters:
- textflow- the text flow
 
 
- 
- 
Method Details- 
containsPointpublic boolean containsPoint(int x, int y) Description copied from class:FlowBoxThis method must be called on a block that is completely positioned and committed.- Specified by:
- containsPointin class- FlowBox
- Parameters:
- x- X
- y- Y
- Returns:
- trueif the FlowBox contains the point
- See Also:
 
- 
getAscentpublic int getAscent()Returns the textflow's font's ascent. The ascent is the same for all fragments in a given TextFlow.
- 
getDescentpublic int getDescent()Returns the textflow's font's descent. The descent is the same for all fragments in a given TextFlow.- Specified by:
- getDescentin class- FlowBox
- Returns:
- the descent
- See Also:
 
- 
isRightToLeftpublic boolean isRightToLeft()Returnstrueif the bidi level is odd. Right to left fragments should be queried and rendered with the RLO control character inserted in front.- Returns:
- trueif right-to-left
- Since:
- 3.1
 
- 
isTruncatedpublic boolean isTruncated()Returnstrueif the fragment should be rendered as truncated.- Returns:
- trueif the fragment is truncated
- Since:
- 3.1
 
- 
setTruncatedpublic void setTruncated(boolean value) Marks the fragment as having been truncated.- Parameters:
- value-- trueif the fragment is truncated
- Since:
- 3.1
 
- 
toString
 
-