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


Java ExcelField.getName方法代码示例

本文整理汇总了Java中org.pentaho.di.trans.steps.exceloutput.ExcelField.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ExcelField.getName方法的具体用法?Java ExcelField.getName怎么用?Java ExcelField.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.trans.steps.exceloutput.ExcelField的用法示例。


在下文中一共展示了ExcelField.getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getData

import org.pentaho.di.trans.steps.exceloutput.ExcelField; //导入方法依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */ 
public void getData()
{
	if (input.getFileName()  != null) wFilename.setText(input.getFileName());
	wDoNotOpenNewFileInit.setSelection(input.isDoNotOpenNewFileInit());
	if (input.getExtension() != null) wExtension.setText(input.getExtension());
       if (input.getEncoding()  !=null) wEncoding.setText(input.getEncoding());
	if (input.getTemplateFileName()  != null) wTemplateFilename.setText(input.getTemplateFileName());
	
	wSplitEvery.setText(""+input.getSplitEvery());
	wAppend.setSelection(input.isAppend());
	wHeader.setSelection(input.isHeaderEnabled());
	wFooter.setSelection(input.isFooterEnabled());
	wAddDate.setSelection(input.isDateInFilename());
	wAddTime.setSelection(input.isTimeInFilename());
	
	if (input.getDateTimeFormat()!= null) wDateTimeFormat.setText( input.getDateTimeFormat() );
	wSpecifyFormat.setSelection(input.isSpecifyFormat());
	
	
	wAddToResult.setSelection(input.isAddToResultFiles());
	wAutoSize.setSelection(input.isAutoSizeColums());

	wAddStepnr.setSelection(input.isStepNrInFilename());
	wTemplate.setSelection(input.isTemplateEnabled());
	wTemplateAppend.setSelection(input.isTemplateAppend());
	if (input.getSheetname() != null) 
	{
		wSheetname.setText(input.getSheetname());
	}
	else
	{
		wSheetname.setText("Sheet1");
	}
	wProtectSheet.setSelection(input.isSheetProtected());

	EnablePassword();
	EnableTemplate();

	if (input.getPassword() != null) wPassword.setText(input.getPassword());
	log.logDebug(toString(), "getting fields info...");
	
	for (int i=0;i<input.getOutputFields().length;i++)
	{
	    ExcelField field = input.getOutputFields()[i];
	    
		TableItem item = wFields.table.getItem(i);
		if (field.getName()!=null) item.setText(1, field.getName());
		item.setText(2, field.getTypeDesc());
		if (field.getFormat()!=null) item.setText(3, field.getFormat());
	}
	
	wFields.optWidth(true);
	wStepname.selectAll();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:58,代码来源:ExcelOutputDialog.java

示例2: getData

import org.pentaho.di.trans.steps.exceloutput.ExcelField; //导入方法依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */ 
public void getData()
{
	if (input.getFileName()  != null) wFilename.setText(input.getFileName());
	wDoNotOpenNewFileInit.setSelection(input.isDoNotOpenNewFileInit());
	if (input.getExtension() != null) wExtension.setText(input.getExtension());
       if (input.getEncoding()  !=null) wEncoding.setText(input.getEncoding());
	if (input.getTemplateFileName()  != null) wTemplateFilename.setText(input.getTemplateFileName());
	wuseTempFiles.setSelection(input.isUseTempFiles());
	if (input.getTempDirectory()!= null) wTempDirectory.setText(input.getTempDirectory());
	wSplitEvery.setText(""+input.getSplitEvery());
	wAppend.setSelection(input.isAppend());
	wHeader.setSelection(input.isHeaderEnabled());
	wFooter.setSelection(input.isFooterEnabled());
	wAddDate.setSelection(input.isDateInFilename());
	wAddTime.setSelection(input.isTimeInFilename());
	
	if (input.getDateTimeFormat()!= null) wDateTimeFormat.setText( input.getDateTimeFormat() );
	wSpecifyFormat.setSelection(input.isSpecifyFormat());
	
	wCreateParentFolder.setSelection(input.isCreateParentFolder());
	wAddToResult.setSelection(input.isAddToResultFiles());
	wAutoSize.setSelection(input.isAutoSizeColums());
	wNullIsBlank.setSelection(input.isNullBlank());

	wAddStepnr.setSelection(input.isStepNrInFilename());
	wTemplate.setSelection(input.isTemplateEnabled());
	wTemplateAppend.setSelection(input.isTemplateAppend());
	if (input.getSheetname() != null) 
	{
		wSheetname.setText(input.getSheetname());
	}
	else
	{
		wSheetname.setText("Sheet1");
	}
	wProtectSheet.setSelection(input.isSheetProtected());

	EnablePassword();
	EnableTemplate();

	if (input.getPassword() != null) wPassword.setText(input.getPassword());
	if(isDebug()) logDebug("getting fields info...");
	
	for (int i=0;i<input.getOutputFields().length;i++)
	{
	    ExcelField field = input.getOutputFields()[i];
	    
		TableItem item = wFields.table.getItem(i);
		if (field.getName()!=null) item.setText(1, field.getName());
		item.setText(2, field.getTypeDesc());
		if (field.getFormat()!=null) item.setText(3, field.getFormat());
	}
	
	wFields.optWidth(true);
	
	// Header Font settings
	wHeaderFontName.setText(ExcelOutputMeta.getFontNameDesc(input.getHeaderFontName()));
	wHeaderFontSize.setText(input.getHeaderFontSize());
	wHeaderFontBold.setSelection(input.isHeaderFontBold());
	wHeaderFontItalic.setSelection(input.isHeaderFontItalic());
	wHeaderFontUnderline.setText(ExcelOutputMeta.getFontUnderlineDesc(input.getHeaderFontUnderline()));
	wHeaderFontOrientation.setText(ExcelOutputMeta.getFontOrientationDesc(input.getHeaderFontOrientation()));
	wHeaderFontColor.setText(ExcelOutputMeta.getFontColorDesc(input.getHeaderFontColor()));
	wHeaderBackGroundColor.setText(ExcelOutputMeta.getFontColorDesc(input.getHeaderBackGroundColor()));
	wHeaderRowHeight.setText(Const.NVL(input.getHeaderRowHeight(),""+ExcelOutputMeta.DEFAULT_ROW_HEIGHT));
	wHeaderAlignment.setText(ExcelOutputMeta.getFontAlignmentDesc(input.getHeaderAlignment()));
	if(input.getHeaderImage()!=null) wImage.setText(input.getHeaderImage());
	
	// Row font settings
	wRowFontName.setText(ExcelOutputMeta.getFontNameDesc(input.getRowFontName()));
	wRowFontSize.setText(input.getRowFontSize());
	wRowFontColor.setText(ExcelOutputMeta.getFontColorDesc(input.getRowFontColor()));
	wRowBackGroundColor.setText(ExcelOutputMeta.getFontColorDesc(input.getRowBackGroundColor()));
	
	
	wStepname.selectAll();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:81,代码来源:ExcelOutputDialog.java


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