本文整理汇总了Java中org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageGeneric类的典型用法代码示例。如果您正苦于以下问题:Java CreateDatabaseWizardPageGeneric类的具体用法?Java CreateDatabaseWizardPageGeneric怎么用?Java CreateDatabaseWizardPageGeneric使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CreateDatabaseWizardPageGeneric类属于org.pentaho.di.ui.core.database.wizard包,在下文中一共展示了CreateDatabaseWizardPageGeneric类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAndRunDatabaseWizard
import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageGeneric; //导入依赖的package包/类
/**
* Shows a wizard that creates a new database connection...
* @param shell
* @param props
* @param databases
* @return DatabaseMeta when finished or null when canceled
*/
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, PropsUI props, List<DatabaseMeta> databases)
{
DatabaseMeta newDBInfo = new DatabaseMeta();
final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases);
page1.createControl(shell);
final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("ifx", props, newDBInfo);
pageifx.createControl(shell);
final CreateDatabaseWizardPageJDBC pagejdbc = new CreateDatabaseWizardPageJDBC("jdbc", props, newDBInfo);
pagejdbc.createControl(shell);
final CreateDatabaseWizardPageOCI pageoci = new CreateDatabaseWizardPageOCI("oci", props, newDBInfo);
pageoci.createControl(shell);
final CreateDatabaseWizardPageODBC pageodbc = new CreateDatabaseWizardPageODBC("odbc", props, newDBInfo);
pageodbc.createControl(shell);
final CreateDatabaseWizardPageOracle pageoracle = new CreateDatabaseWizardPageOracle("oracle", props, newDBInfo);
final CreateDatabaseWizardPageSAPR3 pageSAPR3 = new CreateDatabaseWizardPageSAPR3("SAPR3", props, newDBInfo);
pageSAPR3.createControl(shell);
final CreateDatabaseWizardPageGeneric pageGeneric = new CreateDatabaseWizardPageGeneric("generic", props, newDBInfo);
pageGeneric.createControl(shell);
final CreateDatabaseWizardPage2 page2 = new CreateDatabaseWizardPage2("2", props, newDBInfo);
page2.createControl(shell);
wizardFinished=false; // set to false for safety only
Wizard wizard = new Wizard()
{
/**
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
public boolean performFinish()
{
wizardFinished=true;
return true;
}
/**
* @see org.eclipse.jface.wizard.Wizard#canFinish()
*/
public boolean canFinish()
{
return page2.canFinish();
}
};
wizard.addPage(page1);
wizard.addPage(pageoci);
wizard.addPage(pageodbc);
wizard.addPage(pagejdbc);
wizard.addPage(pageoracle);
wizard.addPage(pageifx);
wizard.addPage(pageSAPR3);
wizard.addPage(pageGeneric);
wizard.addPage(page2);
WizardDialog wd = new WizardDialog(shell, wizard);
WizardDialog.setDefaultImage(GUIResource.getInstance().getImageWizard());
wd.setMinimumPageSize(700,400);
wd.updateSize();
wd.open();
if(!wizardFinished){
newDBInfo=null;
}
return newDBInfo;
}
示例2: createAndRunDatabaseWizard
import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPageGeneric; //导入依赖的package包/类
/**
* Shows a wizard that creates a new database connection...
* @param shell
* @param props
* @param databases
* @return DatabaseMeta when finished or null when canceled
*/
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, PropsUI props, List<DatabaseMeta> databases)
{
DatabaseMeta newDBInfo = new DatabaseMeta();
final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases);
final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("ifx", props, newDBInfo);
final CreateDatabaseWizardPageJDBC pagejdbc = new CreateDatabaseWizardPageJDBC("jdbc", props, newDBInfo);
final CreateDatabaseWizardPageOCI pageoci = new CreateDatabaseWizardPageOCI("oci", props, newDBInfo);
final CreateDatabaseWizardPageODBC pageodbc = new CreateDatabaseWizardPageODBC("odbc", props, newDBInfo);
final CreateDatabaseWizardPageOracle pageoracle = new CreateDatabaseWizardPageOracle("oracle", props, newDBInfo);
final CreateDatabaseWizardPageSAPR3 pageSAPR3 = new CreateDatabaseWizardPageSAPR3("SAPR3", props, newDBInfo);
final CreateDatabaseWizardPageGeneric pageGeneric = new CreateDatabaseWizardPageGeneric("generic", props, newDBInfo);
final CreateDatabaseWizardPage2 page2 = new CreateDatabaseWizardPage2("2", props, newDBInfo);
wizardFinished=false; // set to false for safety only
Wizard wizard = new Wizard()
{
/**
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
public boolean performFinish()
{
wizardFinished=true;
return true;
}
/**
* @see org.eclipse.jface.wizard.Wizard#canFinish()
*/
public boolean canFinish()
{
return page2.canFinish();
}
};
wizard.addPage(page1);
wizard.addPage(pageoci);
wizard.addPage(pageodbc);
wizard.addPage(pagejdbc);
wizard.addPage(pageoracle);
wizard.addPage(pageifx);
wizard.addPage(pageSAPR3);
wizard.addPage(pageGeneric);
wizard.addPage(page2);
WizardDialog wd = new WizardDialog(shell, wizard);
WizardDialog.setDefaultImage(GUIResource.getInstance().getImageWizard());
wd.setMinimumPageSize(700,400);
wd.updateSize();
wd.open();
if(!wizardFinished){
newDBInfo=null;
}
return newDBInfo;
}