当前位置: 首页>>代码示例>>Java>>正文


Java KettleXulLoader类代码示例

本文整理汇总了Java中org.pentaho.di.ui.xul.KettleXulLoader的典型用法代码示例。如果您正苦于以下问题:Java KettleXulLoader类的具体用法?Java KettleXulLoader怎么用?Java KettleXulLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


KettleXulLoader类属于org.pentaho.di.ui.xul包,在下文中一共展示了KettleXulLoader类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "import-rules-toolbar" );

      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" ),
        BaseMessages.getString( PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Message", XUL_FILE_TOOLBAR ),
        new Exception( t ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:ImportRulesDialog.java

示例2: 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;
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:FileOverwriteDialogController.java

示例3: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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 ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JobLogDelegate.java

示例4: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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_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( jobHistoryComposite.getShell(),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
      new Exception( t ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:26,代码来源:JobHistoryDelegate.java

示例5: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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 ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:TransGridDelegate.java

示例6: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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 ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:TransHistoryDelegate.java

示例7: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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( transLogComposite.getShell(),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
        new Exception( t ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:TransLogDelegate.java

示例8: 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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:XulPreviewRowsDialog.java

示例9: 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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:XulStepFieldsDialog.java

示例10: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的package包/类
protected 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_BROWSER_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

      @SuppressWarnings( "unused" )
      ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
      spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );

      // Add a URL

      back = (XulToolbarbutton) toolbar.getElementById( "browse-back" );
      back.setDisabled( true );
      forward = (XulToolbarbutton) toolbar.getElementById( "browse-forward" );
      forward.setLabel( BaseMessages.getString( PKG, "SpoonBrowser.Dialog.Forward" ) );
      forward.setDisabled( false );
      location = (XulTextbox) toolbar.getElementById( "browser-address" );
      Control toolbarControl = (Control) toolbar.getManagedObject();
      toolbarControl.setLayoutData( new FormData() );
      toolbarControl.setParent( composite );
    } catch ( Exception e ) {
      e.printStackTrace();
      new ErrorDialog(
        shell, BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ), BaseMessages
          .getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_BROWSER_TOOLBAR ), e );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:33,代码来源:SpoonBrowser.java

示例11: addToolBar

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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_PREVIEW_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 );
      swtToolBar.pack();

      firstRadio = (SwtRadio) xulDomContainer.getDocumentRoot().getElementById( "preview-first" );
      lastRadio = (SwtRadio) xulDomContainer.getDocumentRoot().getElementById( "preview-last" );
      offRadio = (SwtRadio) xulDomContainer.getDocumentRoot().getElementById( "preview-off" );

      PropsUI.getInstance().setLook( (Control) firstRadio.getManagedObject(), Props.WIDGET_STYLE_TOOLBAR );
      PropsUI.getInstance().setLook( (Control) lastRadio.getManagedObject(), Props.WIDGET_STYLE_TOOLBAR );
      PropsUI.getInstance().setLook( (Control) offRadio.getManagedObject(), Props.WIDGET_STYLE_TOOLBAR );

    } 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 ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:TransPreviewDelegate.java

示例12: 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;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:XulDatabaseExplorerDialog.java

示例13: GitPerspective

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的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

示例14: initializeXul

import org.pentaho.di.ui.xul.KettleXulLoader; //导入依赖的package包/类
protected void initializeXul() throws XulException {
  initializeXul( new KettleXulLoader(), new SwtBindingFactory(), new SwtXulRunner(), parent );
  dialogShell = (Shell) xulDialog.getRootObject();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:BaseStepXulDialog.java


注:本文中的org.pentaho.di.ui.xul.KettleXulLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。