本文整理匯總了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;
}