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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? myinputdialog.java

?? swt帶dnd應(yīng)用的網(wǎng)址收藏夾源碼
?? JAVA
字號(hào):
package cn.com.javachen.myxml.dialog;

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class MyInputDialog extends Dialog {
	/**
     * The title of the dialog.
     */
    private String title;

    /**
     * The message to display, or <code>null</code> if none.
     */
    private String message;
    /**
     * The message2 to display, or <code>null</code> if none.
     */
    private String message2;

    /**
     * The input value; the empty string by default.
     */
    private String value = "";//$NON-NLS-1$
    
    /**
     * The input value2; the empty string by default.
     */
    private String value2 = "";//$NON-NLS-1$

    /**
     * The input validator, or <code>null</code> if none.
     */
    private IInputValidator validator;

    /**
     * Ok button widget.
     */
    private Button okButton;

    /**
     * Input text widget.
     */
    private Text text;
    
    /**
     * Input text widget.
     */
    private Text text2;

    /**
     * Error message label widget.
     */
    private Text errorMessageText;

	

    /**
     * Creates an input dialog with OK and Cancel buttons. Note that the dialog
     * will have no visual representation (no widgets) until it is told to open.
     * <p>
     * Note that the <code>open</code> method blocks for input dialogs.
     * </p>
     * 
     * @param parentShell
     *            the parent shell, or <code>null</code> to create a top-level
     *            shell
     * @param dialogTitle
     *            the dialog title, or <code>null</code> if none
     * @param dialogMessage
     *            the dialog message, or <code>null</code> if none
     * @param initialValue
     *            the initial input value, or <code>null</code> if none
     *            (equivalent to the empty string)
     * @param validator
     *            an input validator, or <code>null</code> if none
     */
    public MyInputDialog(Shell parentShell, String dialogTitle,
            String dialogMessage, String initialValue,String dialogMessage2,String initialValue2, IInputValidator validator) {
        super(parentShell);
        this.title = dialogTitle;
        message = dialogMessage;
        message2=dialogMessage2;
        
        if (initialValue == null)
            value = "";//$NON-NLS-1$
        else
            value = initialValue;
        if (initialValue2==null)
        	value2="";//$NON-NLS-1$
        else
        	value2=initialValue2;
        this.validator = validator;
    }

    /*
     * (non-Javadoc) Method declared on Dialog.
     */
    protected void buttonPressed(int buttonId) {
        if (buttonId == IDialogConstants.OK_ID) {
            value = text.getText();
            value2=text2.getText();
        } else {
            value = null;
            value2=null;
        }
        super.buttonPressed(buttonId);
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
     */
    protected void configureShell(Shell shell) {
        super.configureShell(shell);
        if (title != null)
            shell.setText(title);
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
     */
    protected void createButtonsForButtonBar(Composite parent) {
        // create OK and Cancel buttons by default
        okButton = createButton(parent, IDialogConstants.OK_ID,
                IDialogConstants.OK_LABEL, true);
        createButton(parent, IDialogConstants.CANCEL_ID,
                IDialogConstants.CANCEL_LABEL, false);
        //do this here because setting the text will set enablement on the ok
        // button
        text.setFocus();
        if (value != null) {
            text.setText(value);
            text.selectAll();
        }
        if(value2 !=null){
        	text2.setText(value2);
        }
    }

    /*
     * (non-Javadoc) Method declared on Dialog.
     */
    protected Control createDialogArea(Composite parent) {
        // create composite
        Composite composite = (Composite) super.createDialogArea(parent);
        // create message
        if (message != null) {
            Label label = new Label(composite, SWT.WRAP);
            label.setText(message);
            GridData data = new GridData(GridData.GRAB_HORIZONTAL
                    | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
                    | GridData.VERTICAL_ALIGN_CENTER);
            data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
            label.setLayoutData(data);
            label.setFont(parent.getFont());
        }
        text = new Text(composite, SWT.SINGLE | SWT.BORDER);
        text.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                | GridData.HORIZONTAL_ALIGN_FILL));
        text.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                validateInput();
            }
        });
        if (message2 != null) {
            Label label = new Label(composite, SWT.WRAP);
            label.setText(message2);
            GridData data = new GridData(GridData.GRAB_HORIZONTAL
                    | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
                    | GridData.VERTICAL_ALIGN_CENTER);
            data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
            label.setLayoutData(data);
            label.setFont(parent.getFont());
        }
        text2 = new Text(composite, SWT.SINGLE | SWT.BORDER);
        text2.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                | GridData.HORIZONTAL_ALIGN_FILL));
        text2.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                validateInput();
            }
        });
        errorMessageText = new Text(composite, SWT.READ_ONLY);
        errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                | GridData.HORIZONTAL_ALIGN_FILL));
        errorMessageText.setBackground(errorMessageText.getDisplay()
                .getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));

        applyDialogFont(composite);
        return composite;
    }

    /**
     * Returns the error message label.
     * 
     * @return the error message label
     * @deprecated use setErrorMessage(String) instead
     */
    protected Label getErrorMessageLabel() {
        return null;
    }

    /**
     * Returns the ok button.
     * 
     * @return the ok button
     */
    protected Button getOkButton() {
        return okButton;
    }

//    /**
//     * Returns the text area.
//     * 
//     * @return the text area
//     */
//    protected Text getText() {
//        return text;
//    }
//    /**
//     * Returns the text area.
//     * 
//     * @return the text area
//     */
//    protected Text getText2() {
//        return text2;
//    }
    /**
     * Returns the validator.
     * 
     * @return the validator
     */
    protected IInputValidator getValidator() {
        return validator;
    }

    /**
     * Returns the string typed into this input dialog.
     * 
     * @return the input string
     */
    public String getValue() {
        return value;
    }
    /**
     * Returns the string typed into this input dialog.
     * 
     * @return the input string
     */
    public String getValue2() {
        return value2;
    }

    /**
     * Validates the input.
     * <p>
     * The default implementation of this framework method delegates the request
     * to the supplied input validator object; if it finds the input invalid,
     * the error message is displayed in the dialog's message line. This hook
     * method is called whenever the text changes in the input field.
     * </p>
     */
    protected void validateInput() {
        String errorMessage = null;
        if (validator != null) {
            errorMessage = validator.isValid(text.getText())+validator.isValid(text2.getText());
            
        }
        
        // Bug 16256: important not to treat "" (blank error) the same as null
        // (no error)
        setErrorMessage(errorMessage);
    }

    /**
     * Sets or clears the error message.
     * If not <code>null</code>, the OK button is disabled.
     * 
     * @param errorMessage
     *            the error message, or <code>null</code> to clear
     * @since 3.0
     */
    public void setErrorMessage(String errorMessage) {
        errorMessageText.setText(errorMessage == null ? "" : errorMessage); //$NON-NLS-1$
        okButton.setEnabled(errorMessage == null);
        errorMessageText.getParent().update();
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲福中文字幕伊人影院| 日韩在线一区二区三区| 91精品婷婷国产综合久久竹菊| 国产精品伊人色| 亚洲与欧洲av电影| 国产欧美中文在线| 69久久99精品久久久久婷婷| 成人精品电影在线观看| 久久se精品一区二区| 亚洲制服丝袜av| 国产精品国产三级国产aⅴ中文| 欧美一区二区私人影院日本| 91蝌蚪国产九色| 国产精品一二三四| 久久国产剧场电影| 日日摸夜夜添夜夜添精品视频 | 91免费观看视频| 美女一区二区久久| 亚洲成人av资源| 亚洲美女视频一区| 国产精品久久久久久久裸模| 精品对白一区国产伦| 欧美精品乱码久久久久久| 91丝袜美女网| 成人91在线观看| 国产99久久久久| 风间由美一区二区三区在线观看| 精品亚洲porn| 麻豆一区二区三| 久色婷婷小香蕉久久| 视频在线观看一区二区三区| 亚洲国产日韩精品| 亚洲视频一区在线| 椎名由奈av一区二区三区| 欧美极品aⅴ影院| 欧美国产精品一区二区| 欧美精品一区二区三区四区| 日韩一级片网址| 日韩精品一区二区三区在线播放| 欧美一区二区三区在线视频 | 久久九九国产精品| 国产日韩av一区| 亚洲国产激情av| 日韩理论在线观看| 亚洲精品欧美在线| 亚洲影院在线观看| 亚洲一区二区三区激情| 亚洲v精品v日韩v欧美v专区| 亚洲无线码一区二区三区| 一个色综合av| 性欧美大战久久久久久久久| 日韩精品每日更新| 久久国产福利国产秒拍| 九九精品视频在线看| 国产精品亚洲一区二区三区在线| 国产激情精品久久久第一区二区 | 欧美午夜不卡在线观看免费| 在线看一区二区| 欧美日韩www| 日韩亚洲欧美在线| 久久久国际精品| 亚洲国产成人私人影院tom| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲国产精品一区二区久久恐怖片 | 国产精品女上位| 亚洲欧美日韩综合aⅴ视频| 亚洲国产视频在线| 久久激情五月婷婷| 成人黄色av电影| 欧洲一区在线观看| 欧美本精品男人aⅴ天堂| 日本一二三不卡| 亚洲国产精品人人做人人爽| 免费成人你懂的| 成人性生交大片免费看中文| 欧洲视频一区二区| 精品国精品自拍自在线| 1区2区3区国产精品| 日韩极品在线观看| 国产+成+人+亚洲欧洲自线| 色噜噜狠狠色综合中国 | 中文字幕一区在线| 亚州成人在线电影| 成人免费毛片片v| 欧美日韩国产另类一区| 欧美激情综合五月色丁香小说| 亚洲一区在线电影| 国产黄色成人av| 欧美日韩国产片| 国产欧美精品一区二区色综合 | 亚洲人成亚洲人成在线观看图片 | 欧美三级视频在线播放| 国产人成亚洲第一网站在线播放| 亚洲欧美日本韩国| 国产在线播精品第三| 欧美日韩精品欧美日韩精品一| 国产日韩欧美高清在线| 日韩成人一级片| 色综合久久久久| 久久久久9999亚洲精品| 偷拍一区二区三区四区| 高清av一区二区| 欧美一级片在线| 一区二区三区中文在线观看| 国产呦萝稀缺另类资源| 在线不卡欧美精品一区二区三区| 国产精品国产自产拍在线| 美日韩一区二区三区| 在线免费观看不卡av| 中文字幕在线一区免费| 激情综合亚洲精品| 欧美一级片在线| 伊人开心综合网| 成人免费视频一区| 久久久噜噜噜久久人人看 | 国产中文字幕精品| 91.com在线观看| 亚洲国产美国国产综合一区二区| 成人免费视频网站在线观看| 精品久久久久一区二区国产| 亚洲福中文字幕伊人影院| 91黄色免费看| 亚洲三级小视频| 99久久精品免费看国产| 国产精品色在线观看| 国产麻豆欧美日韩一区| 亚洲精品在线免费观看视频| 麻豆精品视频在线观看免费| 91精品国产乱| 日av在线不卡| 欧美疯狂做受xxxx富婆| 亚洲6080在线| 欧美日韩黄色一区二区| 亚洲永久精品国产| 在线不卡免费av| 日韩专区欧美专区| 91精品国产91久久久久久最新毛片| 亚洲国产人成综合网站| 欧美吻胸吃奶大尺度电影| 亚洲高清免费一级二级三级| 色激情天天射综合网| 樱桃视频在线观看一区| 欧美中文字幕一区| 亚洲成a人v欧美综合天堂下载| 欧美日本国产一区| 青椒成人免费视频| 欧美精品一区二区三区四区 | 在线中文字幕不卡| 图片区日韩欧美亚洲| 日韩欧美你懂的| 国产成人免费av在线| 国产精品久久久久国产精品日日| eeuss鲁片一区二区三区| 一区二区三区波多野结衣在线观看 | 成人精品视频.| 亚洲美女电影在线| 精品视频在线免费| 久久99精品久久久久久久久久久久| 精品国产一区久久| 不卡av在线免费观看| 亚洲自拍欧美精品| 日韩午夜av一区| 国产精品综合网| 亚洲视频综合在线| 欧美一区二区日韩| 成人美女在线观看| 亚洲电影一区二区| ww亚洲ww在线观看国产| 成人app网站| 天堂va蜜桃一区二区三区漫画版| 精品国产一区二区三区av性色| 国产高清不卡二三区| 亚洲免费av观看| 欧美一卡2卡3卡4卡| fc2成人免费人成在线观看播放| 五月婷婷另类国产| 国产亚洲欧美中文| 欧美三级蜜桃2在线观看| 精品亚洲国内自在自线福利| 中文文精品字幕一区二区| 欧美日韩一区 二区 三区 久久精品| 久久成人免费网| 亚洲永久精品大片| 国产欧美日韩三区| 7777精品伊人久久久大香线蕉经典版下载 | 中文字幕+乱码+中文字幕一区| 欧美日韩一区二区三区高清| 国产成人鲁色资源国产91色综| 亚洲福利一区二区三区| 国产精品久久久久影院老司| 8v天堂国产在线一区二区| 国产 欧美在线| 麻豆极品一区二区三区| 亚洲激情校园春色| 久久精品免费在线观看| 欧美精品丝袜久久久中文字幕| 国产高清精品网站| 另类欧美日韩国产在线| 亚洲午夜影视影院在线观看| 国产日韩欧美a|