HWPFListpublic class HWPFList extends Object This class is used to create a list in a Word document. It is used in
conjunction with {@link
org.apache.poi.hwpf.HWPFDocument#registerList(HWPFList) registerList} in
{@link org.apache.poi.hwpf.HWPFDocument HWPFDocument}.
In Word, lists are not ranged entities, meaning you can't actually add one
to the document. Lists only act as properties for list entries. Once you
register a list, you can add list entries to a document that are a part of
the list.
The only benefit of this that I see, is that you can add a list entry
anywhere in the document and continue numbering from the previous list. |
Fields Summary |
---|
private ListData | _listData | private ListFormatOverride | _override | private boolean | _registered | private StyleSheet | _styleSheet |
Constructors Summary |
---|
public HWPFList(boolean numbered, StyleSheet styleSheet)
_listData = new ListData((int)(Math.random() * (double)System.currentTimeMillis()), numbered);
_override = new ListFormatOverride(_listData.getLsid());
_styleSheet = styleSheet;
|
Methods Summary |
---|
public org.apache.poi.hwpf.model.ListData | getListData()
return _listData;
| public org.apache.poi.hwpf.model.ListFormatOverride | getOverride()
return _override;
| public void | setLevelNumberProperties(int level, org.apache.poi.hwpf.usermodel.CharacterProperties chp)Sets the character properties of the list numbers.
ListLevel listLevel = _listData.getLevel(level);
int styleIndex = _listData.getLevelStyle(level);
CharacterProperties base = _styleSheet.getCharacterStyle(styleIndex);
byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(chp, base);
listLevel.setNumberProperties(grpprl);
| public void | setLevelParagraphProperties(int level, org.apache.poi.hwpf.usermodel.ParagraphProperties pap)Sets the paragraph properties for a particular level of the list.
ListLevel listLevel = _listData.getLevel(level);
int styleIndex = _listData.getLevelStyle(level);
ParagraphProperties base = _styleSheet.getParagraphStyle(styleIndex);
byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(pap, base);
listLevel.setLevelProperties(grpprl);
| public void | setLevelStyle(int level, int styleIndex)
_listData.setLevelStyle(level, styleIndex);
|
|