本文整理汇总了Java中org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog.isCancelled方法的典型用法代码示例。如果您正苦于以下问题:Java TransPreviewProgressDialog.isCancelled方法的具体用法?Java TransPreviewProgressDialog.isCancelled怎么用?Java TransPreviewProgressDialog.isCancelled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog
的用法示例。
在下文中一共展示了TransPreviewProgressDialog.isCancelled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
}
}
示例2: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
}
示例3: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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(), BaseMessages
.getString(PKG, "FixedInputDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG,
"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, 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();
}
}
示例4: profileTable
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
/**
* Fire off a transformation that data profiles the specified table...<br>
*
*
* @param tableName
*/
public void profileTable(String tableName)
{
try {
TransProfileFactory profileFactory = new TransProfileFactory(dbMeta, tableName);
TransMeta transMeta = profileFactory.generateTransformation(new LoggingObject(tableName));
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell,
transMeta,
new String[] { TransProfileFactory.RESULT_STEP_NAME, }, new int[] { 25000, } );
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, TransProfileFactory.RESULT_STEP_NAME,
progressDialog.getPreviewRowsMeta(TransProfileFactory.RESULT_STEP_NAME), progressDialog
.getPreviewRows(TransProfileFactory.RESULT_STEP_NAME), loggingText);
prd.open();
}
} catch(Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG,"DatabaseExplorerDialog.UnexpectedProfilingError.Title"),
BaseMessages.getString(PKG,"DatabaseExplorerDialog.UnexpectedProfilingError.Message"), e);
}
}
示例5: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
}
示例6: dataProfile
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
public void dataProfile(){
Shell dbShell = (Shell) dbExplorerDialog.getRootObject();
try {
TransProfileFactory profileFactory = new TransProfileFactory(this.model.getDatabaseMeta(), getSchemaAndTable(this.model));
TransMeta transMeta = profileFactory.generateTransformation(new LoggingObject(model.getTable()));
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(dbShell,
transMeta,
new String[] { TransProfileFactory.RESULT_STEP_NAME, }, new int[] { 25000, } );
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(dbShell, BaseMessages.getString(PKG,"System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG,"System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(dbShell, transMeta, SWT.NONE, TransProfileFactory.RESULT_STEP_NAME,
progressDialog.getPreviewRowsMeta(TransProfileFactory.RESULT_STEP_NAME), progressDialog
.getPreviewRows(TransProfileFactory.RESULT_STEP_NAME), loggingText);
prd.open();
}
} catch(Exception e) {
new ErrorDialog(this.dbExplorerDialog.getShell(), BaseMessages.getString(PKG,"DatabaseExplorerDialog.UnexpectedProfilingError.Title"),
BaseMessages.getString(PKG,"DatabaseExplorerDialog.UnexpectedProfilingError.Message"), e);
}
}
示例7: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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, true);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "TableInputDialog.EnterPreviewSize"), BaseMessages.getString(PKG, "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, 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(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
}
示例8: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
示例9: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
private void preview(){
OpenERPObjectInputMeta testMeta = new OpenERPObjectInputMeta();
if (!SaveToMeta(testMeta))
return;
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, testMeta, textStepName.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, 500, BaseMessages.getString("System.Dialog.EnterPreviewSize.Title"), BaseMessages.getString("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("System.Dialog.PreviewError.Title"), BaseMessages.getString("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();
}
}
示例10: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
private void preview()
{
// Create the XML input step
SapInputMeta oneMeta = new SapInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
transMeta.getVariable("Internal.Transformation.Filename.Directory");
previewMeta.getVariable("Internal.Transformation.Filename.Directory");
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "CsvInputDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "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, 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();
}
}
示例11: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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" ) );
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();
}
}
示例12: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
private void preview() {
// execute a complete preview transformation in the background.
// This is how we do it...
//
XMLInputStreamMeta oneMeta = new XMLInputStreamMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages
.getString(PKG, "XMLInputStreamDialog.Dialog.EnterPreviewSize.Title"), BaseMessages.getString(PKG,
"XMLInputStreamDialog.Dialog.EnterPreviewSize.Message"));
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();
}
}
示例13: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
}
示例14: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的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();
}
}
}
示例15: preview
import org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog; //导入方法依赖的package包/类
private void preview() {
OpenERPObjectInputMeta testMeta = new OpenERPObjectInputMeta();
if ( !SaveToMeta( testMeta ) ) {
return;
}
TransMeta previewMeta =
TransPreviewFactory.generatePreviewTransformation( transMeta, testMeta, textStepName.getText() );
EnterNumberDialog numberDialog =
new EnterNumberDialog( shell, 500, BaseMessages.getString( "System.Dialog.EnterPreviewSize.Title" ),
BaseMessages.getString( "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( "System.Dialog.PreviewError.Title" ), BaseMessages
.getString( "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();
}
}