public class TextColumnCollection
extends java.lang.Object
TextColumn objects that represent all the columns of text in a section of a document.
Use setCount(int) to set the number of text columns.
To make all columns equal width and spaced evenly, set getEvenlySpaced() / setEvenlySpaced(boolean) to true and specify the amount of space between the columns in getSpacing() / setSpacing(double). MS Word will automatically calculate column widths.
If you have EvenlySpaced set to false, you need to specify width and spacing for each column individually. Use the indexer to access individual TextColumn objects.
When using custom column widths, make sure the sum of all column widths and spacings between them equals page width minus left and right page margins.
| Modifier and Type | Method and Description |
|---|---|
TextColumn |
get(int index)
Returns a text column at the specified index.
|
int |
getCount()
Gets the number of columns in the section of a document.
|
boolean |
getEvenlySpaced()
True if text columns are of equal width and evenly spaced.
|
boolean |
getLineBetween()
When true, adds a vertical line between columns.
|
double |
getSpacing()
When columns are evenly spaced, gets or sets the amount of space between each column in points.
|
double |
getWidth()
When columns are evenly spaced, gets the width of the columns.
|
void |
setCount(int newCount)
Arranges text into the specified number of text columns.
|
void |
setEvenlySpaced(boolean value)
True if text columns are of equal width and evenly spaced.
|
void |
setLineBetween(boolean value)
When true, adds a vertical line between columns.
|
void |
setSpacing(double value)
When columns are evenly spaced, gets or sets the amount of space between each column in points.
|
public void setCount(int newCount)
When getEvenlySpaced() / setEvenlySpaced(boolean) is false and you increase the number of columns, new TextColumn objects are created with zero width and spacing. You need to set width and spacing for the new columns.
newCount - The number of columns the text is to be arranged into.public boolean getEvenlySpaced()
boolean value.public void setEvenlySpaced(boolean value)
value - The corresponding boolean value.public double getSpacing()
getEvenlySpaced() / setEvenlySpaced(boolean) is set to true.double value.public void setSpacing(double value)
getEvenlySpaced() / setEvenlySpaced(boolean) is set to true.value - The corresponding double value.public double getWidth()
Has effect only when getEvenlySpaced() / setEvenlySpaced(boolean) is set to true.
double value.public boolean getLineBetween()
boolean value.public void setLineBetween(boolean value)
value - The corresponding boolean value.public int getCount()
public TextColumn get(int index)