本文整理汇总了Java中org.pentaho.di.trans.steps.exceloutput.ExcelField.setFormat方法的典型用法代码示例。如果您正苦于以下问题:Java ExcelField.setFormat方法的具体用法?Java ExcelField.setFormat怎么用?Java ExcelField.setFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.steps.exceloutput.ExcelField
的用法示例。
在下文中一共展示了ExcelField.setFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInfo
import org.pentaho.di.trans.steps.exceloutput.ExcelField; //导入方法依赖的package包/类
private void getInfo(ExcelOutputMeta tfoi)
{
tfoi.setFileName( wFilename.getText() );
tfoi.setEncoding( wEncoding.getText() );
tfoi.setDoNotOpenNewFileInit(wDoNotOpenNewFileInit.getSelection() );
tfoi.setExtension( wExtension.getText() );
tfoi.setTemplateFileName( wTemplateFilename.getText() );
tfoi.setSplitEvery( Const.toInt(wSplitEvery.getText(), 0) );
tfoi.setAppend( wAppend.getSelection() );
tfoi.setHeaderEnabled( wHeader.getSelection() );
tfoi.setFooterEnabled( wFooter.getSelection() );
tfoi.setStepNrInFilename( wAddStepnr.getSelection() );
tfoi.setDateInFilename( wAddDate.getSelection() );
tfoi.setTimeInFilename( wAddTime.getSelection() );
tfoi.setDateTimeFormat(wDateTimeFormat.getText());
tfoi.setSpecifyFormat(wSpecifyFormat.getSelection());
tfoi.setAutoSizeColums(wAutoSize.getSelection());
tfoi.setAddToResultFiles( wAddToResult.getSelection() );
tfoi.setProtectSheet( wProtectSheet.getSelection() );
tfoi.setPassword( wPassword.getText() );
tfoi.setTemplateEnabled( wTemplate.getSelection() );
tfoi.setTemplateAppend( wTemplateAppend.getSelection() );
if (wSheetname.getText()!=null)
{
tfoi.setSheetname( wSheetname.getText() );
}
else
{
tfoi.setSheetname( "Sheet 1" );
}
int i;
//Table table = wFields.table;
int nrfields = wFields.nrNonEmpty();
tfoi.allocate(nrfields);
for (i=0;i<nrfields;i++)
{
ExcelField field = new ExcelField();
TableItem item = wFields.getNonEmpty(i);
field.setName( item.getText(1) );
field.setType( item.getText(2) );
field.setFormat( item.getText(3) );
tfoi.getOutputFields()[i] = field;
}
}
示例2: getInfo
import org.pentaho.di.trans.steps.exceloutput.ExcelField; //导入方法依赖的package包/类
private void getInfo(ExcelOutputMeta tfoi)
{
tfoi.setFileName( wFilename.getText() );
tfoi.setEncoding( wEncoding.getText() );
tfoi.setDoNotOpenNewFileInit(wDoNotOpenNewFileInit.getSelection() );
tfoi.setExtension( wExtension.getText() );
tfoi.setTemplateFileName( wTemplateFilename.getText() );
tfoi.setSplitEvery( Const.toInt(wSplitEvery.getText(), 0) );
tfoi.setAppend( wAppend.getSelection() );
tfoi.setHeaderEnabled( wHeader.getSelection() );
tfoi.setFooterEnabled( wFooter.getSelection() );
tfoi.setStepNrInFilename( wAddStepnr.getSelection() );
tfoi.setDateInFilename( wAddDate.getSelection() );
tfoi.setTimeInFilename( wAddTime.getSelection() );
tfoi.setUseTempFiles(wuseTempFiles.getSelection());
tfoi.setTempDirectory(wTempDirectory.getText());
tfoi.setDateTimeFormat(wDateTimeFormat.getText());
tfoi.setSpecifyFormat(wSpecifyFormat.getSelection());
tfoi.setAutoSizeColums(wAutoSize.getSelection());
tfoi.setNullIsBlank(wNullIsBlank.getSelection());
tfoi.setAddToResultFiles( wAddToResult.getSelection() );
tfoi.setCreateParentFolder(wCreateParentFolder.getSelection());
tfoi.setProtectSheet( wProtectSheet.getSelection() );
tfoi.setPassword( wPassword.getText() );
tfoi.setTemplateEnabled( wTemplate.getSelection() );
tfoi.setTemplateAppend( wTemplateAppend.getSelection() );
if (wSheetname.getText()!=null)
{
tfoi.setSheetname( wSheetname.getText() );
}
else
{
tfoi.setSheetname( "Sheet 1" );
}
int i;
//Table table = wFields.table;
int nrfields = wFields.nrNonEmpty();
tfoi.allocate(nrfields);
for (i=0;i<nrfields;i++)
{
ExcelField field = new ExcelField();
TableItem item = wFields.getNonEmpty(i);
field.setName( item.getText(1) );
field.setType( item.getText(2) );
field.setFormat( item.getText(3) );
tfoi.getOutputFields()[i] = field;
}
// Header font
tfoi.setHeaderFontName(ExcelOutputMeta.getFontNameByDesc(wHeaderFontName.getText()));
tfoi.setHeaderFontSize(wHeaderFontSize.getText());
tfoi.setHeaderFontBold(wHeaderFontBold.getSelection() );
tfoi.setHeaderFontItalic(wHeaderFontItalic.getSelection() );
tfoi.setHeaderFontUnderline(ExcelOutputMeta.getFontUnderlineByDesc(wHeaderFontUnderline.getText()));
tfoi.setHeaderFontOrientation(ExcelOutputMeta.getFontOrientationByDesc(wHeaderFontOrientation.getText()));
tfoi.setHeaderFontColor(ExcelOutputMeta.getFontColorByDesc(wHeaderFontColor.getText()));
tfoi.setHeaderBackGroundColor(ExcelOutputMeta.getFontColorByDesc(wHeaderBackGroundColor.getText()));
tfoi.setHeaderRowHeight(wHeaderRowHeight.getText());
tfoi.setHeaderAlignment(ExcelOutputMeta.getFontAlignmentByDesc(wHeaderAlignment.getText()));
tfoi.setHeaderImage(wImage.getText());
// Row font
tfoi.setRowFontName(ExcelOutputMeta.getFontNameByDesc(wRowFontName.getText()));
tfoi.setRowFontSize(wRowFontSize.getText());
tfoi.setRowFontColor(ExcelOutputMeta.getFontColorByDesc(wRowFontColor.getText()));
tfoi.setRowBackGroundColor(ExcelOutputMeta.getFontColorByDesc(wRowBackGroundColor.getText()));
}
示例3: getInfo
import org.pentaho.di.trans.steps.exceloutput.ExcelField; //导入方法依赖的package包/类
private void getInfo( ExcelOutputMeta tfoi ) {
tfoi.setFileName( wFilename.getText() );
tfoi.setEncoding( wEncoding.getText() );
tfoi.setDoNotOpenNewFileInit( wDoNotOpenNewFileInit.getSelection() );
tfoi.setExtension( wExtension.getText() );
tfoi.setTemplateFileName( wTemplateFilename.getText() );
tfoi.setSplitEvery( Const.toInt( wSplitEvery.getText(), 0 ) );
tfoi.setAppend( wAppend.getSelection() );
tfoi.setHeaderEnabled( wHeader.getSelection() );
tfoi.setFooterEnabled( wFooter.getSelection() );
tfoi.setStepNrInFilename( wAddStepnr.getSelection() );
tfoi.setDateInFilename( wAddDate.getSelection() );
tfoi.setTimeInFilename( wAddTime.getSelection() );
tfoi.setUseTempFiles( wuseTempFiles.getSelection() );
tfoi.setTempDirectory( wTempDirectory.getText() );
tfoi.setDateTimeFormat( wDateTimeFormat.getText() );
tfoi.setSpecifyFormat( wSpecifyFormat.getSelection() );
tfoi.setAutoSizeColums( wAutoSize.getSelection() );
tfoi.setNullIsBlank( wNullIsBlank.getSelection() );
tfoi.setAddToResultFiles( wAddToResult.getSelection() );
tfoi.setCreateParentFolder( wCreateParentFolder.getSelection() );
tfoi.setProtectSheet( wProtectSheet.getSelection() );
tfoi.setPassword( wPassword.getText() );
tfoi.setTemplateEnabled( wTemplate.getSelection() );
tfoi.setTemplateAppend( wTemplateAppend.getSelection() );
if ( wSheetname.getText() != null ) {
tfoi.setSheetname( wSheetname.getText() );
} else {
tfoi.setSheetname( "Sheet 1" );
}
int i;
// Table table = wFields.table;
int nrfields = wFields.nrNonEmpty();
tfoi.allocate( nrfields );
for ( i = 0; i < nrfields; i++ ) {
ExcelField field = new ExcelField();
TableItem item = wFields.getNonEmpty( i );
field.setName( item.getText( 1 ) );
field.setType( item.getText( 2 ) );
field.setFormat( item.getText( 3 ) );
//CHECKSTYLE:Indentation:OFF
tfoi.getOutputFields()[i] = field;
}
// Header font
tfoi.setHeaderFontName( ExcelOutputMeta.getFontNameByDesc( wHeaderFontName.getText() ) );
tfoi.setHeaderFontSize( wHeaderFontSize.getText() );
tfoi.setHeaderFontBold( wHeaderFontBold.getSelection() );
tfoi.setHeaderFontItalic( wHeaderFontItalic.getSelection() );
tfoi.setHeaderFontUnderline( ExcelOutputMeta.getFontUnderlineByDesc( wHeaderFontUnderline.getText() ) );
tfoi.setHeaderFontOrientation( ExcelOutputMeta.getFontOrientationByDesc( wHeaderFontOrientation.getText() ) );
tfoi.setHeaderFontColor( ExcelOutputMeta.getFontColorByDesc( wHeaderFontColor.getText() ) );
tfoi.setHeaderBackGroundColor( ExcelOutputMeta.getFontColorByDesc( wHeaderBackGroundColor.getText() ) );
tfoi.setHeaderRowHeight( wHeaderRowHeight.getText() );
tfoi.setHeaderAlignment( ExcelOutputMeta.getFontAlignmentByDesc( wHeaderAlignment.getText() ) );
tfoi.setHeaderImage( wImage.getText() );
// Row font
tfoi.setRowFontName( ExcelOutputMeta.getFontNameByDesc( wRowFontName.getText() ) );
tfoi.setRowFontSize( wRowFontSize.getText() );
tfoi.setRowFontColor( ExcelOutputMeta.getFontColorByDesc( wRowFontColor.getText() ) );
tfoi.setRowBackGroundColor( ExcelOutputMeta.getFontColorByDesc( wRowBackGroundColor.getText() ) );
}