本文整理汇总了Java中org.pentaho.di.ui.job.dialog.JobDialog类的典型用法代码示例。如果您正苦于以下问题:Java JobDialog类的具体用法?Java JobDialog怎么用?Java JobDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobDialog类属于org.pentaho.di.ui.job.dialog包,在下文中一共展示了JobDialog类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: editProperties
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public static boolean editProperties(JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange) {
if (jobMeta == null)
return false;
JobDialog jd = new JobDialog(spoon.getShell(), SWT.NONE, jobMeta, rep);
jd.setDirectoryChangeAllowed(allowDirectoryChange);
JobMeta ji = jd.open();
// In this case, load shared objects
//
if (jd.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = jobMeta.readSharedObjects(rep);
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (Exception e) {
new ErrorDialog(spoon.getShell(), Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Title"),
Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs
.makeJobGraphTabName(jobMeta)), e);
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(jobMeta, jobMeta);
if (jd.isSharedObjectsFileChanged() || ji != null) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例2: editProperties
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public static boolean editProperties(JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange) {
if (jobMeta == null)
return false;
JobDialog jd = new JobDialog(spoon.getShell(), SWT.NONE, jobMeta, rep);
jd.setDirectoryChangeAllowed(allowDirectoryChange);
JobMeta ji = jd.open();
// In this case, load shared objects
//
if (jd.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = rep!=null ? rep.readJobMetaSharedObjects(jobMeta) : jobMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (Exception e) {
new ErrorDialog(spoon.getShell(), BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title"),
BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs.makeTabName(jobMeta, true)), e);
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(jobMeta, jobMeta);
if (jd.isSharedObjectsFileChanged() || ji != null) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例3: open
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public JobEntryInterface open() {
Shell parent = getParent();
display = parent.getDisplay();
shell = new Shell( parent, props.getJobsDialogStyle() );
props.setLook( shell );
JobDialog.setShellImage( shell, jobEntry );
backupChanged = jobEntry.hasChanged();
createElements();
// Detect [X] or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() {
public void shellClosed( ShellEvent e ) {
cancel();
}
} );
getData();
setActive();
BaseStepDialog.setSize( shell );
int width = 750;
int height = Const.isWindows() ? 730 : 718;
shell.setSize( width, height );
shell.open();
while ( !shell.isDisposed() ) {
if ( !display.readAndDispatch() ) {
display.sleep();
}
}
return jobEntry;
}
示例4: open
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public JobEntryInterface open() {
Shell parent = getParent();
display = parent.getDisplay();
shell = new Shell( parent, props.getJobsDialogStyle() );
props.setLook( shell );
JobDialog.setShellImage( shell, jobEntry );
backupChanged = jobEntry.hasChanged();
createElements();
// Detect [X] or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() {
public void shellClosed( ShellEvent e ) {
cancel();
}
} );
getData();
setActive();
BaseStepDialog.setSize( shell );
int width = 750;
int height = Const.isWindows() ? 730 : 720;
shell.setSize( width, height );
shell.open();
while ( !shell.isDisposed() ) {
if ( !display.readAndDispatch() ) {
display.sleep();
}
}
return jobEntry;
}
示例5: editProperties
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public static boolean editProperties( JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange ) {
if ( jobMeta == null ) {
return false;
}
JobDialog jd = new JobDialog( spoon.getShell(), SWT.NONE, jobMeta, rep );
jd.setDirectoryChangeAllowed( allowDirectoryChange );
JobMeta ji = jd.open();
// In this case, load shared objects
//
if ( jd.isSharedObjectsFileChanged() ) {
try {
SharedObjects sharedObjects =
rep != null ? rep.readJobMetaSharedObjects( jobMeta ) : jobMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put( sharedObjects.getFilename(), sharedObjects );
} catch ( Exception e ) {
new ErrorDialog( spoon.getShell(),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title" ),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs.makeTabName( jobMeta, true ) ), e );
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI( jobMeta, jobMeta );
if ( jd.isSharedObjectsFileChanged() || ji != null ) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例6: open
import org.pentaho.di.ui.job.dialog.JobDialog; //导入依赖的package包/类
public JobEntryInterface open()
{
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
props.setLook(shell);
JobDialog.setShellImage(shell, jobEntry);
FormLayout formLayout = new FormLayout ();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout(formLayout);
shell.setText("Do Login ON EAI");
int margin = Const.MARGIN;
wOK=new Button(shell, SWT.PUSH);
wOK.setText(" &OK ");
BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK }, margin,null);
lsOK = new Listener() { public void handleEvent(Event e) { ok(); } };
wOK.addListener (SWT.Selection, lsOK );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() { public void shellClosed(ShellEvent e) { ok(); } } );
BaseStepDialog.setSize(shell);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch()) display.sleep();
}
return jobEntry;
}