本文整理汇总了Java中org.pentaho.ui.xul.XulDomContainer.addEventHandler方法的典型用法代码示例。如果您正苦于以下问题:Java XulDomContainer.addEventHandler方法的具体用法?Java XulDomContainer.addEventHandler怎么用?Java XulDomContainer.addEventHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.ui.xul.XulDomContainer
的用法示例。
在下文中一共展示了XulDomContainer.addEventHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("import-rules-toolbar"); //$NON-NLS-1$
ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
swtToolbar.layout(true, true);
} catch (Throwable t) {
LogChannel.GENERAL.logError(Const.getStackTracker(t));
new ErrorDialog(shell,
BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Title"), //$NON-NLS-1$
BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Message", XUL_FILE_TOOLBAR), new Exception(t)); //$NON-NLS-1$
}
}
示例2: getInstance
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的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;
}
}
示例3: apply
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
public void apply(XulDomContainer container) throws XulException {
this.container = container;
container.registerClassLoader(getClass().getClassLoader());
for(XulEventHandler handler:handlers) {
container.addEventHandler(handler);
}
for (XulOverlay overlay : overlays) {
if(overlay instanceof RepositoryExplorerDefaultXulOverlay) {
container.loadOverlay(overlay.getOverlayUri(), new XulSpoonResourceBundle(((RepositoryExplorerDefaultXulOverlay) overlay).getPackageClass()));
} else {
container.loadOverlay(overlay.getOverlayUri(), overlay.getResourceBundleUri());
}
}
}
示例4: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_LOG_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar"); //$NON-NLS-1$
ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
swtToolbar.layout(true, true);
} catch (Throwable t) {
log.logError(Const.getStackTracker(t));
new ErrorDialog(jobLogComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR), new Exception(t)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例5: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_GRID_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar"); //$NON-NLS-1$
refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("refresh-history"); //$NON-NLS-1$
fetchNextBatchButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-next-batch-history"); //$NON-NLS-1$
fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-all-history"); //$NON-NLS-1$
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
swtToolBar.layout(true, true);
} catch (Throwable t) {
log.logError(Const.getStackTracker(t));
new ErrorDialog(jobHistoryComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR), new Exception(t)); //$NON-NLS-1$//$NON-NLS-2$
}
}
示例6: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = GlobalMessages.getBundle("org/pentaho/di/ui/spoon/messages/messages");
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_GRID_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar");
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
swtToolBar.layout(true, true);
} catch (Throwable t) {
log.logError(toString(), Const.getStackTracker(t));
new ErrorDialog(transGridComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR), new Exception(t));
}
}
示例7: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_GRID_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar"); //$NON-NLS-1$
refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("refresh-history"); //$NON-NLS-1$
fetchNextBatchButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-next-batch-history"); //$NON-NLS-1$
fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById("fetch-all-history"); //$NON-NLS-1$
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
swtToolBar.layout(true, true);
} catch (Throwable t) {
log.logError(Const.getStackTracker(t));
new ErrorDialog(transHistoryComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR), new Exception(t)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例8: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_LOG_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar"); //$NON-NLS-1$
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
swtToolBar.layout(true, true);
} catch (Throwable t) {
log.logError(Const.getStackTracker(t));
new ErrorDialog(transLogComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR), new Exception(t)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例9: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
KettleXulLoader loader = new KettleXulLoader();
loader.setIconsSize( 16, 16 );
loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
xulDomContainer.addEventHandler( this );
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "refresh-history" );
fetchNextBatchButton =
(XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-next-batch-history" );
fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-all-history" );
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
swtToolBar.layout( true, true );
} catch ( Throwable t ) {
log.logError( Const.getStackTracker( t ) );
new ErrorDialog( transHistoryComposite.getShell(),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
new Exception( t ) );
}
}
示例10: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new KettleXulLoader();
loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_LOG_TOOLBAR, bundle );
xulDomContainer.addEventHandler( this );
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
spoon.props.setLook( swtToolbar, Props.WIDGET_STYLE_TOOLBAR );
swtToolbar.layout( true, true );
} catch ( Throwable t ) {
log.logError( Const.getStackTracker( t ) );
new ErrorDialog( jobLogComposite.getShell(),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
new Exception( t ) );
}
}
示例11: applyToContainer
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
public void applyToContainer(String category, XulDomContainer container) throws XulException {
container.registerClassLoader(getClass().getClassLoader());
if(category.equals("spoon")){
container.loadOverlay("org/pentaho/agilebi/spoon/spoon_overlays.xul", bundle);
container.addEventHandler(ModelerHelper.getInstance());
} else if(category.equals("job-graph")){
container.loadOverlay("org/pentaho/agilebi/spoon/job_overlay.xul", bundle);
container.addEventHandler(ModelerHelper.getInstance());
} else if(category.equals("trans-graph")){
container.loadOverlay("org/pentaho/agilebi/spoon/trans_overlay.xul", bundle);
container.addEventHandler(ModelerHelper.getInstance());
} else if(category.equals("database_dialog")){
container.loadOverlay("org/pentaho/agilebi/spoon/database_dialog_overlay.xul", bundle);
container.addEventHandler(new AgileBiDatabaseController());
}
}
示例12: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new KettleXulLoader();
loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
ResourceBundle bundle = GlobalMessages.getBundle( "org/pentaho/di/ui/spoon/messages/messages" );
XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
xulDomContainer.addEventHandler( this );
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
swtToolBar.layout( true, true );
} catch ( Throwable t ) {
log.logError( toString(), Const.getStackTracker( t ) );
new ErrorDialog( transGridComposite.getShell(),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
new Exception( t ) );
}
}
示例13: addToolBar
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = GlobalMessages.getBundle("org/pentaho/di/ui/spoon/messages/messages");
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TRANS_PREVIEW_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("nav-toolbar");
ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
swtToolBar.layout(true, true);
} catch (Throwable t) {
log.logError(toString(), Const.getStackTracker(t));
new ErrorDialog(transPreviewComposite.getShell(), BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Title"),
BaseMessages.getString(PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_PREVIEW_TOOLBAR), new Exception(t));
}
}
示例14: applyToContainer
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
public void applyToContainer( String category, XulDomContainer container ) throws XulException {
container.registerClassLoader( getClass().getClassLoader() );
if ( category.equals( "spoon" ) ) {
container.loadOverlay( "org/pentaho/di/dataset/spoon/xul/spoon_overlays.xul" );
container.addEventHandler( DataSetHelper.getInstance() );
}
if ( category.equals( "trans-graph" ) ) {
container.loadOverlay( "org/pentaho/di/dataset/spoon/xul/trans_graph_overlays.xul" );
container.addEventHandler( DataSetHelper.getInstance() );
}
}
示例15: applyToContainer
import org.pentaho.ui.xul.XulDomContainer; //导入方法依赖的package包/类
@Override
public void applyToContainer( String category, XulDomContainer container ) throws XulException {
ClassLoader cl = getClass().getClassLoader();
container.registerClassLoader( cl );
if ( category.equals( "trans-graph" ) ) {
container.loadOverlay( "org/pentaho/community/di/trans_layout_menu_overlay.xul", bundle );
container.addEventHandler( this );
for ( LayoutProvider provider : providers ) {
addProvider( provider );
}
}
}