/*
* Created on 2004/10/07
* Author aki@www.xucker.jpn.org
* License Apache2.0 or Common Public License
*/
package org.jpn.xucker.commons.swt.ui;
import java.io.File;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.jpn.xucker.commons.util.FileNotFoundAction;
/**
*
*
*/
public class SWTFileNoFoundtAction implements FileNotFoundAction{
Shell shell;
public SWTFileNoFoundtAction(Shell shell){
this.shell=shell;
}
/* (non-Javadoc)
* @see org.jpn.xucker.commons.util.FileNotFoundAction#exec()
*/
public void exec(File file,String message) {
MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
box.setMessage("ファイル " + file + "\r\n\r\n"
+ "がないためアプリケーションを終了します。\r\n"
+ message);
//int result=box.open();
//never use result int,for PMD
box.open();
shell.close();
}
}
|