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


Java ExportToExcelManager类代码示例

本文整理汇总了Java中org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager的典型用法代码示例。如果您正苦于以下问题:Java ExportToExcelManager类的具体用法?Java ExportToExcelManager怎么用?Java ExportToExcelManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExportToExcelManager类属于org.insightech.er.editor.model.dbexport.excel包,在下文中一共展示了ExportToExcelManager类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createExportManager

import org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public ExportWithProgressManager createExportManager(ERDiagram diagram)
		throws Exception {
	if (this.outputFile == null || this.outputFile.trim().equals("")) {
		throw new BuildException("outputFile attribute must be set!");
	}
	if (Check.isEmpty(template) && Check.isEmpty(templateFile)) {
		throw new BuildException(
				"Either template or templateFile attribute must be set!");
	}

	this.outputFile = this.getAbsolutePath(this.outputFile);

	this.log("Output image : " + this.outputImage);
	this.log("Use logical name as sheet name : "
			+ this.useLogicalNameAsSheetName);

	ExportExcelSetting exportExcelSetting = new ExportExcelSetting();
	exportExcelSetting.setExcelOutput(this.outputFile);
	exportExcelSetting
			.setUseLogicalNameAsSheet(this.useLogicalNameAsSheetName);
	exportExcelSetting.setPutERDiagramOnExcel(this.outputImage);

	if (!Check.isEmpty(this.template)) {
		this.log("Use registered template : " + this.template);

		if ("default_en".equals(this.template)) {
			exportExcelSetting.setUsedDefaultTemplateLang("en");

		} else if ("default_ja".equals(this.template)) {
			exportExcelSetting.setUsedDefaultTemplateLang("ja");

		} else {
			exportExcelSetting.setExcelTemplate(this.template);
		}

	} else {
		this.templateFile = this.getAbsolutePath(this.templateFile);

		this.log("Use template file : " + this.templateFile);
		exportExcelSetting.setExcelTemplatePath(this.templateFile);
	}

	return new ExportToExcelManager(exportExcelSetting);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:49,代码来源:ExcelReportAntTask.java

示例2: getExportWithProgressManager

import org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager; //导入依赖的package包/类
@Override
protected ExportWithProgressManager getExportWithProgressManager(final ExportSetting exportSetting) throws Exception {

    final ExportExcelSetting exportExcelSetting = exportSetting.getExportExcelSetting();

    final String outputExcelFilePath = outputExcelFileText.getFilePath();

    // String outputImageFilePath = this.outputImageFileText.getFilePath();

    // this.outputExcelFile = new File(outputExcelFilePath);
    //
    // if (!outputExcelFile.isAbsolute()) {
    // outputExcelFile = new File(this.getProjectDir(),
    // outputExcelFilePath);
    // }
    //
    // File outputExcelDir = outputExcelFile.getParentFile();
    //
    // if (!outputExcelDir.exists()) {
    // if (!Activator.showConfirmDialog(ResourceString.getResourceString(
    // "dialog.message.create.parent.dir",
    // new String[] { outputExcelDir.getAbsolutePath() }))) {
    // throw new InputException();
    //
    // } else {
    // outputExcelDir.mkdirs();
    // }
    // }

    exportExcelSetting.setExcelOutput(outputExcelFilePath);
    // exportExcelSetting.setImageOutput(outputImageFilePath);

    exportExcelSetting.setUseLogicalNameAsSheet(useLogicalNameAsSheetNameButton.getSelection());
    exportExcelSetting.setPutERDiagramOnExcel(outputImageButton.getSelection());
    // exportExcelSetting.setCategory(this
    // .getSelectedCategory(this.categoryCombo));
    exportExcelSetting.setCategory(diagram.getCurrentCategory());
    exportExcelSetting.setOpenAfterSaved(openAfterSavedButton.getSelection());

    final int templateIndex = templateCombo.getSelectionIndex();

    String template = null;

    if (templateIndex == 0) {
        exportExcelSetting.setUsedDefaultTemplateLang("en");
    } else if (templateIndex == 1) {
        exportExcelSetting.setUsedDefaultTemplateLang("ja");
    } else {
        exportExcelSetting.setUsedDefaultTemplateLang(null);
        template = templateCombo.getText();
    }

    if (selectTemplateFromRegistryRadio.getSelection()) {
        exportExcelSetting.setExcelTemplate(template);

    } else {
        exportExcelSetting.setExcelTemplatePath(templateFileText.getFilePath());
    }

    return new ExportToExcelManager(exportExcelSetting);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:62,代码来源:ExportToExcelDialog.java

示例3: getExportWithProgressManager

import org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager; //导入依赖的package包/类
@Override
protected ExportWithProgressManager getExportWithProgressManager(
		ExportSetting exportSetting) throws Exception {

	ExportExcelSetting exportExcelSetting = exportSetting
			.getExportExcelSetting();

	String outputExcelFilePath = this.outputExcelFileText.getFilePath();

	// String outputImageFilePath = this.outputImageFileText.getFilePath();

	// this.outputExcelFile = new File(outputExcelFilePath);
	//
	// if (!outputExcelFile.isAbsolute()) {
	// outputExcelFile = new File(this.getProjectDir(),
	// outputExcelFilePath);
	// }
	//
	// File outputExcelDir = outputExcelFile.getParentFile();
	//
	// if (!outputExcelDir.exists()) {
	// if (!Activator.showConfirmDialog(ResourceString.getResourceString(
	// "dialog.message.create.parent.dir",
	// new String[] { outputExcelDir.getAbsolutePath() }))) {
	// throw new InputException();
	//
	// } else {
	// outputExcelDir.mkdirs();
	// }
	// }

	exportExcelSetting.setExcelOutput(outputExcelFilePath);
	// exportExcelSetting.setImageOutput(outputImageFilePath);

	exportExcelSetting
			.setUseLogicalNameAsSheet(this.useLogicalNameAsSheetNameButton
					.getSelection());
	exportExcelSetting.setPutERDiagramOnExcel(this.outputImageButton
			.getSelection());
	// exportExcelSetting.setCategory(this
	// .getSelectedCategory(this.categoryCombo));
	exportExcelSetting.setCategory(this.diagram.getCurrentCategory());
	exportExcelSetting.setOpenAfterSaved(this.openAfterSavedButton
			.getSelection());

	int templateIndex = this.templateCombo.getSelectionIndex();

	String template = null;

	if (templateIndex == 0) {
		exportExcelSetting.setUsedDefaultTemplateLang("en");
	} else if (templateIndex == 1) {
		exportExcelSetting.setUsedDefaultTemplateLang("ja");
	} else {
		exportExcelSetting.setUsedDefaultTemplateLang(null);
		template = this.templateCombo.getText();
	}

	if (this.selectTemplateFromRegistryRadio.getSelection()) {
		exportExcelSetting.setExcelTemplate(template);

	} else {
		exportExcelSetting.setExcelTemplatePath(this.templateFileText
				.getFilePath());
	}

	return new ExportToExcelManager(exportExcelSetting);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:69,代码来源:ExportToExcelDialog.java

示例4: createExportManager

import org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public ExportWithProgressManager createExportManager(ERDiagram diagram)
		throws Exception {
	if (this.outputFile == null || this.outputFile.trim().equals("")) {
		throw new BuildException("outputFile attribute must be set!");
	}
	if (Check.isEmpty(template) && Check.isEmpty(templateFile)) {
		throw new BuildException(
				"Either template or templateFile attribute must be set!");
	}

	this.outputFile = this.getAbsolutePath(this.outputFile);

	this.log("Output image : " + this.outputImage);
	this.log("Use logical name as sheet name : "
			+ this.useLogicalNameAsSheetName);

	ExportExcelSetting exportExcelSetting = new ExportExcelSetting();
	exportExcelSetting.setExcelOutput(this.outputFile);
	exportExcelSetting
			.setUseLogicalNameAsSheet(this.useLogicalNameAsSheetName);
	exportExcelSetting.setPutERDiagramOnExcel(this.outputImage);

	if (!Check.isEmpty(this.template)) {
		this.log("Use registered template : " + this.template);

		if ("default_en".equals(this.template)) {
			exportExcelSetting.setUsedDefaultTemplateLang("en");

		} else if ("default_ja".equals(this.template)) {
			exportExcelSetting.setUsedDefaultTemplateLang("ja");

		} else if ("default_ko".equals(this.template)) {
			exportExcelSetting.setUsedDefaultTemplateLang("ko");

		} else {
			exportExcelSetting.setExcelTemplate(this.template);
		}

	} else {
		this.templateFile = this.getAbsolutePath(this.templateFile);

		this.log("Use template file : " + this.templateFile);
		exportExcelSetting.setExcelTemplatePath(this.templateFile);
	}

	return new ExportToExcelManager(exportExcelSetting);
}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:52,代码来源:ExcelReportAntTask.java

示例5: getExportWithProgressManager

import org.insightech.er.editor.model.dbexport.excel.ExportToExcelManager; //导入依赖的package包/类
@Override
protected ExportWithProgressManager getExportWithProgressManager(
		ExportSetting exportSetting) throws Exception {

	ExportExcelSetting exportExcelSetting = exportSetting
			.getExportExcelSetting();

	String outputExcelFilePath = this.outputExcelFileText.getFilePath();

	// String outputImageFilePath = this.outputImageFileText.getFilePath();

	// this.outputExcelFile = new File(outputExcelFilePath);
	//
	// if (!outputExcelFile.isAbsolute()) {
	// outputExcelFile = new File(this.getProjectDir(),
	// outputExcelFilePath);
	// }
	//
	// File outputExcelDir = outputExcelFile.getParentFile();
	//
	// if (!outputExcelDir.exists()) {
	// if (!Activator.showConfirmDialog(ResourceString.getResourceString(
	// "dialog.message.create.parent.dir",
	// new String[] { outputExcelDir.getAbsolutePath() }))) {
	// throw new InputException();
	//
	// } else {
	// outputExcelDir.mkdirs();
	// }
	// }

	exportExcelSetting.setExcelOutput(outputExcelFilePath);
	// exportExcelSetting.setImageOutput(outputImageFilePath);

	exportExcelSetting
			.setUseLogicalNameAsSheet(this.useLogicalNameAsSheetNameButton
					.getSelection());
	exportExcelSetting.setPutERDiagramOnExcel(this.outputImageButton
			.getSelection());
	// exportExcelSetting.setCategory(this
	// .getSelectedCategory(this.categoryCombo));
	exportExcelSetting.setCategory(this.diagram.getCurrentCategory());
	exportExcelSetting.setOpenAfterSaved(this.openAfterSavedButton
			.getSelection());

	int templateIndex = this.templateCombo.getSelectionIndex();

	String template = null;

	if (templateIndex == 0) {
		exportExcelSetting.setUsedDefaultTemplateLang("en");
	} else if (templateIndex == 1) {
		exportExcelSetting.setUsedDefaultTemplateLang("ja");
	} else if (templateIndex == 2) {
		exportExcelSetting.setUsedDefaultTemplateLang("ko");
	} else {
		exportExcelSetting.setUsedDefaultTemplateLang(null);
		template = this.templateCombo.getText();
	}

	if (this.selectTemplateFromRegistryRadio.getSelection()) {
		exportExcelSetting.setExcelTemplate(template);

	} else {
		exportExcelSetting.setExcelTemplatePath(this.templateFileText
				.getFilePath());
	}

	return new ExportToExcelManager(exportExcelSetting);
}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:71,代码来源:ExportToExcelDialog.java


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