public class ListLevel
extends java.lang.Object
implements java.lang.Cloneable
You do not create objects of this class. List level objects are created automatically when a list is created. You access ListLevel objects via the ListLevelCollection collection.
Use the properties of ListLevel to specify list formatting for individual list levels.
| Modifier and Type | Method and Description |
|---|---|
void |
clearRunAttrs() |
void |
createPictureBullet()
Creates picture bullet shape for the current list level.
|
void |
deletePictureBullet()
Deletes picture bullet for the current list level.
|
boolean |
equals(ListLevel level)
Compares with the specified ListLevel.
|
java.lang.Object |
fetchInheritedRunAttr(int key) |
int |
getAlignment()
Gets the justification of the actual number of the list item.
|
java.lang.String |
getCustomNumberStyleFormat()
Gets the custom number style format for this list level.
|
java.lang.Object |
getDirectRunAttr(int key) |
static java.lang.String |
getEffectiveValue(int index,
int numberStyle,
java.lang.String customNumberStyleFormat) |
Font |
getFont()
Specifies character formatting used for the list label.
|
ImageData |
getImageData()
Returns image data of the picture bullet shape for the current list level.
|
Style |
getLinkedStyle()
Gets the paragraph style that is linked to this list level.
|
java.lang.String |
getNumberFormat()
Gets the number format for the list level.
|
double |
getNumberPosition()
Gets the position (in points) of the number or bullet for the list level.
|
int |
getNumberStyle()
Gets the number style for this list level.
|
int |
getRestartAfterLevel()
Gets the list level that must appear before the specified list level restarts numbering.
|
int |
getStartAt()
Gets the starting number for this list level.
|
double |
getTabPosition()
Gets the tab position (in points) for the list level.
|
double |
getTextPosition()
Gets the position (in points) for the second line of wrapping text for the list level.
|
int |
getTrailingCharacter()
Gets the character inserted after the number for the list level.
|
int |
hashCode() |
boolean |
isLegal()
True if the level turns all inherited numbers to Arabic, false if it preserves their number style.
|
void |
isLegal(boolean value)
True if the level turns all inherited numbers to Arabic, false if it preserves their number style.
|
protected java.lang.Object |
memberwiseClone() |
void |
removeRunAttr(int key) |
void |
setAlignment(int value)
Sets the justification of the actual number of the list item.
|
void |
setLinkedStyle(Style value)
Sets the paragraph style that is linked to this list level.
|
void |
setNumberFormat(java.lang.String value)
Sets the number format for the list level.
|
void |
setNumberPosition(double value)
Sets the position (in points) of the number or bullet for the list level.
|
void |
setNumberStyle(int value)
Sets the number style for this list level.
|
void |
setRestartAfterLevel(int value)
Sets the list level that must appear before the specified list level restarts numbering.
|
void |
setRunAttr(int key,
java.lang.Object value) |
void |
setStartAt(int value)
Sets the starting number for this list level.
|
void |
setTabPosition(double value)
Sets the tab position (in points) for the list level.
|
void |
setTextPosition(double value)
Sets the position (in points) for the second line of wrapping text for the list level.
|
void |
setTrailingCharacter(int value)
Sets the character inserted after the number for the list level.
|
public void createPictureBullet()
throws java.lang.Exception
getImageData().java.lang.Exceptionpublic void deletePictureBullet()
public static java.lang.String getEffectiveValue(int index,
int numberStyle,
java.lang.String customNumberStyleFormat)
public boolean equals(ListLevel level)
public int hashCode()
hashCode in class java.lang.Objectpublic int getStartAt()
Default value is 1.
public void setStartAt(int value)
Default value is 1.
value - The starting number for this list level.public int getNumberStyle()
NumberStyle constants.public void setNumberStyle(int value)
value - The number style for this list level. The value must be one of NumberStyle constants.public java.lang.String getCustomNumberStyleFormat()
public java.lang.String getNumberFormat()
Among normal text characters, the string can contain placeholder characters \x0000 to \x0008 representing the numbers from the corresponding list levels.
For example, the string "\x0000.\x0001)" will generate a list label that looks something like "1.5)". The number "1" is the current number from the 1st list level, the number "5" is the current number from the 2nd list level.
Null is not allowed, but an empty string meaning no number is valid.
public void setNumberFormat(java.lang.String value)
Among normal text characters, the string can contain placeholder characters \x0000 to \x0008 representing the numbers from the corresponding list levels.
For example, the string "\x0000.\x0001)" will generate a list label that looks something like "1.5)". The number "1" is the current number from the 1st list level, the number "5" is the current number from the 2nd list level.
Null is not allowed, but an empty string meaning no number is valid.
value - The number format for the list level.public int getAlignment()
The list label is justified relative to the getNumberPosition() / setNumberPosition(double) property.
ListLevelAlignment constants.public void setAlignment(int value)
The list label is justified relative to the getNumberPosition() / setNumberPosition(double) property.
value - The justification of the actual number of the list item. The value must be one of ListLevelAlignment constants.public boolean isLegal()
boolean value.public void isLegal(boolean value)
value - The corresponding boolean value.public int getRestartAfterLevel()
The value of -1 means the numbering will continue.
public void setRestartAfterLevel(int value)
The value of -1 means the numbering will continue.
value - The list level that must appear before the specified list level restarts numbering.public int getTrailingCharacter()
ListTrailingCharacter constants.public void setTrailingCharacter(int value)
value - The character inserted after the number for the list level. The value must be one of ListTrailingCharacter constants.public Font getFont()
Font value.public double getTabPosition()
Has effect only when getTrailingCharacter() / setTrailingCharacter(int) is a tab.
getNumberPosition(),
setNumberPosition(double),
getTextPosition(),
setTextPosition(double)public void setTabPosition(double value)
Has effect only when getTrailingCharacter() / setTrailingCharacter(int) is a tab.
value - The tab position (in points) for the list level.getNumberPosition(),
setNumberPosition(double),
getTextPosition(),
setTextPosition(double)public double getNumberPosition()
getNumberPosition() / setNumberPosition(double) corresponds to LeftIndent plus FirstLineIndent of the paragraph.
getTextPosition(),
setTextPosition(double),
getTabPosition(),
setTabPosition(double)public void setNumberPosition(double value)
getNumberPosition() / setNumberPosition(double) corresponds to LeftIndent plus FirstLineIndent of the paragraph.
value - The position (in points) of the number or bullet for the list level.getTextPosition(),
setTextPosition(double),
getTabPosition(),
setTabPosition(double)public double getTextPosition()
getTextPosition() / setTextPosition(double) corresponds to LeftIndent of the paragraph.
getNumberPosition(),
setNumberPosition(double),
getTabPosition(),
setTabPosition(double)public void setTextPosition(double value)
getTextPosition() / setTextPosition(double) corresponds to LeftIndent of the paragraph.
value - The position (in points) for the second line of wrapping text for the list level.getNumberPosition(),
setNumberPosition(double),
getTabPosition(),
setTabPosition(double)public Style getLinkedStyle()
This property is null when the list level is not linked to a paragraph style. This property can be set to null.
public void setLinkedStyle(Style value)
This property is null when the list level is not linked to a paragraph style. This property can be set to null.
value - The paragraph style that is linked to this list level.public ImageData getImageData()
createPictureBullet() method first.public java.lang.Object getDirectRunAttr(int key)
public java.lang.Object fetchInheritedRunAttr(int key)
public void setRunAttr(int key,
java.lang.Object value)
public void removeRunAttr(int key)
public void clearRunAttrs()
protected java.lang.Object memberwiseClone()