本文整理汇总了Java中org.pentaho.di.ui.xul.KettleXulLoader.setOuterContext方法的典型用法代码示例。如果您正苦于以下问题:Java KettleXulLoader.setOuterContext方法的具体用法?Java KettleXulLoader.setOuterContext怎么用?Java KettleXulLoader.setOuterContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.xul.KettleXulLoader
的用法示例。
在下文中一共展示了KettleXulLoader.setOuterContext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.pentaho.di.ui.xul.KettleXulLoader; //导入方法依赖的package包/类
public static FileOverwriteDialogController getInstance( Shell shell, List<UIRepositoryObject> objects ) {
try {
KettleXulLoader swtLoader = new KettleXulLoader();
swtLoader.setOuterContext( shell );
swtLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
XulDomContainer container =
swtLoader.loadXul(
"org/pentaho/di/ui/repository/repositoryexplorer/xul/file-overwrite-dialog.xul", resourceBundle );
final XulRunner runner = new SwtXulRunner();
runner.addContainer( container );
FileOverwriteDialogController dialogController = new FileOverwriteDialogController( container, objects );
container.addEventHandler( dialogController );
runner.initialize();
return dialogController;
} catch ( Exception e ) {
return null;
}
}
示例2: open
import org.pentaho.di.ui.xul.KettleXulLoader; //导入方法依赖的package包/类
public void open() {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
theLoader.setOuterContext( this.shell );
this.container = theLoader.loadXul( XUL );
this.controller =
new XulPreviewRowsController( this.shell, this.databaseMeta, this.schema, this.table, this.limit );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
XulDialog thePreviewDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "previewRowsDialog" );
thePreviewDialog.show();
} catch ( Exception e ) {
logger.info( e );
}
}
示例3: open
import org.pentaho.di.ui.xul.KettleXulLoader; //导入方法依赖的package包/类
public void open( boolean isAcceptButtonHidden ) {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setOuterContext( this.shell );
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
this.container = theLoader.loadXul( XUL );
this.controller =
new XulStepFieldsController( this.shell, this.databaseMeta, this.schemaTableCombo, this.rowMeta );
this.controller.setShowAcceptButton( isAcceptButtonHidden );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
XulDialog thePreviewDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "stepFieldsDialog" );
thePreviewDialog.show();
( (SwtDialog) thePreviewDialog ).dispose();
} catch ( Exception e ) {
logger.info( e );
}
}
示例4: open
import org.pentaho.di.ui.xul.KettleXulLoader; //导入方法依赖的package包/类
public boolean open() {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
theLoader.setSettingsManager( new DefaultSettingsManager( new File( Const.getKettleDirectory()
+ Const.FILE_SEPARATOR + "xulSettings.properties" ) ) );
theLoader.setOuterContext( this.shell );
this.container = theLoader.loadXul( XUL, new XulDatabaseExplorerResourceBundle() );
XulDialog theExplorerDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "databaseExplorerDialog" );
SpoonPluginManager.getInstance().applyPluginsForContainer( "database_dialog", container );
this.controller =
new XulDatabaseExplorerController(
(Shell) theExplorerDialog.getRootObject(), this.databaseMeta, this.databases, look );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
this.controller.setSelectedSchemaAndTable( schemaName, selectedTable );
// show dialog if connection is success only.
if ( controller.getActionStatus() == UiPostActionStatus.OK ) {
theExplorerDialog.show();
}
} catch ( Exception e ) {
LogChannel.GENERAL.logError( "Error exploring database", e );
}
return this.controller.getSelectedTable() != null;
}