本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}