本文整理汇总了Java中org.pentaho.di.ui.core.dialog.EnterTextDialog.open方法的典型用法代码示例。如果您正苦于以下问题:Java EnterTextDialog.open方法的具体用法?Java EnterTextDialog.open怎么用?Java EnterTextDialog.open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.core.dialog.EnterTextDialog
的用法示例。
在下文中一共展示了EnterTextDialog.open方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: view
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
private void view()
{
StringBuffer message=new StringBuffer();
TableItem item[] = wFields.table.getSelection();
// None selected: don't waste users time: select them all!
if (item.length==0) item=wFields.table.getItems();
for (int i=0;i<item.length;i++)
{
if (i>0)
message.append("_______________________________________________________________________________").append(Const.CR).append(Const.CR);
message.append("[").append(item[i].getText(2)).append("] ").append(item[i].getText(1)).append(Const.CR);
message.append(" ").append(item[i].getText(3)).append(Const.CR).append(Const.CR);
}
String subtitle = (item.length != 1 ?
Messages.getString("CheckResultDialog.TextDialog.SubtitlePlural") :
Messages.getString("CheckResultDialog.TextDialog.Subtitle"));
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("CheckResultDialog.TextDialog.Title"),
subtitle, message.toString());
etd.setReadOnly();
etd.open();
}
示例2: pause
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
protected void pause() {
TreeEntry treeEntry = getTreeEntry();
if (treeEntry == null)
return;
// Transformations
//
if (treeEntry.isTransformation()) {
try {
WebResult webResult = slaveServer.pauseResumeTransformation(treeEntry.name, treeEntry.id);
if (!webResult.getResult().equalsIgnoreCase(WebResult.STRING_OK)) {
EnterTextDialog dialog = new EnterTextDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title"),
BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Message"), webResult.getMessage());
dialog.setReadOnly();
dialog.open();
}
} catch (Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title"), BaseMessages.getString(PKG,
"SpoonSlave.ErrorPausingOrResumingTrans.Message"), e);
}
}
}
示例3: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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();
}
}
}
}
示例4: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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, "System.Dialog..PreviewSize.DialogTitle"), BaseMessages.getString(PKG,
"System.Dialog..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();
}
}
示例5: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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...
DataGridMeta oneMeta = new DataGridMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Title"), BaseMessages.getString(PKG, "DataGridDialog.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();
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();
}
}
示例6: test
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
public void test()
{
try
{
getInfo();
String xml = "<sample/>"; //$NON-NLS-1$
String reply = slaveServer.sendXML(xml, AddTransServlet.CONTEXT_PATH);
String message = BaseMessages.getString(PKG, "SlaveServer.Replay.Info1") //$NON-NLS-1$
+slaveServer.constructUrl(AddTransServlet.CONTEXT_PATH)+Const.CR+
BaseMessages.getString(PKG, "SlaveServer.Replay.Info2") +Const.CR+Const.CR; //$NON-NLS-1$
message+=xml;
message+=Const.CR+Const.CR;
message+="Reply was:"+Const.CR+Const.CR; //$NON-NLS-1$
message+=reply+Const.CR;
EnterTextDialog dialog = new EnterTextDialog(shell, "XML", BaseMessages.getString(PKG, "SlaveServer.RetournedXMLInfo"), message); //$NON-NLS-1$ //$NON-NLS-2$
dialog.open();
}
catch(Exception e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "SlaveServer.ExceptionError"), BaseMessages.getString(PKG, "SlaveServer.ExceptionUnableGetReplay.Error1") //$NON-NLS-1$ //$NON-NLS-2$
+slaveServer.getHostname()+ BaseMessages.getString(PKG, "SlaveServer.ExceptionUnableGetReplay.Error2"), e); //$NON-NLS-1$
}
}
示例7: test
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
/**
* Test the database connection
*/
public static final void test(Shell shell, DatabaseMeta dbinfo)
{
String[] remarks = dbinfo.checkParameters();
if (remarks.length == 0)
{
// Get a "test" report from this database
//
String reportMessage = dbinfo.testConnection();
EnterTextDialog dialog = new EnterTextDialog(shell, Messages.getString("DatabaseDialog.ConnectionReport.title"), Messages.getString("DatabaseDialog.ConnectionReport.description"), reportMessage.toString()); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setReadOnly();
dialog.setFixed(true);
dialog.setModal();
dialog.open();
}
else
{
String message = ""; //$NON-NLS-1$
for (int i = 0; i < remarks.length; i++)
message += " * " + remarks[i] + Const.CR; //$NON-NLS-1$
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(Messages.getString("DatabaseDialog.ErrorParameters2.title")); //$NON-NLS-1$
mb.setMessage(Messages.getString("DatabaseDialog.ErrorParameters2.description", message)); //$NON-NLS-1$
mb.open();
}
}
示例8: newNote
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
public void newNote() {
selrect = null;
String title = Messages.getString("JobGraph.Dialog.EditNote.Title");
String message = Messages.getString("JobGraph.Dialog.EditNote.Message");
EnterTextDialog dd = new EnterTextDialog(shell, title, message, "");
String n = dd.open();
if (n != null) {
NotePadMeta npi = new NotePadMeta(n, lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE);
jobMeta.addNote(npi);
spoon.addUndoNew(jobMeta, new NotePadMeta[] { npi }, new int[] { jobMeta.indexOfNote(npi) });
redraw();
}
}
示例9: test
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
/**
* Test the database connection
*/
public static final void test(Shell shell, DatabaseMeta dbinfo)
{
String[] remarks = dbinfo.checkParameters();
if (remarks.length == 0)
{
// Get a "test" report from this database
//
String reportMessage = dbinfo.testConnection();
EnterTextDialog dialog = new EnterTextDialog(shell, BaseMessages.getString(PKG, "DatabaseDialog.ConnectionReport.title"), BaseMessages.getString(PKG, "DatabaseDialog.ConnectionReport.description"), reportMessage.toString()); //$NON-NLS-1$ //$NON-NLS-2$
dialog.setReadOnly();
dialog.setFixed(true);
dialog.setModal();
dialog.open();
}
else
{
String message = ""; //$NON-NLS-1$
for (int i = 0; i < remarks.length; i++)
message += " * " + remarks[i] + Const.CR; //$NON-NLS-1$
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(BaseMessages.getString(PKG, "DatabaseDialog.ErrorParameters2.title")); //$NON-NLS-1$
mb.setMessage(BaseMessages.getString(PKG, "DatabaseDialog.ErrorParameters2.description", message)); //$NON-NLS-1$
mb.open();
}
}
示例10: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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();
}
}
示例11: newNote
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
public void newNote() {
String title = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Title");
String message = BaseMessages.getString(PKG, "JobGraph.Dialog.EditNote.Message");
EnterTextDialog dd = new EnterTextDialog(shell, title, message, "");
String n = dd.open();
if (n != null) {
NotePadMeta npi = new NotePadMeta(n, lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE, ConstUI.NOTE_MIN_SIZE);
jobMeta.addNote(npi);
spoon.addUndoNew(jobMeta, new NotePadMeta[] { npi }, new int[] { jobMeta.indexOfNote(npi) });
redraw();
}
}
示例12: editDescription
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的package包/类
public void editDescription(StepMeta stepMeta) {
String title = BaseMessages.getString(PKG, "TransGraph.Dialog.StepDescription.Title"); //$NON-NLS-1$
String message = BaseMessages.getString(PKG, "TransGraph.Dialog.StepDescription.Message"); //$NON-NLS-1$
EnterTextDialog dd = new EnterTextDialog(shell, title, message, stepMeta.getDescription());
String d = dd.open();
if (d != null)
stepMeta.setDescription(d);
}
示例13: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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();
}
}
示例14: preview
import org.pentaho.di.ui.core.dialog.EnterTextDialog; //导入方法依赖的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.core.dialog.EnterTextDialog; //导入方法依赖的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();
}
}
}