gpt4 book ai didi

org.pentaho.ui.xul.XulException类的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 02:15:05 27 4
gpt4 key购买 nike

本文整理了Java中org.pentaho.ui.xul.XulException类的一些代码示例,展示了XulException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XulException类的具体详情如下:
包路径:org.pentaho.ui.xul.XulException
类名称:XulException

XulException介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

protected void showMessage( String message ) {
  try {
   XulMessageBox box = (XulMessageBox) document.createElement( "messagebox" );
   box.setMessage( message );
   box.open();
  } catch ( XulException e ) {
   System.out.println( "Error creating messagebox " + e.getMessage() );
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

protected void loadDatabaseOptionsFragment( String fragmentUri ) throws XulException {
 XulComponent groupElement = document.getElementById( "database-options-box" );
 XulComponent parentElement = groupElement.getParent();
 XulDomContainer fragmentContainer;
 try {
  // Get new group box fragment ...
  // This will effectively set up the SWT parent child relationship...
  fragmentContainer = this.xulDomContainer.loadFragment( fragmentUri, Messages.getBundle() );
  XulComponent newGroup = fragmentContainer.getDocumentRoot().getFirstChild();
  parentElement.replaceChild( groupElement, newGroup );
 } catch ( XulException e ) {
  e.printStackTrace();
  throw e;
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

show();
} catch ( XulException e ) {
 SpoonFactory.getInstance().messageBox( e.getLocalizedMessage(),
   resourceBundle.getString( "RepositoryConfigDialog.InitializationFailed" ), false, Const.ERROR ); //$NON-NLS-1$
 log.error( resourceBundle.getString( "RepositoryConfigDialog.ErrorStartingXulApplication" ), e );//$NON-NLS-1$

代码示例来源:origin: pentaho/data-access

System.out.println( e.getMessage() );
e.printStackTrace();

代码示例来源:origin: pentaho/pentaho-kettle

protected void confirm( String title, String message ) throws XulException {
 String ok = BaseMessages.getString( PKG, "Dialog.Ok" );
 try {
  confirmDialog( title, message, ok );
 } catch ( Exception e ) {
  throw new XulException( e );
 }
}

代码示例来源:origin: pentaho/data-access

MessageHandler.getInstance().showErrorDialog( "Error", e.getMessage() );
 e.printStackTrace();
} catch ( InvocationTargetException e ) {
 MessageHandler.getInstance().showErrorDialog( "Error", e.getMessage() );

代码示例来源:origin: pentaho/pentaho-kettle

protected void confirm( String title, String message, final Callable<Void> onAccept ) throws XulException {
 String yes = BaseMessages.getString( PKG, "Dialog.YesDelete" );
 String no = BaseMessages.getString( PKG, "Dialog.No" );
 try {
  confirmDialog( onAccept, BaseMessages.getString( PKG, title ), BaseMessages.getString( PKG, message ), yes, no );
 } catch ( Exception e ) {
  throw new XulException( e );
 }
}

代码示例来源:origin: pentaho/modeler

protected void showValidationMessages( List<String> messages ) {
 StringBuffer validationErrors =
   new StringBuffer( ModelerMessagesHolder.getMessages().getString( "model_contains_errors" ) ); //$NON-NLS-1$
 for ( String msg : messages ) {
  validationErrors.append( msg );
  validationErrors.append( "\n" ); //$NON-NLS-1$
 }
 try {
  XulMessageBox msg = (XulMessageBox) document.createElement( "messagebox" ); //$NON-NLS-1$
  msg.setTitle( ModelerMessagesHolder.getMessages().getString( "model_not_valid" ) ); //$NON-NLS-1$
  msg.setMessage( validationErrors.toString() );
  msg.open();
 } catch ( XulException e ) {
  e.printStackTrace();
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

protected void showMessage( String message, boolean scroll ) {
 try {
  XulMessageBox box = (XulMessageBox) document.createElement( "messagebox" );
  box.setMessage( message );
  box.setModalParent( ( (XulRoot) document.getElementById( "general-datasource-window" ) ).getRootObject() );
  if ( scroll ) {
   box.setScrollable( true );
   box.setWidth( 500 );
   box.setHeight( 400 );
  }
  box.open();
 } catch ( XulException e ) {
  System.out.println( "Error creating messagebox " + e.getMessage() );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public AuthProviderDialog( Shell shell ) {
 log = new LogChannel( resourceBundle.getString( "log.name" ) );
 try {
  SwtXulLoader xulLoader = new SwtXulLoader();
  xulLoader.setOuterContext( shell );
  container = xulLoader.loadXul( XUL_FILE, resourceBundle );
  final XulRunner runner = new SwtXulRunner();
  runner.addContainer( container );
  BindingFactory bf = new SwtBindingFactory();
  bf.setDocument( container.getDocumentRoot() );
  controller.setBindingFactory( bf );
  controller.setResourceBundle( resourceBundle );
  container.addEventHandler( controller );
  try {
   runner.initialize();
  } catch ( XulException e ) {
   SpoonFactory.getInstance().messageBox( e.getLocalizedMessage(),
     resourceBundle.getString( "error.on_initialization" ), false, Const.ERROR );
   log.logError( resourceBundle.getString( "error.on_initialization" ), e );
  }
 } catch ( XulException e ) {
  log.logError( resourceBundle.getString( "error.on_initialization" ), e );
 }
}

代码示例来源:origin: pentaho/data-access

@Bindable
public void setSelectedDatasource( IWizardDatasource datasource ) {
 IWizardDatasource prevSelection = activeDatasource;
 activeDatasource = datasource;
 if ( datasource == null || prevSelection == activeDatasource ) {
  return;
 }
 try {
  datasource.activating();
  if ( prevSelection != null ) {
   steps.removeAll( prevSelection.getSteps() );
   prevSelection.deactivating();
  }
  for ( int i = 1; i < datasource.getSteps().size(); i++ ) {
   steps.add( datasource.getSteps().get( i ) );
  }
  steps.addAll( datasource.getSteps() );
  wizardModel.setSelectedDatasource( datasource );
  activeStep = 0;
  updateBindings();
 } catch ( XulException e ) {
  e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

log.error( resourceBundle.getString( "RepositoryExplorer.ErrorStartingXulApplication" ), e );
new ErrorDialog( ( (Spoon) SpoonFactory.getInstance() ).getShell(), BaseMessages.getString(
 Spoon.class, "Spoon.Error" ), e.getMessage(), e );

代码示例来源:origin: pentaho/pentaho-kettle

public RepositoriesDialog( Shell shell, String preferredRepositoryName, ILoginCallback callback ) {
 try {
  this.callback = callback;
  KettleXulLoader xulLoader = new KettleXulLoader();
  xulLoader.setOuterContext( shell );
  xulLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  container = xulLoader.loadXul( "org/pentaho/di/ui/repository/xul/repositories.xul", resourceBundle );
  final XulRunner runner = new SwtXulRunner();
  runner.addContainer( container );
  BindingFactory bf = new DefaultBindingFactory();
  bf.setDocument( container.getDocumentRoot() );
  repositoriesController.setBindingFactory( bf );
  repositoriesController.setPreferredRepositoryName( preferredRepositoryName );
  repositoriesController.setMessages( resourceBundle );
  repositoriesController.setCallback( callback );
  repositoriesController.setShell( getShell() );
  container.addEventHandler( repositoriesController );
  try {
   runner.initialize();
  } catch ( XulException e ) {
   SpoonFactory.getInstance().messageBox(
    e.getLocalizedMessage(), "Service Initialization Failed", false, Const.ERROR );
   log.error( resourceBundle.getString( "RepositoryLoginDialog.ErrorStartingXulApplication" ), e );
  }
 } catch ( XulException e ) {
  log.error( resourceBundle.getString( "RepositoryLoginDialog.ErrorLoadingXulApplication" ), e );
 }
}

代码示例来源:origin: pentaho/data-access

/**
 * Shows a informational dialog.
 *
 * @param title   title of dialog
 * @param message message within dialog
 */
private void showMessagebox( final String title, final String message ) {
 XulMessageBox messagebox = null;
 try {
  messagebox = (XulMessageBox) document.createElement( "messagebox" ); //$NON-NLS-1$
 } catch ( XulException e ) {
  e.printStackTrace();
  return;
 }
 messagebox.setTitle( title );
 messagebox.setMessage( message );
 messagebox.open();
}

代码示例来源:origin: pentaho/big-data-plugin

public void applyToContainer( String category, XulDomContainer container ) throws XulException {
 try {
  container.registerClassLoader( getClass().getClassLoader() );
  container.loadOverlay( "org/pentaho/di/core/hadoop/explorer-layout-overlay.xul", resourceBundle );
  NamedClustersController controller = new NamedClustersController();
  controller.init( Spoon.getInstance().rep );
  container.addEventHandler( controller );
 } catch ( XulException e ) {
  log.logError( e.getMessage() );
 } catch ( ControllerInitializationException e ) {
  log.logError( e.getMessage() );
 }
}

代码示例来源:origin: pentaho/data-access

} catch ( XulException e ) {
 e.printStackTrace();

代码示例来源:origin: pentaho/data-access

/**
 * Shows a informational dialog.
 *
 * @param title   title of dialog
 * @param message message within dialog
 */
private void showMessagebox( final String title, final String message ) {
 try {
  XulMessageBox messagebox = (XulMessageBox) document.createElement( "messagebox" ); //$NON-NLS-1$
  messagebox.setTitle( title );
  messagebox.setMessage( message );
  int option = messagebox.open();
 } catch ( XulException e ) {
  Window.alert( "Show MessabeBox " + e.getMessage() );
 }
}

代码示例来源:origin: pentaho/modeler

public void xulLoaded( GwtXulRunner gwtXulRunner ) {
 IModelerMessages messages =
   new GwtModelerMessages( (ResourceBundle) gwtXulRunner.getXulDomContainers().get( 0 ).getResourceBundles().get(
     0 ) );
 BogoPojo bogo = new BogoPojo();
 XulDomContainer container = gwtXulRunner.getXulDomContainers().get( 0 );
 GwtModelerWorkspaceHelper helper = new GwtModelerWorkspaceHelper();
 ModelerWorkspace model = new ModelerWorkspace( helper );
 model.setDomain( this.domain );
 ModelerController controller = new ModelerController( model );
 controller.setWorkspaceHelper( helper );
 try {
  ModelerMessagesHolder.setMessages( messages );
 } catch ( IllegalStateException e ) {
  // ignore, it was already set by someone else
  boolean ignore = true;
 }
 BindingFactory bf = new GwtBindingFactory( container.getDocumentRoot() );
 controller.setBindingFactory( bf );
 container.addEventHandler( controller );
 ModelerUiHelper.configureControllers( container, model, bf, controller, new ColResolverController() );
 RootPanel.get().add( (Widget) container.getDocumentRoot().getRootElement().getManagedObject() );
 try {
  gwtXulRunner.initialize();
 } catch ( XulException e ) {
  e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
 }
}

代码示例来源:origin: pentaho/big-data-plugin

container.addEventHandler( controller );
} catch ( XulException e ) {
 log.logError( e.getMessage() );

代码示例来源:origin: pentaho/modeler

@Bindable
public void showAutopopulatePrompt() {
 try {
  if ( getModelerPerspective() == ModelerPerspective.ANALYSIS ) {
   MainModelNode model = workspace.getModel();
   if ( model.getDimensions().isEmpty() && model.getMeasures().isEmpty() ) {
    autoPopulate();
   } else {
    showAutoModelConfirmDialog();
   }
  } else {
   RelationalModelNode model = workspace.getRelationalModel();
   if ( model.getCategories().isEmpty() ) {
    autoPopulate();
   } else {
    showAutoModelConfirmDialog();
   }
  }
 } catch ( XulException e ) {
  e.printStackTrace();
 }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com