本文整理匯總了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;
}