本文整理汇总了Java中org.pentaho.ui.xul.swt.SwtXulLoader.setSettingsManager方法的典型用法代码示例。如果您正苦于以下问题:Java SwtXulLoader.setSettingsManager方法的具体用法?Java SwtXulLoader.setSettingsManager怎么用?Java SwtXulLoader.setSettingsManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.ui.xul.swt.SwtXulLoader
的用法示例。
在下文中一共展示了SwtXulLoader.setSettingsManager方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public static FileOverwriteDialogController getInstance(Shell shell, List<UIRepositoryObject> objects) {
try {
SwtXulLoader swtLoader = new SwtXulLoader();
swtLoader.setOuterContext(shell);
swtLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
XulDomContainer container = swtLoader.loadXul("org/pentaho/di/ui/repository/repositoryexplorer/xul/file-overwrite-dialog.xul", resourceBundle); //$NON-NLS-1$
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: initializeXul
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
private void initializeXul() throws XulException {
SwtXulLoader loader = new SwtXulLoader();
loader.registerClassLoader(getClass().getClassLoader());
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
loader.setOuterContext(parentShell);
container = loader.loadXul( xulFile, new XulSpoonResourceBundle(getClassForMessages()));
bf.setDocument(container.getDocumentRoot());
for(XulEventHandler h : getEventHandlers()){
container.addEventHandler(h);
}
runner = new SwtXulRunner();
runner.addContainer(container);
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
dialogShell = (Shell) xulDialog.getRootObject();
runner.initialize();
}
示例3: open
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public void open() {
try {
SwtXulLoader theLoader = new SwtXulLoader();
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);
}
}
示例4: open
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public void open(boolean isAcceptButtonHidden) {
try {
SwtXulLoader theLoader = new SwtXulLoader();
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);
}
}
示例5: initDialogController
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
/**
* Initializes a dialog using the specified xul document and dialog id. If
* an event handler is not provided the dialog class will be added as an
* event handler
* @param xulPath Path to the XUL document
* @param dialogId Id of the dialog to create
* @param eventHandler Optional event handler to register
* @param perspective Optional perspective to load
* @throws XulException
*/
public void initDialogController( String xulPath, String dialogId, XulEventHandler eventHandler, String perspective ) throws XulException {
SwtXulLoader loader = new SwtXulLoader();
loader.registerClassLoader(getClass().getClassLoader());
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
loader.setOuterContext(shell);
container = loader.loadXul( xulPath );
if( eventHandler != null ) {
container.addEventHandler(eventHandler);
} else {
container.addEventHandler(this);
}
runner = new SwtXulRunner();
runner.addContainer(container);
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement().getElementById( dialogId );
swtDialog = (Composite) container.getDocumentRoot().getRootElement().getElementById( dialogId ).getManagedObject();
runner.initialize();
if( perspective != null ) {
container.loadPerspective( perspective );
}
}
示例6: open
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public boolean open() {
try {
SwtXulLoader theLoader = new SwtXulLoader();
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);
theExplorerDialog.show();
} catch (Exception e) {
logger.info(e);
e.printStackTrace();
}
return this.controller.getSelectedTable() != null;
}