⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fetchinfodailog.java

📁 一个java实现的有界面的email发送程序。可以从网络上抓取email。也可以从文件中读取email
💻 JAVA
字号:
package com.code10.face;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Label;

import com.code10.access.ReadProperty;

public class FetchInfoDailog {

	private Shell sShell = null;  //  @jve:decl-index=0:visual-constraint="95,13"
	private Text txtStartUrl = null;
	private Label label = null;
	private Text txtLayer = null;
	private Label label1 = null;
	private Button button = null;
	ReadProperty readProperty = ReadProperty.newInstance();
	/**
	 * This method initializes sShell
	 */
	private void createSShell() {
		
		sShell = new Shell();
		sShell.setText("抓取参数设置");
		sShell.setSize(new org.eclipse.swt.graphics.Point(439,111));
		txtStartUrl = new Text(sShell, SWT.BORDER);
		txtStartUrl.setBounds(new org.eclipse.swt.graphics.Rectangle(93,11,195,21));
		txtStartUrl.setText(readProperty.getPara("startUrl"));
		label = new Label(sShell, SWT.CENTER);
		label.setText("网页起始地址:");
		label.setSize(new org.eclipse.swt.graphics.Point(86,14));
		label.setLocation(new org.eclipse.swt.graphics.Point(1,14));
		txtLayer = new Text(sShell, SWT.BORDER);
		txtLayer.setBounds(new org.eclipse.swt.graphics.Rectangle(351,13,49,18));
		txtLayer.setText(readProperty.getPara("startLayer"));
		label1 = new Label(sShell, SWT.CENTER);
		label1.setBounds(new org.eclipse.swt.graphics.Rectangle(296,13,46,18));
		label1.setText("层数:");
		button = new Button(sShell, SWT.NONE);
		button.setBounds(new org.eclipse.swt.graphics.Rectangle(167,43,99,21));
		button.setText("确定");
		button.addSelectionListener(new SelectionAdapter(){

			@Override
			public void widgetDefaultSelected(SelectionEvent e) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void widgetSelected(SelectionEvent e) {
				readProperty.setPara("startUrl",txtStartUrl.getText());
				readProperty.setPara("startLayer",txtLayer.getText());
				sShell.dispose();
			}
			
		});
	}
	public void open(Display display) {
		// TODO Auto-generated method stub
		createSShell();
		sShell.open();
		while (!sShell.isDisposed()) {
	         if (!display.readAndDispatch())
	            display.sleep();
	      }
	      System.out.println("finishing...");
	      sShell.dispose();
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -