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


Java ShowMessageDialog类代码示例

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


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

示例1: ok

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void ok() {
  if ( Const.isEmpty( m_stepnameText.getText() ) ) {
    return;
  }

  stepname = m_stepnameText.getText();

  getInfo( m_currentMeta );

  if ( m_currentMeta.getMongoFields() == null ) {
    // popup dialog warning that no paths have been defined
    ShowMessageDialog
      smd =
      new ShowMessageDialog( shell, SWT.ICON_WARNING | SWT.OK,
        getString( "MongoDbOutputDialog.ErrorMessage.NoFieldPathsDefined.Title" ),
        getString( "MongoDbOutputDialog.ErrorMessage.NoFieldPathsDefined" ) ); //$NON-NLS-1$
    smd.open();
  }

  if ( !m_originalMeta.equals( m_currentMeta ) ) {
    m_currentMeta.setChanged();
    changed = m_currentMeta.hasChanged();
  }

  dispose();
}
 
开发者ID:pentaho,项目名称:pentaho-mongodb-plugin,代码行数:27,代码来源:MongoDbOutputDialog.java

示例2: checkForUnresolved

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private boolean checkForUnresolved( MongoDbInputMeta meta, String title ) {

    String query = transMeta.environmentSubstitute( meta.getJsonQuery() );

    boolean notOk = ( query.contains( "${" ) || query.contains( "?{" ) ); //$NON-NLS-1$ //$NON-NLS-2$

    if ( notOk ) {
      ShowMessageDialog
          smd =
          new ShowMessageDialog( shell, SWT.ICON_WARNING | SWT.OK, title, BaseMessages.getString( PKG,
              "MongoDbInputDialog.Warning.Message.MongoQueryContainsUnresolvedVarsFieldSubs" ) ); //$NON-NLS-1$
      smd.open();
    }

    return !notOk;
  }
 
开发者ID:pentaho,项目名称:pentaho-mongodb-plugin,代码行数:17,代码来源:MongoDbInputDialog.java

示例3: addViewTimeSeriesButton

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void addViewTimeSeriesButton() {
  wbTimeSeries = new Button(wSettingComp, SWT.PUSH);
  wbTimeSeries.setText( BaseMessages.getString( PKG, "SdmxDialog.ViewTimeSeries.Button"));
  props.setLook( wbTimeSeries );
  fdTimeSeries = new FormData();
  fdTimeSeries.left = new FormAttachment( wCodeList, margin );
  fdTimeSeries.top = new FormAttachment( wbCodes, margin );
  wbTimeSeries.setLayoutData( fdTimeSeries );

  wbTimeSeries.addListener(SWT.Selection, new Listener() {
    @Override
    public void handleEvent(Event e) {
      RowMetaInterface rowMeta = new RowMeta();
      ValueMetaInterface seriesName = new ValueMetaString( "Series" );
      rowMeta.addValueMeta( seriesName );

      for ( Dimension d : sdmxDialogData.getCurrentFlowDimensionToCodes().keySet() ){
        ValueMetaInterface field = new ValueMetaString( d.getId() );
        rowMeta.addValueMeta( field );
      }
      try {
        setWaitCursor();
        List<List<String>> ts = sdmxDialogData.getAvailableTimeSeriesNames();
        PreviewTimeSeriesDialog tsd = new PreviewTimeSeriesDialog( shell, SWT.NONE, rowMeta, transMeta, ts );
        tsd.open();
      } catch (SdmxException ex) {
        ShowMessageDialog dialog = new ShowMessageDialog( shell, SWT.OK | SWT.ICON_WARNING,
            BaseMessages.getString( PKG, "SdmxDialog.NoSeries.Text" ),
            BaseMessages.getString( PKG, "SdmxDialog.NoSeries.Message" ) );
        dialog.open();
        ex.printStackTrace();
      } finally {
        setArrowCursor();
      }
    }
  });
}
 
开发者ID:andtorg,项目名称:sdmx-kettle,代码行数:38,代码来源:SdmxStepDialog.java

示例4: addIncludeInputInOutputControllers

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void addIncludeInputInOutputControllers() {
  // Input Fields as Output Fields
  wlIncludeInputAsOutput = new Label( wgOptions, SWT.RIGHT );
  wlIncludeInputAsOutput.setText( BaseMessages.getString( PKG, "CPythonScriptExecutor.InputFieldAsOutput.Label" ) );

  props.setLook( wlIncludeInputAsOutput );
  wlIncludeInputAsOutput.setLayoutData( getFirstLabelFormData() );

  wbIncludeInputAsOutput = new Button( wgOptions, SWT.CHECK );
  props.setLook( wbIncludeInputAsOutput );
  FormData fd = getFirstPromptFormData( wlIncludeInputAsOutput );
  fd.right = null;
  wbIncludeInputAsOutput.setLayoutData( fd );
  lastControl = wbIncludeInputAsOutput;
  wbIncludeInputAsOutput.addSelectionListener( new SelectionAdapter() {
    @Override public void widgetSelected( SelectionEvent e ) {
      if ( wbIncludeInputAsOutput.getSelection() ) {
        ShowMessageDialog
            smd =
            new ShowMessageDialog( getParent(), SWT.OK | SWT.ICON_WARNING,
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.InputFieldAsOutput.Dialog.Title" ),
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.InputFieldAsOutput.Dialog.Message" ),
                false );
        smd.open();
      }
      m_inputMeta.setChanged();
    }
  } );
  wbIncludeInputAsOutput
      .setToolTipText( BaseMessages.getString( PKG, "CPythonScriptExecutor.InputFieldAsOutput.TipText" ) );
}
 
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:32,代码来源:CPythonScriptExecutorDialog.java

示例5: addJob

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
/**
 * Add a job to the job map
 * 
 * @param jobMeta
 *            the job to add to the map
 * @return the key used to store the transformation in the map
 */
public String addJob(JobMeta jobMeta)
{
	String key = spoon.delegates.tabs.makeJobGraphTabName(jobMeta);
	JobMeta xjob = jobMap.get(key);
	if (xjob == null)
	{
		jobMap.put(key, jobMeta);
	} else
	{
		// found a transformation tab that has the same name, is it the same
		// as the one we want to load, if not warn the user of the duplicate name
		boolean same = false;
        
		if (jobMeta.isRepReference() && xjob.isRepReference())
		{
			// a repository value
			same = jobMeta.getDirectory().getPath().equals(xjob.getDirectory().getPath());
		}
		else if (jobMeta.isFileReference() && xjob.isFileReference()){
			// a file system entry
			same = jobMeta.getFilename().equals(xjob.getFilename());
		}
		if (!same) {
			ShowMessageDialog dialog = new ShowMessageDialog(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION,
					Messages.getString("Spoon.Dialog.JobAlreadyLoaded.Title"), "'" + key + "'" + Const.CR
							+ Const.CR + Messages.getString("Spoon.Dialog.JobAlreadyLoaded.Message"));
			dialog.setTimeOut(6);
			dialog.open();
		}
	}

	return key;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:41,代码来源:SpoonJobDelegate.java

示例6: showMessage

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
@Override
protected void showMessage(String message, boolean scroll){
  Shell parent = getShell();
  
  ShowMessageDialog msgDialog = new ShowMessageDialog(parent, SWT.ICON_INFORMATION | SWT.OK, BaseMessages.getString(PKG, "DatabaseDialog.DatabaseConnectionTest.title"), message, scroll); //$NON-NLS-1$
  msgDialog.open();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:8,代码来源:DataOverrideHandler.java

示例7: testConnection

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
/**
 * Test the connection with APNS server.
 * 
 * @param certPath the certificate path.
 * @param pass the password.
 * @param useSandbox if use Sandbox.
 */
private void testConnection(String certPath, String pass, boolean useSandbox) {
  try {
    final InputStream fileInputStream =
        KettleVFS.getInputStream(transMeta.environmentSubstitute(certPath));

    ApnsServiceBuilder apnsServiceBuilder = APNS.newService().withCert(fileInputStream,
        transMeta.environmentSubstitute(pass));
    if (useSandbox) {
      apnsServiceBuilder = apnsServiceBuilder.withSandboxDestination();
    } else {
      apnsServiceBuilder = apnsServiceBuilder.withProductionDestination();
    }
    final ApnsService apnsService = apnsServiceBuilder.build();
    apnsService.testConnection();
    final ShowMessageDialog msgDialog =
        new ShowMessageDialog(parent, SWT.ICON_INFORMATION | SWT.OK,
            BaseMessages.getString(PKG, "ApplePushNotification.TestConnection.title"),
            BaseMessages.getString(
                PKG, "ApplePushNotification.TestConnection.Success.DialogMessage"));
    msgDialog.open();
  } catch (Exception e) {
    logDebug(BaseMessages.getString(PKG, "ApplePushNotification.TestConnection.title"), e);
    new ErrorDialog(shell, BaseMessages.getString(PKG,
        "ApplePushNotification.TestConnection.title"),
        BaseMessages.getString(PKG,
            "ApplePushNotification.Exception.UnexpectedErrorInTestConnection.Dialog.Error"), e);
  }
}
 
开发者ID:latinojoel,项目名称:pdi-apple-pushnotifications,代码行数:36,代码来源:PushNotificationDialog.java

示例8: showIndexInfo

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void showIndexInfo() {
  String hostname = transMeta.environmentSubstitute( m_hostnameField.getText() );
  String dbName = transMeta.environmentSubstitute( m_dbNameField.getText() );
  String collection = transMeta.environmentSubstitute( m_collectionField.getText() );

  if ( !Const.isEmpty( hostname ) ) {
    MongoClient conn = null;
    try {
      MongoDbOutputMeta meta = new MongoDbOutputMeta();
      getInfo( meta );
      MongoClientWrapper wrapper = MongoWrapperUtil.createMongoClientWrapper( meta, transMeta, log );
      StringBuffer result = new StringBuffer();
      for ( String index : wrapper.getIndexInfo( dbName, collection ) ) {
        result.append( index ).append( "\n\n" ); //$NON-NLS-1$
      }

      ShowMessageDialog
        smd =
        new ShowMessageDialog( shell, SWT.ICON_INFORMATION | SWT.OK,
          BaseMessages.getString( PKG, "MongoDbOutputDialog.IndexInfo", collection ), result.toString(),
          true ); //$NON-NLS-1$
      smd.open();
    } catch ( Exception e ) {
      logError( getString( "MongoDbOutputDialog.ErrorMessage.GeneralError.Message" ) //$NON-NLS-1$
        + ":\n\n" + e.getMessage(), e ); //$NON-NLS-1$
      new ErrorDialog( shell, getString( "MongoDbOutputDialog.ErrorMessage.IndexPreview.Title" ),
        //$NON-NLS-1$
        getString( "MongoDbOutputDialog.ErrorMessage.GeneralError.Message" ) //$NON-NLS-1$
          + ":\n\n" + e.getMessage(), e ); //$NON-NLS-1$
    } finally {
      if ( conn != null ) {
        conn.close();
        conn = null;
      }
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-mongodb-plugin,代码行数:38,代码来源:MongoDbOutputDialog.java

示例9: createPlugin

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
protected boolean createPlugin() {

    // Create a step with the information in this dialog
    UserDefinedJavaClassMeta udjcMeta = new UserDefinedJavaClassMeta();
    getInfo( udjcMeta );

    try {
      String pluginName = "Processor";
      for ( UserDefinedJavaClassDef def : udjcMeta.getDefinitions() ) {
        if ( def.isTransformClass() ) {
          pluginName = def.getClassName();
        }
      }
      File pluginFile = new File( String.format( "plugins/steps/%s/%s.step.xml", pluginName, pluginName ) );
      pluginFile.getParentFile().mkdirs();
      PrintWriter pw = new PrintWriter( new FileWriter( pluginFile ) );
      StringBuilder outXML = new StringBuilder( "<step>\n" );
      outXML.append( String.format( "\t<name>%s</name>\n", stepname ) );
      outXML.append( "\t<type>UserDefinedJavaClass</type>\n" );
      outXML.append( "\t<description/>\n\t" );
      outXML.append( udjcMeta.getXML() );
      outXML.append( "</step>" );
      pw.println( outXML.toString() );
      pw.flush();
      pw.close();
      ShowMessageDialog msgDialog = new ShowMessageDialog( shell, SWT.ICON_INFORMATION | SWT.OK,
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Plugin.CreateSuccess" ),
        BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Plugin.CreatedFile", pluginFile.getPath() ), false );
      msgDialog.open();

    } catch ( IOException e ) {
      e.printStackTrace();
      new ErrorDialog(
        shell, BaseMessages.getString( PKG, "UserDefinedJavaClassDialog.Plugin.CreateErrorTitle" ), BaseMessages
          .getString( PKG, "UserDefinedJavaClassDialog.Plugin.CreateErrorMessage", stepname ), e );
    }

    return true;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:UserDefinedJavaClassDialog.java

示例10: onLoginError

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void onLoginError( Throwable t ) {
  if ( t instanceof KettleAuthException ) {
    ShowMessageDialog dialog =
      new ShowMessageDialog( loginDialog.getShell(), SWT.OK | SWT.ICON_ERROR, BaseMessages.getString(
        PKG, "Spoon.Dialog.LoginFailed.Title" ), t.getLocalizedMessage() );
    dialog.open();
  } else {
    new ErrorDialog(
      loginDialog.getShell(), BaseMessages.getString( PKG, "Spoon.Dialog.LoginFailed.Title" ), BaseMessages
      .getString( PKG, "Spoon.Dialog.LoginFailed.Message", t ), t );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:Spoon.java

示例11: showMessage

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
@Override
protected void showMessage( String message, boolean scroll ) {
  Shell parent = getShell();

  ShowMessageDialog msgDialog =
    new ShowMessageDialog( parent, SWT.ICON_INFORMATION | SWT.OK, BaseMessages.getString(
      PKG, "DatabaseDialog.DatabaseConnectionTest.title" ), message, scroll );
  msgDialog.open();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:DataOverrideHandler.java

示例12: getFields

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void getFields(OdpsOutputMeta meta) {
    if (!Const.isEmpty(m_wEndpoint.getText()) && !Const.isEmpty(m_wAccessId.getText()) && !Const
        .isEmpty(m_wAccessKey.getText()) && !Const.isEmpty(m_wProjectName.getText()) && !Const
        .isEmpty(m_wTableName.getText())) {

        TableSchema schema = MaxcomputeUtil
            .getTableSchema(new AliyunAccount(m_wAccessId.getText(), m_wAccessKey.getText()),
                m_wEndpoint.getText(), m_wProjectName.getText(), m_wTableName.getText());

        List<Column> columns = schema.getColumns();
        List<OdpsField> odpsFields = new ArrayList<OdpsField>();
        for (int i = 0; i < columns.size(); i++) {
            OdpsField field = new OdpsField();
            field.setName(columns.get(i).getName());
            field.setType(columns.get(i).getType().name());
            field.setComment(columns.get(i).getCategoryLabel());
            odpsFields.add(field);
        }

        meta.setOdpsFields(odpsFields);
        RowMetaInterface r = null;
        try {
            r = transMeta.getPrevStepFields(stepname);
        } catch (KettleStepException e) {
            logError(e.getMessage(), e);
        }

        if (r != null) {
            logBasic("prev step fields: " + Arrays.toString(r.getFieldNames()));
            meta.setStreamFields(Arrays.asList(r.getFieldNames()));
        } else {
            logBasic("prev step fields empty!!!");
            meta.setStreamFields(new ArrayList<String>());
        }

        if (meta.getOdpsFields() != null && meta.getStreamFields() != null) {
            m_wFieldsTable.table.clearAll();
            m_wFieldsTable.table.setItemCount(meta.getOdpsFields().size());
            for (int i = 0; i < meta.getOdpsFields().size(); i++) {
                OdpsField odpsField = meta.getOdpsFields().get(i);
                String streamField = "";
                if (meta.getStreamFields().size() > i) {
                    streamField = meta.getStreamFields().get(i);
                }
                TableItem item = m_wFieldsTable.table.getItem(i);
                if (odpsField != null) {
                    if (odpsField.getName() != null)
                        item.setText(1, odpsField.getName());
                    if (streamField != null)
                        item.setText(2, streamField);
                }
            }
        }

    } else {
        // pop up an error dialog
        String missingConDetails = "";
        if (Const.isEmpty(m_wEndpoint.getText())) {
            missingConDetails += " odps endpoint";
        }
        if (Const.isEmpty(m_wAccessId.getText())) {
            missingConDetails += " accessId";
        }
        if (Const.isEmpty(m_wAccessKey.getText())) {
            missingConDetails += " accessKey";
        }
        if (Const.isEmpty(m_wProjectName.getText())) {
            missingConDetails += " project name";
        }
        if (Const.isEmpty(m_wTableName.getText())) {
            missingConDetails += " table name";
        }
        ShowMessageDialog smd = new ShowMessageDialog(shell, SWT.ICON_WARNING | SWT.OK,
            BaseMessages.getString(PKG, "ODPS.ErrorMessage.MissingConnectionDetails.Title"),
            BaseMessages.getString(PKG, "ODPS.ErrorMessage.MissingConnectionDetails",
                missingConDetails));
        smd.open();
    }
}
 
开发者ID:aliyun,项目名称:aliyun-maxcompute-data-collectors,代码行数:80,代码来源:OdpsOutputDialog.java

示例13: getFrameFields

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void getFrameFields( CPythonScriptExecutorMeta meta ) {

    try {
      meta.setOutputFields( new RowMeta() );
      List<String> frameNames = meta.getFrameNames();
      List<StreamInterface> infoStreams = meta.getStepIOMeta().getInfoStreams();
      List<RowMetaInterface> incomingMetas = new ArrayList<RowMetaInterface>();
      if ( frameNames.size() > 0 && infoStreams.size() > 0 ) {

        for ( int i = 0; i < infoStreams.size(); i++ ) {
          incomingMetas.add( transMeta.getStepFields( infoStreams.get( i ).getStepMeta() ) );
        }
      }

      ShowMessageDialog
          smd =
          new ShowMessageDialog( this.getParent(), SWT.YES | SWT.NO | SWT.ICON_WARNING,
              BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.GetFields.Dialog.Title" ),
              BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.GetFields.Dialog.Message" ), false );
      int buttonID = smd.open();

      if ( buttonID == SWT.YES ) {
        RowMetaInterface rowMeta = new RowMeta();
        meta.getFields( rowMeta, "bogus", incomingMetas.toArray( new RowMetaInterface[incomingMetas.size()] ), null,
            transMeta, null, null );

        wtvOutputFields.clearAll();
        for ( int i = 0; i < rowMeta.size(); i++ ) {
          TableItem item = new TableItem( wtvOutputFields.table, SWT.NONE );
          item.setText( 1, Const.NVL( rowMeta.getValueMeta( i ).getName(), "" ) );
          item.setText( 2, Const.NVL( rowMeta.getValueMeta( i ).getTypeDesc(), "" ) );
        }
        wtvOutputFields.removeEmptyRows();
        wtvOutputFields.setRowNums();
        wtvOutputFields.optWidth( true );
      }
    } catch ( KettleException ex ) {
      new ErrorDialog( shell, stepname, BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.ErrorGettingFields" ),
          ex );
    }
  }
 
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:42,代码来源:CPythonScriptExecutorDialog.java

示例14: addRowsToProcessControllers

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
private void addRowsToProcessControllers() {
  wlRowsToProcess = new Label( wgRowHandling, SWT.RIGHT );
  wlRowsToProcess.setText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Label" ) );
  props.setLook( wlRowsToProcess );
  fd = new FormData();
  fd.left = new FormAttachment( 0, 0 );
  fd.right = new FormAttachment( FIRST_LABEL_RIGHT_PERCENTAGE, 0 );
  fd.top = new FormAttachment( lastControl, MARGIN );
  wlRowsToProcess.setLayoutData( getFirstLabelFormData() );

  wcvRowsToProcess = new ComboVar( transMeta, wgRowHandling, SWT.BORDER | SWT.READ_ONLY );
  props.setLook( wcvRowsToProcess );
  wcvRowsToProcess.setEditable( false );
  wcvRowsToProcess.addSelectionListener( new SelectionAdapter() {
    @Override public void widgetSelected( SelectionEvent e ) {
      m_inputMeta.setChanged();
      handleRowsToProcessChange();
      if ( wtvInputFrames.getItemCount() > 1 && wbReservoirSampling.getSelection() && wcvRowsToProcess.getText()
          .equals( BaseMessages.getString( PKG,
              "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.RowByRowEntry.Label" ) ) ) {
        ShowMessageDialog
            smd =
            new ShowMessageDialog( shell, SWT.OK | SWT.ICON_WARNING,
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.RowByRowWarning.Title" ),
                BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.RowByRowWarning.Message" ), false );
        smd.open();
      }
    }
  } );
  wcvRowsToProcess.setLayoutData( getFirstPromptFormData( wlRowsToProcess ) );
  wcvRowsToProcess.add(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.AllEntry.Label" ) );
  wcvRowsToProcess.add( BaseMessages
      .getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.RowByRowEntry.Label" ) );
  wcvRowsToProcess.add(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.BatchEntry.Label" ) );
  wcvRowsToProcess.setToolTipText(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Dropdown.TipText" ) );

  wlRowsToProcessSize = new Label( wgRowHandling, SWT.RIGHT );
  wlRowsToProcessSize
      .setText( BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Size.Label" ) );
  props.setLook( wlRowsToProcessSize );
  wlRowsToProcessSize.setLayoutData( getSecondLabelFormData( wcvRowsToProcess ) );

  wtvRowsToProcessSize = new TextVar( transMeta, wgRowHandling, SWT.SINGLE | SWT.LEAD | SWT.BORDER );
  props.setLook( wtvRowsToProcessSize );
  wtvRowsToProcessSize.addModifyListener( simpleModifyListener );
  wtvRowsToProcessSize.setLayoutData( getSecondPromptFormData( wlRowsToProcessSize ) );
  wtvRowsToProcessSize.setEnabled( false );
  lastControl = wtvRowsToProcessSize;
  wtvRowsToProcessSize.setToolTipText(
      BaseMessages.getString( PKG, "CPythonScriptExecutorDialog.NumberOfRowsToProcess.Size.TipText" ) );
}
 
开发者ID:pentaho-labs,项目名称:pentaho-cpython-plugin,代码行数:55,代码来源:CPythonScriptExecutorDialog.java

示例15: popupSchemaInfo

import org.pentaho.di.ui.core.dialog.ShowMessageDialog; //导入依赖的package包/类
protected void popupSchemaInfo() {

    CassandraConnection conn = null;
    try {
      String hostS = transMeta.environmentSubstitute(m_hostText.getText());
      String portS = transMeta.environmentSubstitute(m_portText.getText());
      String userS = m_userText.getText();
      String passS = m_passText.getText();
      if (!Const.isEmpty(userS) && !Const.isEmpty(passS)) {
        userS = transMeta.environmentSubstitute(userS);
        passS = transMeta.environmentSubstitute(passS);
      }
      String keyspaceS = transMeta.environmentSubstitute(m_keyspaceText
          .getText());

      conn = CassandraOutputData.getCassandraConnection(hostS,
          Integer.parseInt(portS), userS, passS);
      try {
        conn.setKeyspace(keyspaceS);
      } catch (InvalidRequestException ire) {
        logError(
            BaseMessages.getString(PKG,
                "CassandraInputDialog.Error.ProblemGettingSchemaInfo.Message")
                + ":\n\n" + ire.why, ire);
        new ErrorDialog(shell, BaseMessages.getString(PKG,
            "CassandraInputDialog.Error.ProblemGettingSchemaInfo.Title"),
            BaseMessages.getString(PKG,
                "CassandraInputDialog.Error.ProblemGettingSchemaInfo.Message")
                + ":\n\n" + ire.why, ire);
        return;
      }

      String colFam = transMeta.environmentSubstitute(m_columnFamilyCombo
          .getText());
      if (Const.isEmpty(colFam)) {
        throw new Exception("No colummn family (table) name specified!");
      }

      if (!CassandraColumnMetaData.columnFamilyExists(conn, colFam)) {
        throw new Exception("The column family '" + colFam + "' does not "
            + "seem to exist in the keyspace '" + keyspaceS);
      }

      CassandraColumnMetaData cassMeta = new CassandraColumnMetaData(conn,
          colFam);
      String schemaDescription = cassMeta.getSchemaDescription();
      ShowMessageDialog smd = new ShowMessageDialog(shell, SWT.ICON_INFORMATION
          | SWT.OK, "Schema info", schemaDescription, true);
      smd.open();
    } catch (Exception e1) {
      logError(
          BaseMessages.getString(PKG,
              "CassandraOutputDialog.Error.ProblemGettingSchemaInfo.Message")
              + ":\n\n" + e1.getMessage(), e1);
      new ErrorDialog(shell, BaseMessages.getString(PKG,
          "CassandraOutputDialog.Error.ProblemGettingSchemaInfo.Title"),
          BaseMessages.getString(PKG,
              "CassandraOutputDialog.Error.ProblemGettingSchemaInfo.Message")
              + ":\n\n" + e1.getMessage(), e1);
    } finally {
      if (conn != null) {
        conn.close();
      }
    }
  }
 
开发者ID:javachen,项目名称:learning-hadoop,代码行数:66,代码来源:CassandraOutputDialog.java


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