本文整理汇总了Java中org.pentaho.ui.xul.swt.SwtXulLoader.setOuterContext方法的典型用法代码示例。如果您正苦于以下问题:Java SwtXulLoader.setOuterContext方法的具体用法?Java SwtXulLoader.setOuterContext怎么用?Java SwtXulLoader.setOuterContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.ui.xul.swt.SwtXulLoader
的用法示例。
在下文中一共展示了SwtXulLoader.setOuterContext方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: preview
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public void preview() {
try {
AbstractReportDefinition element = processWizardSpecification();
SwtXulLoader theXulLoader = new SwtXulLoader();
theXulLoader.registerClassLoader(getClass().getClassLoader());
theXulLoader.setOuterContext(((XulRoot) document.getRootElement()).getRootObject());
theXulLoader.register("PRPT", "org.pentaho.agilebi.spoon.visualizations.xul.PrptViewerTag");
theXulContainer = theXulLoader.loadXul("org/pentaho/agilebi/spoon/wizard/prptPreview.xul");
theXulContainer.addEventHandler(new PreviewCloseHandler());
SwtXulRunner theRunner = new SwtXulRunner();
theRunner.addContainer(theXulContainer);
theRunner.initialize();
PrptViewerTag thePrptViewerTag = (PrptViewerTag) theXulContainer.getDocumentRoot().getElementById("prptViewer");
thePrptViewerTag.setMasterReport((MasterReport) element);
XulDialog theDialog = (XulDialog) theXulContainer.getDocumentRoot().getElementById("prpt-preview");
theDialog.show();
} catch (Exception e) {
e.printStackTrace();
logger.error("error previewing", e);
}
}
示例6: getSwtInstance
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public XulDomContainer getSwtInstance(Shell shell) throws XulException {
XulDomContainer container = null;
SwtXulLoader loader = new SwtXulLoader();
Iterable<String> keyIterable = extendedClasses.keySet();
for (Object key : keyIterable) {
loader.register((String) key, extendedClasses.get(key));
}
loader.setOuterContext(shell);
container = loader.loadXul(DIALOG_DEFINITION_FILE, Messages.getBundle());
container.initialize();
return container;
}
示例7: XulUI
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public XulUI( Shell shell, ModelerWorkspace model) throws ModelerException {
try{
SwtXulLoader loader = new SwtXulLoader();
loader.registerClassLoader(getClass().getClassLoader());
loader.setOuterContext(shell);
container = loader.loadXul("org/pentaho/agilebi/modeler/res/panel.xul", new PDIMessages(ModelerWorkspace.class)); //$NON-NLS-1$
controller = new SpoonModelerController(model);
this.meta = new ModelerEngineMeta(controller);
BindingFactory bf = new SwtBindingFactory();
bf.setDocument(container.getDocumentRoot());
container.addEventHandler(controller);
controller.setBindingFactory(bf);
controller.setWorkspaceHelper(new SpoonModelerWorkspaceHelper());
ModelerUiHelper.configureControllers(container, model, bf, controller, new ColResolverController());
runner = new SwtXulRunner();
runner.addContainer(container);
runner.initialize();
container.loadPerspective("ov1");
} catch(Exception e){
logger.info("error initializing", e);
throw new ModelerException(e);
}
}
示例8: 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 );
}
}
示例9: getSwtInstance
import org.pentaho.ui.xul.swt.SwtXulLoader; //导入方法依赖的package包/类
public XulDomContainer getSwtInstance( SwtXulLoader loader, Shell shell ) throws XulException {
XulDomContainer container = null;
Iterable<String> keyIterable = extendedClasses.keySet();
for ( Object key : keyIterable ) {
loader.register( (String) key, extendedClasses.get( key ) );
}
loader.setOuterContext( shell );
container = loader.loadXul( DIALOG_DEFINITION_FILE, Messages.getBundle() );
container.initialize();
return container;
}
示例10: 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;
}