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


Java PreviewRowsDialog.open方法代码示例

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


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

示例1: show

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void show()
{
	if (rowDatas.size()==0) return;
	
	int nr = wStepList.getSelectionIndex();

	java.util.List<Object[]> buffer = (java.util.List<Object[]>)rowDatas.get(nr);
       RowMetaInterface rowMeta = (RowMetaInterface)rowMetas.get(nr);
	String    name   = (String)stepNames.get(nr);
	
       if (rowMeta!=null && buffer!=null && buffer.size()>0)
       {
   		PreviewRowsDialog prd = new PreviewRowsDialog(shell,
   										Variables.getADefaultVariableSpace(),
   				                        SWT.NONE, name, rowMeta, buffer);
   		prd.open();
       }
       else
       {
       	MessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
       	mb.setText(BaseMessages.getString(PKG, "EnterPreviewRowsDialog.Dialog.NoPreviewRowsFound.Title"));
       	mb.setMessage(BaseMessages.getString(PKG, "EnterPreviewRowsDialog.Dialog.NoPreviewRowsFound.Message"));
       	mb.open();
       }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:EnterPreviewRowsDialog.java

示例2: showFeatureList

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
public void showFeatureList() {

    Shell parent = getShell();
    
    
    DatabaseMeta dbinfo = new DatabaseMeta();
    getInfo(dbinfo);

    try {
      java.util.List<RowMetaAndData> buffer = dbinfo.getFeatureSummary();
      if (buffer.size() > 0) {
        RowMetaInterface rowMeta = buffer.get(0).getRowMeta();
        java.util.List<Object[]> rowData = new ArrayList<Object[]>();
        for (RowMetaAndData row : buffer)
          rowData.add(row.getData());

        PreviewRowsDialog prd = new PreviewRowsDialog(parent, dbinfo, SWT.NONE, null, rowMeta, rowData); 
        prd.setTitleMessage(BaseMessages.getString(PKG, "DatabaseDialog.FeatureList.title"), BaseMessages.getString(PKG, "DatabaseDialog.FeatureList.title")); //$NON-NLS-1$ //$NON-NLS-2$
        prd.open();
      }
    } catch (Exception e) {
      new ErrorDialog( parent, BaseMessages.getString(PKG, "DatabaseDialog.FeatureListError.title"), BaseMessages.getString(PKG, "DatabaseDialog.FeatureListError.description"), e); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:25,代码来源:DataOverrideHandler.java

示例3: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview() {
    CassandraInputMeta oneMeta = new CassandraInputMeta();
    getInfo(oneMeta, true);

    TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(this.transMeta, oneMeta, this.wStepname.getText());

    EnterNumberDialog numberDialog = new EnterNumberDialog(this.shell, this.props.getDefaultPreviewSize(),
            BaseMessages.getString(PKG, "AutSoftCassandraInputDialog.EnterPreviewSize"),
            BaseMessages.getString(PKG, "AutSoftCassandraInputDialog.NumberOfRowsToPreview"));
    int previewSize = numberDialog.open();

    if (previewSize > 0) {
        TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(this.shell, previewMeta,
                new String[]{this.wStepname.getText()}, new int[]{previewSize});
        progressDialog.open();

        Trans trans = progressDialog.getTrans();
        String loggingText = progressDialog.getLoggingText();

        if (!progressDialog.isCancelled()) {
            if ((trans.getResult() != null) && (trans.getResult().getNrErrors() > 0L)) {
                EnterTextDialog etd = new EnterTextDialog(this.shell,
                        BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
                        BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true);
                etd.setReadOnly();
                etd.open();
            } else {
                PreviewRowsDialog prd = new PreviewRowsDialog(this.shell, this.transMeta, 0, this.wStepname.getText(),
                        progressDialog.getPreviewRowsMeta(this.wStepname.getText()),
                        progressDialog.getPreviewRows(this.wStepname.getText()), loggingText);
                prd.open();
            }
        }
    }
}
 
开发者ID:bcolas,项目名称:pentaho-cassandra-plugin,代码行数:36,代码来源:CassandraInputDialog.java

示例4: helpShowStepPlugins

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
/**
 * Show a dialog containing information on the different step plugins.
 */
public void helpShowStepPlugins() {
	List<Object[]> pluginInformation = StepLoader.getInstance().getPluginInformation();
	RowMetaInterface pluginInformationRowMeta = StepPlugin.getPluginInformationRowMeta();

	PreviewRowsDialog dialog = new PreviewRowsDialog(shell, null, SWT.NONE, null, pluginInformationRowMeta, pluginInformation);
	dialog.setTitleMessage(Messages.getString("Spoon.Dialog.StepPluginList.Title"), Messages.getString("Spoon.Dialog.StepPluginList.Message"));
	dialog.open();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:12,代码来源:Spoon.java

示例5: previewTable

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
public void previewTable(String tableName, boolean asklimit)
{
	int limit = 100;
	if (asklimit)
	{
		// Ask how many lines we should preview.
		String shellText = BaseMessages.getString(PKG,"DatabaseExplorerDialog.PreviewTable.Title");
		String lineText = BaseMessages.getString(PKG,"DatabaseExplorerDialog.PreviewTable.Message");
		EnterNumberDialog end = new EnterNumberDialog(shell, limit, shellText, lineText);
		int samples = end.open();
		if (samples>=0) limit=samples;
	}

    GetPreviewTableProgressDialog pd = new GetPreviewTableProgressDialog(shell, dbMeta, null, tableName, limit);
    List<Object[]> rows = pd.open();
    if (rows!=null) // otherwise an already shown error...
    {
		if (rows.size()>0)
		{
			PreviewRowsDialog prd = new PreviewRowsDialog(shell, dbMeta, SWT.NONE, tableName, pd.getRowMeta(), rows);
			prd.open();
		}
		else
		{
			MessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
			mb.setMessage(BaseMessages.getString(PKG,"DatabaseExplorerDialog.NoRows.Message"));
			mb.setText(BaseMessages.getString(PKG,"DatabaseExplorerDialog.NoRows.Title"));
			mb.open();
		}
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:DatabaseExplorerDialogLegacy.java

示例6: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
/**
 * Preview the data generated by this step.
 * This generates a transformation using this step & a dummy and previews it.
 *
 */
private void preview()
{
    // Create the table input reader step...
    MondrianInputMeta oneMeta = new MondrianInputMeta();
    getInfo(oneMeta);
    
    TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
    
    EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "MondrianInputDialog.EnterPreviewSize"), BaseMessages.getString(PKG, "MondrianInputDialog.NumberOfRowsToPreview")); //$NON-NLS-1$ //$NON-NLS-2$
    int previewSize = numberDialog.open();
    if (previewSize>0)
    {
        TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
        progressDialog.open();

        Trans trans = progressDialog.getTrans();
        String loggingText = progressDialog.getLoggingText();

        if (!progressDialog.isCancelled())
        {
            if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
            {
            	EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),  
            			BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
            	etd.setReadOnly();
            	etd.open();
            }
        }
        
        PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
        prd.open();
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:39,代码来源:MondrianInputDialog.java

示例7: showLastImpactAnalyses

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
public void showLastImpactAnalyses(TransMeta transMeta) {
  if (transMeta == null)
    return;
  TransGraph transGraph = delegates.trans.findTransGraphOfTransformation(transMeta);
  if (transGraph == null)
    return;

  List<Object[]> rows = new ArrayList<Object[]>();
  RowMetaInterface rowMeta = null;
  for (int i = 0; i < transGraph.getImpact().size(); i++) {
    DatabaseImpact ii = (DatabaseImpact) transGraph.getImpact().get(i);
    RowMetaAndData row = ii.getRow();
    rowMeta = row.getRowMeta();
    rows.add(row.getData());
  }

  if (rows.size() > 0) {
    // Display all the rows...
    PreviewRowsDialog prd = new PreviewRowsDialog(shell, Variables.getADefaultVariableSpace(), SWT.NONE, "-",
        rowMeta, rows);
    prd.setTitleMessage(
    // "Impact analyses"
        // "Result of analyses:"
        BaseMessages.getString(PKG, "Spoon.Dialog.ImpactAnalyses.Title"), BaseMessages.getString(PKG,
            "Spoon.Dialog.ImpactAnalyses.Message"));
    prd.open();
  } else {
    MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
    if (transGraph.isImpactFinished()) {
      // "As far as I can tell, this transformation has no impact on any database."
      mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.TransformationNoImpactOnDatabase.Message"));
    } else {
      // "Please run the impact analyses first on this transformation."
      mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.RunImpactAnalysesFirst.Message"));
    }
    mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.ImpactAnalyses.Title"));// Impact
    mb.open();
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:40,代码来源:Spoon.java

示例8: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview() {
  // Create the XML input step
  ParGzipCsvInputMeta oneMeta = new ParGzipCsvInputMeta();
  getInfo( oneMeta );

  TransMeta previewMeta =
    TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );

  EnterNumberDialog numberDialog =
    new EnterNumberDialog( shell, props.getDefaultPreviewSize(), BaseMessages.getString(
      PKG, "ParGzipCsvInputDialog.PreviewSize.DialogTitle" ), BaseMessages.getString(
      PKG, "ParGzipCsvInputDialog.PreviewSize.DialogMessage" ) );
  int previewSize = numberDialog.open();
  if ( previewSize > 0 ) {
    TransPreviewProgressDialog progressDialog =
      new TransPreviewProgressDialog(
        shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
    progressDialog.open();

    Trans trans = progressDialog.getTrans();
    String loggingText = progressDialog.getLoggingText();

    if ( !progressDialog.isCancelled() ) {
      if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
        EnterTextDialog etd =
          new EnterTextDialog(
            shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
              .getString( PKG, "System.Dialog.PreviewError.Message" ), loggingText, true );
        etd.setReadOnly();
        etd.open();
      }
    }

    PreviewRowsDialog prd =
      new PreviewRowsDialog(
        shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
          .getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
    prd.open();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:ParGzipCsvInputDialog.java

示例9: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview()
{
	// Create the XML input step
	GetFileNamesMeta oneMeta = new GetFileNamesMeta();
	getInfo(oneMeta);

	TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
			.getText());

	EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogMessage"));
	int previewSize = numberDialog.open();
	if (previewSize > 0)
	{
		TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
				new String[] { wStepname.getText() }, new int[] { previewSize });
		progressDialog.open();

		if (!progressDialog.isCancelled())
		{
			Trans trans = progressDialog.getTrans();
			String loggingText = progressDialog.getLoggingText();

			if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
			{
				EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "GetFileNamesDialog.ErrorInPreview.DialogMessage"), loggingText, true);
				etd.setReadOnly();
				etd.open();
			}
			
			
			PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
					progressDialog.getPreviewRows(wStepname.getText()), loggingText);
			prd.open();
		}
	}
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:37,代码来源:GetFileNamesDialog.java

示例10: helpShowStepPlugins

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
/**
 * Show a dialog containing information on the different step plugins.
 */
public void helpShowStepPlugins() {
  RowBuffer rowBuffer = PluginRegistry.getInstance().getPluginInformation(StepPluginType.class);
  PreviewRowsDialog dialog = new PreviewRowsDialog(shell, null, SWT.NONE, null, rowBuffer.getRowMeta(), rowBuffer
      .getBuffer());
  dialog.setTitleMessage(BaseMessages.getString(PKG, "Spoon.Dialog.StepPluginList.Title"), BaseMessages.getString(
      PKG, "Spoon.Dialog.StepPluginList.Message"));
  dialog.open();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:12,代码来源:Spoon.java

示例11: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview() {
  // Create the XML input step
  GetRepositoryNamesMeta oneMeta = new GetRepositoryNamesMeta();
  getInfo( oneMeta );

  TransMeta previewMeta =
    TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );
  previewMeta.setRepository( repository );

  EnterNumberDialog numberDialog =
    new EnterNumberDialog( shell, props.getDefaultPreviewSize(), BaseMessages.getString(
      PKG, "GetRepositoryNamesDialog.PreviewSize.DialogTitle" ), BaseMessages.getString(
      PKG, "GetRepositoryNamesDialog.PreviewSize.DialogMessage" ) );
  int previewSize = numberDialog.open();
  if ( previewSize > 0 ) {
    TransPreviewProgressDialog progressDialog =
      new TransPreviewProgressDialog(
        shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
    progressDialog.open();

    if ( !progressDialog.isCancelled() ) {
      Trans trans = progressDialog.getTrans();
      String loggingText = progressDialog.getLoggingText();

      if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
        EnterTextDialog etd =
          new EnterTextDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages
            .getString( PKG, "GetRepositoryNamesDialog.ErrorInPreview.DialogMessage" ), loggingText, true );
        etd.setReadOnly();
        etd.open();
      }

      PreviewRowsDialog prd =
        new PreviewRowsDialog(
          shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
            .getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
      prd.open();
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:GetRepositoryNamesDialog.java

示例12: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview() {
  PaloCellInputMeta oneMeta = new PaloCellInputMeta();
  try {
    getInfo(oneMeta);
    if (oneMeta.getFields() == null || oneMeta.getFields().size() == 0) {
      throw new KettleException("Fields must be defined to do a preview");
    } else {
      for (DimensionField field : oneMeta.getFields()) {
        if (Const.isEmpty(field.getFieldType()))
          throw new KettleException("All fields must have an output type to do the preview");
      }
    }
  } catch (KettleException e) {
    new ErrorDialog(shell, BaseMessages.getString(PKG, "RowGeneratorDialog.Illegal.Dialog.Settings.Title"), BaseMessages.getString(PKG, "RowGeneratorDialog.Illegal.Dialog.Settings.Message"), e);
    return;
  }

  TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, textStepName.getText());

  EnterNumberDialog numberDialog = new EnterNumberDialog(shell, 500, BaseMessages.getString(PKG, "System.Dialog.EnterPreviewSize.Title"), BaseMessages.getString(PKG, "System.Dialog.EnterPreviewSize.Message"));
  int previewSize = numberDialog.open();
  if (previewSize > 0) {
    TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { textStepName.getText() }, new int[] { previewSize });
    progressDialog.open();

    Trans trans = progressDialog.getTrans();
    String loggingText = progressDialog.getLoggingText();

    if (!progressDialog.isCancelled()) {
      if (trans.getResult() != null && trans.getResult().getNrErrors() > 0) {
        EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"), BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true);
        etd.setReadOnly();
        etd.open();
      }
    }

    PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, textStepName.getText(), progressDialog.getPreviewRowsMeta(textStepName.getText()), progressDialog.getPreviewRows(textStepName.getText()), loggingText);
    prd.open();
  }
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:41,代码来源:PaloCellInputDialog.java

示例13: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview()
{
	// Create the XML input step
	GetSubFoldersMeta oneMeta = new GetSubFoldersMeta();
	getInfo(oneMeta);

	TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
			.getText());

	EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "GetSubFoldersDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "GetSubFoldersDialog.PreviewSize.DialogMessage"));
	int previewSize = numberDialog.open();
	if (previewSize > 0)
	{
		TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
				new String[] { wStepname.getText() }, new int[] { previewSize });
		progressDialog.open();

		if (!progressDialog.isCancelled())
		{
			Trans trans = progressDialog.getTrans();
			String loggingText = progressDialog.getLoggingText();

			if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
			{
				EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "GetSubFoldersDialog.ErrorInPreview.DialogMessage"), loggingText, true);
				etd.setReadOnly();
				etd.open();
			}
			
			
			PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
					progressDialog.getPreviewRows(wStepname.getText()), loggingText);
			prd.open();
		}
	}
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:37,代码来源:GetSubFoldersDialog.java

示例14: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview() {
	try {
		FastJsonInputMeta oneMeta = new FastJsonInputMeta();
		getInfo(oneMeta);

		TransMeta previewMeta = TransPreviewFactory
				.generatePreviewTransformation(transMeta, oneMeta,
						wStepname.getText());

		EnterNumberDialog numberDialog = new EnterNumberDialog(shell,
				props.getDefaultPreviewSize(), BaseMessages.getString(PKG,
						"FastJsonInputDialog.NumberRows.DialogTitle"),
				BaseMessages.getString(PKG,
						"FastJsonInputDialog.NumberRows.DialogMessage"));

		int previewSize = numberDialog.open();
		if (previewSize > 0) {
			TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
					shell, previewMeta,
					new String[] { wStepname.getText() },
					new int[] { previewSize });
			progressDialog.open();

			if (!progressDialog.isCancelled()) {
				Trans trans = progressDialog.getTrans();
				String loggingText = progressDialog.getLoggingText();

				if (trans.getResult() != null
						&& trans.getResult().getNrErrors() > 0) {
					EnterTextDialog etd = new EnterTextDialog(shell,
							BaseMessages.getString(PKG,
									"System.Dialog.PreviewError.Title"),
							BaseMessages.getString(PKG,
									"System.Dialog.PreviewError.Message"),
							loggingText, true);
					etd.setReadOnly();
					etd.open();
				}
				PreviewRowsDialog prd = new PreviewRowsDialog(shell,
						transMeta, SWT.NONE, wStepname.getText(),
						progressDialog.getPreviewRowsMeta(wStepname
								.getText()),
						progressDialog.getPreviewRows(wStepname.getText()),
						loggingText);
				prd.open();
			}
		}
	} catch (KettleException e) {
		new ErrorDialog(
				shell,
				BaseMessages
						.getString(PKG,
								"FastJsonInputDialog.ErrorPreviewingData.DialogTitle"),
				BaseMessages
						.getString(PKG,
								"FastJsonInputDialog.ErrorPreviewingData.DialogMessage"),
				e);
	}
}
 
开发者ID:etdube,项目名称:pdi-fastjsoninput-plugin,代码行数:60,代码来源:FastJsonInputDialog.java

示例15: preview

import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入方法依赖的package包/类
private void preview()
{
       try
       {
           // Create the XML input step
           LoadFileInputMeta oneMeta = new LoadFileInputMeta();
           getInfo(oneMeta);

		TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
          
           EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "LoadFileInputDialog.NumberRows.DialogTitle"), BaseMessages.getString(PKG, "LoadFileInputDialog.NumberRows.DialogMessage"));
           
           int previewSize = numberDialog.open();
           if (previewSize>0)
           {
               TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
               progressDialog.open();
               
               if (!progressDialog.isCancelled())
               {
                   Trans trans = progressDialog.getTrans();
                   String loggingText = progressDialog.getLoggingText();
                   
                   if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
                   {
                   	EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),  
                   			BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
                   	etd.setReadOnly();
                   	etd.open();
                   }
				
			    PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
						progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
				prd.open();
                   
               }
           }
       }
       catch(KettleException e)
       {
           new ErrorDialog(shell, BaseMessages.getString(PKG, "LoadFileInputDialog.ErrorPreviewingData.DialogTitle"), BaseMessages.getString(PKG, "LoadFileInputDialog.ErrorPreviewingData.DialogMessage"), e);
       }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:44,代码来源:LoadFileInputDialog.java


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