亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dialogtest.java

?? 我用Java編寫的一個Demo包括了所Dialog的調用
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.jiachun;

import org.eclipse.swt.SWT;
import java.io.*;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
//import org.eclipse.swt.widgets.List;
//import org.eclipse.swt.widgets.Scale;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.swtdesigner.SWTResourceManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.widgets.FontDialog;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.printing.PrintDialog;
import org.eclipse.swt.printing.Printer;
import org.eclipse.swt.printing.PrinterData;
import org.eclipse.swt.graphics.GC;
//import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;


public class DialogTest {

	private static Text listfileText;
	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String[] args) {
		final Display display = Display.getDefault();
		final Shell allDialogsTestShell = new Shell();
		allDialogsTestShell.addShellListener(new ShellAdapter() {
			public void shellClosed(final ShellEvent e) {

			}
			public void shellDeiconified(final ShellEvent e) {
				boolean rsl=MessageDialog.openConfirm(allDialogsTestShell, "Confirm", "Confirm Dialog!");
				if(rsl==true)
					System.exit(0);
				else
					return;
			}
		});
		allDialogsTestShell.setBackgroundMode(SWT.INHERIT_DEFAULT);
		allDialogsTestShell.setImage(SWTResourceManager.getImage(DialogTest.class, "Icon.ico"));
		allDialogsTestShell.setBackgroundImage(SWTResourceManager.getImage(DialogTest.class, "Background.jpg"));
		allDialogsTestShell.setLayout(new FormLayout());
		allDialogsTestShell.setSize(506, 407);
		allDialogsTestShell.setText("All Dialog Test");
		//

		allDialogsTestShell.open();

		final Button exitButton = new Button(allDialogsTestShell, SWT.NONE);
		exitButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				System.exit(0);
			}
		});
		final FormData fd_exitButton = new FormData();
		fd_exitButton.right = new FormAttachment(0, 126);
		fd_exitButton.left = new FormAttachment(0, 90);
		exitButton.setLayoutData(fd_exitButton);
		exitButton.setText("Exit");

		final Group messagedialogGroup = new Group(allDialogsTestShell, SWT.NONE);
		messagedialogGroup.setText("MessageDialog");
		final FormData fd_messagedialogGroup = new FormData();
		fd_messagedialogGroup.bottom = new FormAttachment(0, 170);
		fd_messagedialogGroup.right = new FormAttachment(0, 230);
		fd_messagedialogGroup.top = new FormAttachment(0, 90);
		fd_messagedialogGroup.left = new FormAttachment(0, 10);
		messagedialogGroup.setLayoutData(fd_messagedialogGroup);
		messagedialogGroup.setLayout(new FormLayout());

		final Label showLabel = new Label(allDialogsTestShell, SWT.SHADOW_NONE | SWT.BORDER);
		showLabel.setForeground(SWTResourceManager.getColor(255, 0, 255));
		showLabel.setFont(SWTResourceManager.getFont("宋體", 11, SWT.NONE));
		showLabel.setAlignment(SWT.CENTER);
		final FormData fd_showLabel = new FormData();
		fd_showLabel.bottom = new FormAttachment(0, 367);
		fd_showLabel.top = new FormAttachment(0, 350);
		showLabel.setLayoutData(fd_showLabel);
		showLabel.setText("This display show the result of dialogs.");
		
		final Button okButton = new Button(messagedialogGroup, SWT.NONE);
		okButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				MessageDialog.openInformation(allDialogsTestShell,"Hello!","Hello!");
				showLabel.setText("return void");
			}
		});
		final FormData fd_okButton = new FormData();
		fd_okButton.top = new FormAttachment(0, 10);
		fd_okButton.left = new FormAttachment(0, 10);
		okButton.setLayoutData(fd_okButton);
		okButton.setText("OK");

		final Button cancelButton = new Button(messagedialogGroup, SWT.NONE);
		cancelButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				boolean rsl=MessageDialog.openConfirm(allDialogsTestShell, "Confirm", "Confirm Dialog!");
				showLabel.setText("return "+rsl);
			}
		});
		final FormData fd_cancelButton = new FormData();
		fd_cancelButton.top = new FormAttachment(okButton, 0, SWT.TOP);
		fd_cancelButton.left = new FormAttachment(0, 45);
		cancelButton.setLayoutData(fd_cancelButton);
		cancelButton.setText("OkCancel");

		final Button warningButton = new Button(messagedialogGroup, SWT.NONE);
		warningButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				MessageDialog.openWarning(allDialogsTestShell, "Warning", "Warning Dialog!");
				showLabel.setText("return void");
			}
		});
		final FormData fd_warningButton = new FormData();
		fd_warningButton.top = new FormAttachment(cancelButton, 0, SWT.TOP);
		fd_warningButton.left = new FormAttachment(0, 130);
		warningButton.setLayoutData(fd_warningButton);
		warningButton.setText("warning");

		final Button errorButton = new Button(messagedialogGroup, SWT.NONE);
		errorButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				MessageDialog.openError(allDialogsTestShell, "Error", "Error Dialog");
				showLabel.setText("return void");
			}
		});
		final FormData fd_errorButton = new FormData();
		fd_errorButton.top = new FormAttachment(okButton, 5, SWT.BOTTOM);
		fd_errorButton.left = new FormAttachment(okButton, 0, SWT.LEFT);
		errorButton.setLayoutData(fd_errorButton);
		errorButton.setText("Error");

		final Button questionButton = new Button(messagedialogGroup, SWT.NONE);
		questionButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				boolean rsl=MessageDialog.openQuestion(allDialogsTestShell, "Question", "Question Dialog!");
				showLabel.setText("return "+rsl);
			}
		});
		final FormData fd_questionButton = new FormData();
		fd_questionButton.bottom = new FormAttachment(cancelButton, 27, SWT.BOTTOM);
		fd_questionButton.top = new FormAttachment(cancelButton, 5, SWT.BOTTOM);
		fd_questionButton.right = new FormAttachment(0, 130);
		fd_questionButton.left = new FormAttachment(0, 70);
		questionButton.setLayoutData(fd_questionButton);
		questionButton.setText("Question");

		Group systemdialogGroup;
		systemdialogGroup = new Group(allDialogsTestShell, SWT.NONE);
		fd_exitButton.bottom = new FormAttachment(systemdialogGroup, 27, SWT.BOTTOM);
		fd_exitButton.top = new FormAttachment(systemdialogGroup, 5, SWT.BOTTOM);
		fd_showLabel.right = new FormAttachment(systemdialogGroup, 474, SWT.LEFT);
		fd_showLabel.left = new FormAttachment(systemdialogGroup, 0, SWT.LEFT);
		systemdialogGroup.setText("SystemDialog");
		final FormData fd_systemdialogGroup = new FormData();
		fd_systemdialogGroup.bottom = new FormAttachment(0, 260);
		fd_systemdialogGroup.left = new FormAttachment(messagedialogGroup, -220, SWT.RIGHT);
		fd_systemdialogGroup.right = new FormAttachment(messagedialogGroup, 0, SWT.RIGHT);
		fd_systemdialogGroup.top = new FormAttachment(messagedialogGroup, 5, SWT.BOTTOM);
		systemdialogGroup.setLayoutData(fd_systemdialogGroup);
		systemdialogGroup.setLayout(new FormLayout());

		final Button openfileButton = new Button(systemdialogGroup, SWT.NONE);
		openfileButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				FileDialog fd = new FileDialog(allDialogsTestShell, SWT.OPEN);
		        fd.setText("Open");
		        fd.setFilterPath("C:/");
		        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
		        fd.setFilterExtensions(filterExt);
		        String selected = fd.open();
		        if(selected!=null){
		        	showLabel.setText(selected);
		        }
		        else{		        	
		        	showLabel.setText("return null"); 
		        }
			}
		});
		final FormData fd_openfileButton = new FormData();
		fd_openfileButton.top = new FormAttachment(0, 10);
		fd_openfileButton.left = new FormAttachment(0, 10);
		openfileButton.setLayoutData(fd_openfileButton);
		openfileButton.setText("OpenFile");

		final Button savefileButton = new Button(systemdialogGroup, SWT.NONE);
		savefileButton.addMouseListener(new MouseAdapter() {
			public void mouseUp(final MouseEvent e) {
				FileDialog fd = new FileDialog(allDialogsTestShell, SWT.SAVE);
		        fd.setText("Save");
		        fd.setFilterPath("C:/");
		        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
		        fd.setFilterExtensions(filterExt);
		        String selected = fd.open();
		        if(selected!=null){
		        	showLabel.setText(selected);
		        }
		        else{		        	
		        	showLabel.setText("return null"); 
		        }
			}
		});
		final FormData fd_savefileButton = new FormData();
		fd_savefileButton.left = new FormAttachment(0, 82);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女视频黄免费的久久| 亚洲成人一区二区| 91精品国产欧美一区二区18| 成人性生交大片免费| 国产一区二区三区免费看| 麻豆91免费观看| 看电视剧不卡顿的网站| 久久精品国产99久久6| 精品在线一区二区| 国产一区二区在线影院| 国产精品1024| 91尤物视频在线观看| 色综合久久综合网欧美综合网 | 欧美日韩一区三区| 欧美综合在线视频| 欧美肥妇毛茸茸| 精品久久久久久久久久久久包黑料| 日韩欧美高清一区| 精品成人免费观看| 国产丝袜美腿一区二区三区| 国产精品免费人成网站| 亚洲另类春色国产| 秋霞午夜av一区二区三区| 国产一区二区精品久久99| 不卡一二三区首页| 欧美性一二三区| 精品国产亚洲一区二区三区在线观看| 久久久久久久久97黄色工厂| 亚洲人成亚洲人成在线观看图片| 亚洲综合久久av| 理论电影国产精品| 91老师片黄在线观看| 日韩午夜在线观看| 亚洲三级在线免费观看| 久久国产乱子精品免费女| 不卡一区在线观看| 欧美一区二区三区四区在线观看| 久久久久久久久久久电影| 亚洲免费av在线| 九一久久久久久| 91九色最新地址| 久久综合精品国产一区二区三区| 亚洲精品国产高清久久伦理二区| 免费在线观看精品| 色综合久久综合| 久久综合九色综合97_久久久| 一二三区精品福利视频| 国产成人自拍网| 在线播放国产精品二区一二区四区| 久久精品视频免费| 日韩高清一区在线| 91福利社在线观看| 久久久美女毛片| 日本特黄久久久高潮| 日本久久电影网| 国产精品热久久久久夜色精品三区| 日韩电影在线免费看| 99久久免费精品高清特色大片| 精品国产乱码久久久久久久| 日韩精品一级二级| 在线观看网站黄不卡| 国产精品国产三级国产aⅴ入口 | 成人精品视频.| 日韩精品一区二区三区老鸭窝| 一区二区在线观看视频| 91丨九色丨黑人外教| 欧美激情一区二区三区| 国产精品99久久久久久宅男| 亚洲精品一区二区三区四区高清 | 国产老妇另类xxxxx| 精品毛片乱码1区2区3区| 日精品一区二区三区| 欧美日本在线视频| 亚洲黄色小说网站| 在线视频一区二区免费| 亚洲一区日韩精品中文字幕| av午夜一区麻豆| 国产精品久久看| av一区二区三区在线| 国产精品的网站| 91麻豆蜜桃一区二区三区| 日本一区二区三区在线不卡 | 中文成人综合网| 国产xxx精品视频大全| 国产亚洲一区二区三区| 国产v综合v亚洲欧| ...av二区三区久久精品| 色哟哟一区二区在线观看| 一区二区三区在线免费| 欧美日本在线看| 九九九精品视频| 亚洲欧美日韩国产中文在线| 国产成人免费视频网站高清观看视频| 精品久久久久香蕉网| 国产精品一区二区果冻传媒| 中文字幕欧美激情一区| youjizz国产精品| 亚洲综合色网站| 777午夜精品免费视频| 国产做a爰片久久毛片| 国产欧美日韩视频在线观看| 91亚洲精品一区二区乱码| 亚洲国产欧美日韩另类综合| 欧美一区二区久久| 国产精品亚洲午夜一区二区三区 | 欧美日韩免费观看一区二区三区 | 精品视频一区二区不卡| 精品无人码麻豆乱码1区2区| 国产欧美一区二区精品性色 | 理论电影国产精品| 国产精品乱人伦| 欧美精品tushy高清| 岛国精品在线播放| 一区二区三区四区亚洲| 精品福利一区二区三区| 91天堂素人约啪| 免费成人美女在线观看| 亚洲欧美一区二区久久| 欧美xxxxx牲另类人与| 色偷偷成人一区二区三区91| 久热成人在线视频| 亚洲最大的成人av| 久久精品亚洲精品国产欧美kt∨ | 日韩av网站免费在线| 综合激情网...| 久久久久国产精品免费免费搜索 | 久久国产婷婷国产香蕉| 一区二区国产盗摄色噜噜| 久久精品夜夜夜夜久久| 日韩欧美二区三区| 色综合久久久久综合| 国产精品91一区二区| 亚洲成在人线在线播放| 亚洲天堂福利av| 久久蜜桃一区二区| 日韩一区二区三区四区| 欧美日本视频在线| 欧美性大战久久久久久久蜜臀| 成人国产精品视频| 精品制服美女久久| 久久精品免费观看| 午夜免费久久看| 亚洲精品福利视频网站| 中文字幕人成不卡一区| 国产精品视频你懂的| 国产午夜精品久久久久久久| 日韩免费观看高清完整版| 欧美日韩国产123区| 欧美日韩色综合| 在线观看一区日韩| 色av一区二区| 色国产综合视频| 色播五月激情综合网| 欧美三级视频在线观看| 欧美色图一区二区三区| 欧美视频自拍偷拍| 91搞黄在线观看| 日本韩国欧美一区| 欧美中文字幕一区| 欧洲在线/亚洲| 欧美久久久久免费| 欧美一区二区日韩一区二区| 欧美一区二区在线不卡| 日韩欧美一二区| 久久九九99视频| 国产精品久久久久久久久免费丝袜| 国产精品伦理一区二区| 亚洲另类色综合网站| 亚洲图片自拍偷拍| 蜜臂av日日欢夜夜爽一区| 国产一区二区三区不卡在线观看 | 国产成人免费在线视频| 97aⅴ精品视频一二三区| 欧洲国产伦久久久久久久| 欧美三级在线视频| 精品日韩在线观看| 亚洲欧洲精品天堂一级| 亚洲成人黄色影院| 久久66热偷产精品| 99综合影院在线| 欧美人体做爰大胆视频| 欧美精品一区二区久久婷婷 | 欧美一区二区啪啪| 欧美激情中文不卡| 亚洲成年人影院| 国产九色精品成人porny| 91视频在线看| 日韩三级视频在线看| 国产精品久久免费看| 天堂蜜桃91精品| 成人激情午夜影院| 欧美一卡2卡三卡4卡5免费| 国产精品免费视频观看| 日韩av电影免费观看高清完整版| 国产成人啪午夜精品网站男同| 欧美三片在线视频观看| 国产精品色噜噜| 精品在线视频一区| 欧美日韩成人高清| 亚洲视频 欧洲视频|