当前位置: 首页>>代码示例>>Java>>正文


Java ParagraphProperties类代码示例

本文整理汇总了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()));
  }
}
 
开发者ID:ames89,项目名称:clippyboard,代码行数:24,代码来源:FileExportCreator.java

示例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();
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:26,代码来源:StyleSheet.java

示例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 ),
                        "* " );
            }
        }
    }
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:36,代码来源:HWPFLister.java

示例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;
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:15,代码来源:PAPX.java

示例5: getPAP

import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
public ParagraphProperties getPAP()
{
    return _pap;
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:6,代码来源:StyleDescription.java

示例6: setPAP

import org.apache.poi.hwpf.usermodel.ParagraphProperties; //导入依赖的package包/类
@Deprecated
void setPAP(ParagraphProperties pap)
{
    _pap = pap;
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:6,代码来源:StyleDescription.java


注:本文中的org.apache.poi.hwpf.usermodel.ParagraphProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。