本文整理汇总了Java中org.pentaho.di.ui.core.dialog.PreviewRowsDialog类的典型用法代码示例。如果您正苦于以下问题:Java PreviewRowsDialog类的具体用法?Java PreviewRowsDialog怎么用?Java PreviewRowsDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PreviewRowsDialog类属于org.pentaho.di.ui.core.dialog包,在下文中一共展示了PreviewRowsDialog类的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(Messages.getString("EnterPreviewRowsDialog.Dialog.NoPreviewRowsFound.Title"));
mb.setMessage(Messages.getString("EnterPreviewRowsDialog.Dialog.NoPreviewRowsFound.Message"));
mb.open();
}
}
示例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(Messages.getString("DatabaseDialog.FeatureList.title"), Messages.getString("DatabaseDialog.FeatureList.title")); //$NON-NLS-1$ //$NON-NLS-2$
prd.open();
}
} catch (Exception e) {
new ErrorDialog( parent, Messages.getString("DatabaseDialog.FeatureListError.title"), Messages.getString("DatabaseDialog.FeatureListError.description"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例3: showFeatureList
import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入依赖的package包/类
public void showFeatureList()
{
DatabaseMeta dbinfo = new DatabaseMeta();
try
{
getInfo(dbinfo);
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(shell, dbinfo, SWT.NONE, null, rowMeta, rowData); //$NON-NLS-1$
prd.setTitleMessage(Messages.getString("DatabaseDialog.FeatureList.title"), Messages.getString("DatabaseDialog.FeatureList.title")); //$NON-NLS-1$ //$NON-NLS-2$
prd.open();
}
}
catch (KettleException e)
{
new ErrorDialog(shell,
Messages.getString("DatabaseDialog.FeatureListError.title"), Messages.getString("DatabaseDialog.FeatureListError.description"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例4: 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();
}
}
示例5: 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$
}
}
示例6: 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();
}
}
}
}
示例7: 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(), Messages.getString("GetSubFoldersDialog.PreviewSize.DialogTitle"), Messages.getString("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, Messages.getString("System.Dialog.Error.Title"), Messages.getString("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();
}
}
}
示例8: preview
import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入依赖的package包/类
private void preview()
{
// execute a complete preview transformation in the background.
// This is how we do it...
//
FixedInputMeta oneMeta = new FixedInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("FixedInputDialog.PreviewSize.DialogTitle"), Messages.getString("FixedInputDialog.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, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("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();
}
}
示例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(), Messages.getString("GetFileNamesDialog.PreviewSize.DialogTitle"), Messages.getString("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, Messages.getString("System.Dialog.Error.Title"), Messages.getString("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();
}
}
}
示例10: preview
import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入依赖的package包/类
private void preview()
{
try
{
// Create the XML input step
XMLInputSaxMeta oneMeta = new XMLInputSaxMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(
shell,
500,
Messages.getString("XMLInputSaxDialog.Dialog.EnterPreviewSize.Title"), Messages.getString("XMLInputSaxDialog.Dialog.EnterPreviewSize.Message")); //$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();
if (!progressDialog.isCancelled())
{
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()),
progressDialog.getPreviewRows(wStepname.getText()));
prd.open();
}
}
} catch (KettleException e)
{
new ErrorDialog(
shell,
Messages.getString("XMLInputSaxDialog.Dialog.ErrorDisplayingPreviewData.Title"), Messages.getString("XMLInputSaxDialog.Dialog.ErrorDisplayingPreviewData.Message"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例11: 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(), Messages.getString("ParGzipCsvInputDialog.PreviewSize.DialogTitle"), Messages.getString("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, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("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();
}
}
示例12: 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...
TableInputMeta oneMeta = new TableInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("TableInputDialog.EnterPreviewSize"), Messages.getString("TableInputDialog.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, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("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();
}
}
示例13: 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(), Messages.getString("MondrianInputDialog.EnterPreviewSize"), Messages.getString("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, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("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();
}
}
示例14: preview
import org.pentaho.di.ui.core.dialog.PreviewRowsDialog; //导入依赖的package包/类
private void preview()
{
// Create the XML input step
CsvInputMeta oneMeta = new CsvInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("CsvInputDialog.PreviewSize.DialogTitle"), Messages.getString("CsvInputDialog.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, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("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();
}
}
示例15: 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();
}