com.aspose.words
Class TabLeader

java.lang.Object
    extended by com.aspose.words.TabLeader

public class TabLeader 
extends java.lang.Object

Utility class containing constants. Specifies the type of the leader line displayed under the tab character.

Example:

Shows how to set custom tab stops for a paragraph.
Document doc = new Document();
Paragraph para = doc.getFirstSection().getBody().getFirstParagraph();

// If we are in a paragraph with no tab stops in this collection,
// the cursor will jump 36 points each time we press the Tab key in Microsoft Word.
Assert.assertEquals(0, doc.getFirstSection().getBody().getFirstParagraph().getEffectiveTabStops().length);

// We can add custom tab stops in Microsoft Word if we enable the ruler via the "View" tab.
// Each unit on this ruler is two default tab stops, which is 72 points.
// We can add custom tab stops programmatically like this.
TabStopCollection tabStops = doc.getFirstSection().getBody().getFirstParagraph().getParagraphFormat().getTabStops();
tabStops.add(72.0, TabAlignment.LEFT, TabLeader.DOTS);
tabStops.add(216.0, TabAlignment.CENTER, TabLeader.DASHES);
tabStops.add(360.0, TabAlignment.RIGHT, TabLeader.LINE);

// We can see these tab stops in Microsoft Word by enabling the ruler via "View" -> "Show" -> "Ruler".
Assert.assertEquals(3, para.getEffectiveTabStops().length);

// Any tab characters we add will make use of the tab stops on the ruler and may,
// depending on the tab leader's value, leave a line between the tab departure and arrival destinations.
para.appendChild(new Run(doc, "\tTab 1\tTab 2\tTab 3"));

doc.save(getArtifactsDir() + "Paragraph.TabStops.docx");

Field Summary
static final intNONE = 0
           No leader line is displayed.
static final intDOTS = 1
           The leader line is made up from dots.
static final intDASHES = 2
           The leader line is made up from dashes.
static final intLINE = 3
           The leader line is a single line.
static final intHEAVY = 4
           The leader line is a single thick line.
static final intMIDDLE_DOT = 5
           The leader line is made up from middle-dots.
 

Field Detail

NONE = 0

public static final int NONE
No leader line is displayed.

DOTS = 1

public static final int DOTS
The leader line is made up from dots.

DASHES = 2

public static final int DASHES
The leader line is made up from dashes.

LINE = 3

public static final int LINE
The leader line is a single line.

HEAVY = 4

public static final int HEAVY
The leader line is a single thick line.

MIDDLE_DOT = 5

public static final int MIDDLE_DOT
The leader line is made up from middle-dots.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.