本文整理汇总了Java中org.pentaho.ui.xul.XulRunner类的典型用法代码示例。如果您正苦于以下问题:Java XulRunner类的具体用法?Java XulRunner怎么用?Java XulRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XulRunner类属于org.pentaho.ui.xul包,在下文中一共展示了XulRunner类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.pentaho.ui.xul.XulRunner; //导入依赖的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;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:FileOverwriteDialogController.java
示例2: initializeXul
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
bf = bindingFactory;
this.runner = runner;
loader.registerClassLoader( getClass().getClassLoader() );
loader.setSettingsManager( getSettingsManager() );
loader.setOuterContext( parent );
container = loader.loadXul( xulFile, getResourceBundle() );
bf.setDocument( container.getDocumentRoot() );
for ( XulEventHandler h : getEventHandlers() ) {
container.addEventHandler( h );
}
this.runner.addContainer( container );
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
runner.initialize();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:AbstractPreviewRowsXulDialog.java
示例3: getInstance
import org.pentaho.ui.xul.XulRunner; //导入依赖的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;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:FileOverwriteDialogController.java
示例4: initializeXul
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
bf = bindingFactory;
this.runner = runner;
loader.registerClassLoader( getClass().getClassLoader() );
loader.setSettingsManager( getSettingsManager() );
loader.setOuterContext( parent );
container = loader.loadXul( xulFile, getResourceBundle() );
bf.setDocument( container.getDocumentRoot() );
for ( XulEventHandler h : getEventHandlers() ) {
container.addEventHandler( h );
}
this.runner.addContainer( container );
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
runner.initialize();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:BaseStepGenericXulDialog.java
示例5: testAggPanel
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
@Ignore
public void testAggPanel() {
MondrianSchemaLoader loader = new MondrianSchemaLoader();
Map<Parameter, Object> parameterValues = new HashMap<Parameter, Object>();
System.out.println("CONN STR: " + connectString);
parameterValues.put(loader.getParameters().get(0), connectString);
parameterValues.put(loader.getParameters().get(1), "Sales");
Schema schema = loader.createSchema(parameterValues);
try{
UIAggregateImpl impl = new UIAggregateImpl();
impl.setName("my name");
impl.setDescription("my description");
XulDomContainer container = new SwingXulLoader().loadXul(
"org/pentaho/aggdes/ui/customDesignerPanel.xul"
);
XulRunner runner = new SwingXulRunner();
runner.addContainer(container);
container.getEventHandler("eventHandler").setData(impl);
container.getEventHandler("eventHandler").setData(schema);
runner.initialize();
runner.start();
} catch(Exception e){
System.out.println(e.getMessage());
e.printStackTrace(System.out);
}
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:34,代码来源:AggregatePanelIT.java
示例6: GitPerspective
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
public GitPerspective() throws XulException {
// Loading Xul Document
KettleXulLoader loader = new KettleXulLoader();
loader.registerClassLoader( getClass().getClassLoader() );
container = loader.loadXul( "org/pentaho/di/git/spoon/xul/git_perspective.xul", resourceBundle );
// Adding Event Handlers
controller = new GitController();
gitSpoonMenuController = new GitSpoonMenuController();
gitSpoonMenuController.setGitController( controller );
container.addEventHandler( controller );
container.addEventHandler( gitSpoonMenuController );
final XulRunner runner = new SwtXulRunner();
runner.addContainer( container );
runner.initialize(); //calls any onload events
/*
* To make compatible with webSpoon
* Create a temporary parent for the UI and then call layout().
* A different parent will be assigned to the UI in SpoonPerspectiveManager.PerspectiveManager.performInit().
*/
SwtDeck deck = (SwtDeck) Spoon.getInstance().getXulDomContainer().getDocumentRoot().getElementById( "canvas-deck" );
box = deck.createVBoxCard();
getUI().setParent( (Composite) box.getManagedObject() );
getUI().layout();
/**
* Hack: setAccelerator 'CTRL(CMD) + D' to "Data Integration" menu
*/
int mask = 'D';
if ( System.getProperty( "KETTLE_CONTEXT_PATH" ) == null ) { // Spoon
boolean isMac = System.getProperty( "os.name" ).toLowerCase().indexOf( "mac" ) >= 0;
mask += isMac ? SWT.COMMAND : SWT.CTRL;
} else { // webSpoon
mask += SWT.CTRL;
}
int keyCode = mask;
XulMenupopup menuPopup = (XulMenupopup) Spoon.getInstance().getXulDomContainer().getDocumentRoot().getElementById( "view-perspectives-popup" );
MenuManager menuMgr = (MenuManager) menuPopup.getManagedObject();
// No guarantee that "Data Integration" gets "menuitem-0" as its ID, but looks ok so far
Stream.of( menuMgr.getItems() )
.filter( menu -> menu.getId().equals( "menuitem-0" ) ).findFirst().ifPresent( menu -> {
IAction action = ( (ActionContributionItem) menu ).getAction();
action.setAccelerator( keyCode );
} );
}
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:48,代码来源:GitPerspective.java
示例7: setXulRunner
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
public void setXulRunner(XulRunner xulRunner) {
this.xulRunner = xulRunner;
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:4,代码来源:UIMain.java
示例8: getRunner
import org.pentaho.ui.xul.XulRunner; //导入依赖的package包/类
protected abstract XulRunner getRunner();
开发者ID:pentaho,项目名称:mql-editor,代码行数:2,代码来源:AbstractMqlEditor.java
注:本文中的org.pentaho.ui.xul.XulRunner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论