@Override
public void execute() {
Set<JsJob> jobs = getSelectedSet();
final JsJob jsJob = jobs.iterator().next();
IDialogCallback callback = new IDialogCallback() {
public void okPressed() {
// delete the old one
removeBlockout( jsJob );
refreshCallBack.okPressed();
}
public void cancelPressed() {
refreshCallBack.cancelPressed();
}
};
NewBlockoutScheduleDialog blockoutDialog = new NewBlockoutScheduleDialog( jsJob, callback, false, true );
table.selectRow( list.indexOf( jsJob ) );
blockoutDialog.setUpdateMode();
blockoutDialog.center();
}
} );
editButton.setToolTip( Messages.getString( "blockoutEdit" ) );
removeButton = new ToolbarButton( ImageUtil.getThemeableImage( "pentaho-deletebutton" ) );
removeButton.setEnabled( false );
removeButton.setCommand( new Command() {
public void execute() {
final Set<JsJob> selectedSet = getSelectedSet();
final Label messageTextBox = new Label( Messages.getString( "deleteBlockoutWarning", ""
+ selectedSet.size() ) );
final PromptDialogBox blockoutDeleteWarningDialogBox =
new PromptDialogBox( Messages.getString( "delete" ), Messages.getString( "yesDelete" ), Messages
.getString( "no" ), true, true );
blockoutDeleteWarningDialogBox.setContent( messageTextBox );
final IDialogCallback callback = new IDialogCallback() {
public void cancelPressed() {
blockoutDeleteWarningDialogBox.hide();
}