當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。