Package com.itextpdf.layout.element
Class TabStop
java.lang.Object
com.itextpdf.layout.element.TabStop
A TabStop is the closest location on a line of text that the text will jump to if a
Tab
is inserted. At least one TabStop must be defined on an element if you want to use Tabs
. This object can be added to a Paragraph
with the method Paragraph.addTabStops(com.itextpdf.layout.element.TabStop...)
.
-
Constructor Summary
ConstructorDescriptionTabStop
(float tabPosition) Creates a TabStop at the appropriate position.TabStop
(float tabPosition, TabAlignment tabAlignment) Creates a TabStop at the appropriate position, with a specified tab alignment.TabStop
(float tabPosition, TabAlignment tabAlignment, ILineDrawer tabLeader) Creates a TabStop at the appropriate position, with a specified tab alignment and an explicitly given line pattern. -
Method Summary
Modifier and TypeMethodDescriptionReturns the alignment of a tab stop, which defines the way the textual content should be positioned in regard to this tab stop.Returns the anchor of a tab stop.Returns the tab leader of a tab stop, which defines a pattern that should be repeated until the TabStop is reached.float
Returns the position of a tab stop.void
setTabAlignment
(TabAlignment tabAlignment) Sets the alignment, which defines the way the textual content should be positioned in regard to this tab stop.void
setTabAnchor
(Character tabAnchor) Sets the anchor of a tab stop.void
setTabLeader
(ILineDrawer tabLeader) Sets the tab leader of a tab stop, which defines a pattern that should be repeated until the TabStop is reached.
-
Constructor Details
-
TabStop
public TabStop(float tabPosition) Creates a TabStop at the appropriate position.- Parameters:
-
tabPosition
- afloat
, measured in absolute points
-
TabStop
Creates a TabStop at the appropriate position, with a specified tab alignment. A tab alignment defines the way the textual content should be positioned with regards to this tab stop.- Parameters:
-
tabPosition
- afloat
, measured in absolute points -
tabAlignment
- aTabAlignment
value
-
TabStop
Creates a TabStop at the appropriate position, with a specified tab alignment and an explicitly given line pattern. A tab alignment defines the way the textual content should be positioned with regards to this tab stop. The line pattern defines a pattern that should be repeated until the TabStop is reached. If null, the space leading up to the TabStop will be empty.- Parameters:
-
tabPosition
- afloat
, measured in absolute points -
tabAlignment
- aTabAlignment
value -
tabLeader
- theILineDrawer
value, a pattern drawing object
-
-
Method Details
-
getTabPosition
public float getTabPosition()Returns the position of a tab stop.- Returns:
- tabPosition, measured in absolute points
-
getTabAlignment
Returns the alignment of a tab stop, which defines the way the textual content should be positioned in regard to this tab stop.- Returns:
-
a
TabAlignment
value
-
setTabAlignment
Sets the alignment, which defines the way the textual content should be positioned in regard to this tab stop.- Parameters:
-
tabAlignment
- aTabAlignment
value
-
getTabAnchor
Returns the anchor of a tab stop.- Returns:
-
a
Character
value
-
setTabAnchor
Sets the anchor of a tab stop.- Parameters:
-
tabAnchor
- aCharacter
value
-
getTabLeader
Returns the tab leader of a tab stop, which defines a pattern that should be repeated until the TabStop is reached.- Returns:
-
a
ILineDrawer
value, a pattern drawing object
-
setTabLeader
Sets the tab leader of a tab stop, which defines a pattern that should be repeated until the TabStop is reached.- Parameters:
-
tabLeader
- aILineDrawer
value
-