本文整理汇总了Java中org.apache.poi.hwpf.usermodel.ParagraphProperties类的典型用法代码示例。如果您正苦于以下问题:Java ParagraphProperties类的具体用法?Java ParagraphProperties怎么用?Java ParagraphProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ParagraphProperties类属于org.apache.poi.hwpf.usermodel包,在下文中一共展示了ParagraphProperties类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveDoc
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
/**
* Method to save the file by parameters in doc format
*
* @param toSave The file where the information will be saved
*/
private void saveDoc(File toSave) {
try {
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("down/empty.doc"));
HWPFDocument doc = new HWPFDocument(fs);
Range range = doc.getRange();
Paragraph parContainer = range.insertAfter(new ParagraphProperties(), 0);
for (String para : paragraphs) {
parContainer.setSpacingAfter(200);
parContainer.insertAfter(para);
parContainer = range.insertAfter(new ParagraphProperties(), 0);
}
FileOutputStream fos = new FileOutputStream(toSave);
doc.write(fos);
fos.close();
} catch (Exception e) {
Logger.getGlobal().log(Level.SEVERE, e.getMessage() + "\n" + Arrays.toString(e.getStackTrace()));
}
}
示例2: getParagraphStyle
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
public ParagraphProperties getParagraphStyle( int styleIndex )
{
if ( styleIndex == NIL_STYLE )
{
return NIL_PAP;
}
if ( styleIndex >= _styleDescriptions.length )
{
return NIL_PAP;
}
if ( _styleDescriptions[styleIndex] == null )
{
return NIL_PAP;
}
if ( _styleDescriptions[styleIndex].getPAP() == null )
{
return NIL_PAP;
}
return _styleDescriptions[styleIndex].getPAP();
}
示例3: dumpParagraphLevels
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
protected void dumpParagraphLevels( ListTables listTables,
ParagraphProperties paragraph )
{
if ( paragraph.getIlfo() != 0 )
{
final LFO lfo = listTables.getLfo( paragraph.getIlfo() );
System.out.println( "PAP's LFO: " + lfo );
final LFOData lfoData = listTables.getLfoData( paragraph.getIlfo() );
System.out.println( "PAP's LFOData: " + lfoData );
if ( lfo != null )
{
final ListLevel listLevel = listTables.getLevel( lfo.getLsid(),
paragraph.getIlvl() );
System.out.println( "PAP's ListLevel: " + listLevel );
if ( listLevel.getGrpprlPapx() != null )
{
System.out.println( "PAP's ListLevel PAPX:" );
dumpSprms(
new SprmIterator( listLevel.getGrpprlPapx(), 0 ),
"* " );
}
if ( listLevel.getGrpprlPapx() != null )
{
System.out.println( "PAP's ListLevel CHPX:" );
dumpSprms(
new SprmIterator( listLevel.getGrpprlChpx(), 0 ),
"* " );
}
}
}
}
示例4: getParagraphProperties
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
@Internal
public ParagraphProperties getParagraphProperties(StyleSheet ss)
{
if(ss == null) {
// TODO Fix up for Word 6/95
return new ParagraphProperties();
}
short istd = getIstd();
ParagraphProperties baseStyle = ss.getParagraphStyle(istd);
ParagraphProperties props = ParagraphSprmUncompressor.uncompressPAP(baseStyle, getGrpprl(), 2);
return props;
}
示例5: getPAP
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
public ParagraphProperties getPAP()
{
return _pap;
}
示例6: setPAP
import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
void setPAP(ParagraphProperties pap)
{
_pap = pap;
}