/*
* Created on 2004/06/27
*
* Author aki@www.xucker.jpn.org
* License Apache2.0 or Common Public License
*/
package org.jpn.xucker.returncode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
/**
* @author ak
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class ReturnCodeMain {
private int width=200;
private int height=200;
/**
* @param shell
*/
public ReturnCodeMain(Shell shell) {
Rectangle rect=Display.getDefault().getPrimaryMonitor().getBounds();
TabFolder tab=new TabFolder(shell,SWT.NONE);
shell.setBounds((rect.width-width)/2,(rect.height-height)/2,width,height);
shell.setText("改行コード判定・変換器");
shell.setLayout(new FillLayout(SWT.VERTICAL));
TabItem item=new TabItem(tab,SWT.NONE);
TabItem item2=new TabItem(tab,SWT.NONE);
item2.setText("変換");
item2.setToolTipText("ファイルの改行コードを変換します");
item.setText("判定");
item.setToolTipText("単独のファイルを判定します。");
Button button;
button=new Button(tab,SWT.NONE);
button.setText("button");
item.setControl(button);
}
public static void main(String[] args) {
Display display=new Display();
Shell shell=new Shell(display);
ReturnCodeMain button=new ReturnCodeMain(shell);
shell.open();
while(!shell.isDisposed()){
if (!display.readAndDispatch ()){
display.sleep ();
}
}
display.dispose();
}
}
|