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

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

?? responsebox.java

?? java包
?? JAVA
字號:
package javabook;

import java.awt.*;
import javax.swing.*;


/**
 * This dialog is for prompting a yes-no response from the user. This dialog
 * allows the programmer to add a single line of prompt with two standard
 * Yes and No buttons. Optionally, the dialog can be adjusted to have one,
 * two, or three buttons with programmer-designated button labels. Buttons
 * are identified by the constants BUTTON1, BUTTON2, and BUTTON3. For the 
 * standard two-button dialog, BUTTON1 and BUTTON2 can also be referred as
 * YES and NO, respectively.
 *
 *<p> 
 * This class is provided as freeware. You are free to use as provided or modify to
 * your heart's content. But you use it at your own risk. No implied or explicit 
 * warranty is given.
 * 
 * @author C. Thomas Wu a.k.a Dr. Caffeine
 */
public class ResponseBox extends JavaBookDialog
{

//-----------------------------------------
//
//    Data Members:
//
//-----------------------------------------
    
    /**
     * The constant for the YES button
     */
    public static final int YES     = JOptionPane.YES_OPTION;
    
    /**
     * The constant for the NO button
     */
    public static final int NO      = JOptionPane.NO_OPTION;
    
    /**
     * The constant for the CANCEL button
     */
    public static final int CANCEL  = JOptionPane.CANCEL_OPTION;
    
    /**
     * The constant for the leftmost button whose value
     * is equal to YES
     */
    public static final int BUTTON1 = YES;
    
    /**
     * The constant for the middle button whose value
     * is equal to NO; this button is rightmost when
     * the dialog has only two buttons
     */
    public static final int BUTTON2 = NO;
    
    /**
     * The constant for the rightmost button whose value
     * is equal to CANCEL
     */
    public static final int BUTTON3 = CANCEL;

    /**
     * Default title of this dialog
     */
    private static String DEFAULT_TITLE = "Response Box";
    
    /**
     * Standard button labels
     */
    private String  labels[] = {"Yes", "No", "Cancel"};

    /**
     * The number of buttons this dialog has
     */
    private int     numberOfButtons;
    
    /**
     * The actual labels used in creating this dialog
     */
    private String  buttons[];

//-----------------------------------------
//
//    Constructors:
//
//-----------------------------------------
    
    /**
     * Constructs the standard ResponseBox dialog with
     * two buttons labeled 'Yes' and 'No'. Use setLabel
     * to change the button label.
     *
     * @param owner a Frame object owner of this dialog
     */
    public ResponseBox( Frame owner )
    {
        this( owner, 2 );
    }

    /**
     * Constructs this dialog with 'owner' as its owner and buttonCount
     * number of buttons. Valid values for buttonCount is 1, 2, or 3.
     * 
     * @param owner       a Frame object owner of this dialog
     * @param buttonCount the number of buttons this dialog has
     */
    public ResponseBox(Frame owner, int buttonCount)
    {
        super( owner, true );
        setTitle( DEFAULT_TITLE );
        setIcon ( QUESTION_ICON );

        if (buttonCount < 1 || buttonCount > 3) {
            numberOfButtons = 1;
        }
        else {
            numberOfButtons = buttonCount;
        }
        
        buttons = new String[numberOfButtons];
        
    }


//-----------------------------------------------
//    Public Methods:
//
//
//           int     prompt      ( String            )
//           void    setLabel    ( int,   String     )
//
//
//-----------------------------------------------

    /**
     * Prompts the user and returns the result
     * of user action.
     *
     * @param text the prompt message to display
     *
     * @return the value that indicates the user action
     */
    public int prompt(String text)
    {
        setButtons( );
        
        int value = JOptionPane.showOptionDialog( getOwner( ),
                                                  text,
                                                  getTitle( ),
                                                  JOptionPane.DEFAULT_OPTION,
                                                  getIcon( ),
                                                  null,
                                                  buttons,
                                                  null );
        return getSelectedButton( value );
    }

    /**
     * Sets the label of the designated button identified
     * by its id value.
     *
     * @param id   the id of the button
     * @param text the new label the button
     *
     */
    public void setLabel(int id, String text)
    { 
        switch ( id ) {
            case BUTTON1:  labels[0] = text;
                           break;
                           
            case BUTTON2:  labels[1] = text;
                           break;
                           
            case BUTTON3:  labels[2] = text;
                           break;
                           
            default:       //do nothing for invalid button#
                           break;
        }
        //--------NOTE-------------//
        /*
          You can write the code like 
          
              if (id < numberOfButtons && id >= 0) {
                  labels[id] = text;
              }
              
          It so happened that BUTTON1 == 0, BUTTON2 == 1, and
          BUTTON3 == 2, we can't be sure JOptionPane.YES_OPTION
          and others remain 0,1, and 2. So the switch statement
          as written is the right way
        */
        //-------END NOTE----------//
    }
 
//-----------------------------------------------
//    Private Methods:
//
//
//           void    getSelectedButton   ( int     )
//           void    setButtons          (         )
//
//-----------------------------------------------
    
    /**
     * Returns the result of user action. The return
     * value is one of YES, NO, and CANCEL. If the 
     * user closes the dialog without clicking any
     * button, then the result is CANCEL.
     *
     * @param button value returned from showOptionDialog
     * 
     * @return the button id value
     */
    private int getSelectedButton( int button )
    {
        int result = 0;
        
        switch ( button ) {
            case JOptionPane.CLOSED_OPTION:
            case CANCEL:
                          result = CANCEL;
                          break;
                          
            case YES:
            case NO:
                          result = button;
                          break;
        }
        
        return result;
    }
    
    
    /**
     * Creates the button array from the labels array. The button
     * array contains the labels for the buttons actually 
     * placed in the dialog.
     *
     */
    private void setButtons( )
    {
        for (int i = 0; i < numberOfButtons; i++) {
           buttons[i] = labels[i];
        }
    }
    


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本在线不卡一区| 日韩国产高清影视| 国产精品青草综合久久久久99| 欧美一区二区三区视频在线 | 91精品在线观看入口| 色婷婷综合久久久久中文| 色婷婷国产精品| 日本道精品一区二区三区| 色婷婷综合中文久久一本| 91麻豆视频网站| 欧美在线观看18| 欧美性受极品xxxx喷水| 欧美色精品天天在线观看视频| 欧美亚洲国产bt| 欧美日韩激情在线| 日韩欧美中文一区二区| 亚洲蜜臀av乱码久久精品| 色婷婷久久久亚洲一区二区三区| 一区二区三区在线免费视频| 亚洲欧洲一区二区三区| 日韩理论电影院| 亚洲成人中文在线| 日韩精彩视频在线观看| 蜜桃久久精品一区二区| 国内久久精品视频| 成人高清免费观看| 色综合视频一区二区三区高清| 在线看国产一区| 777奇米成人网| 久久久综合精品| 中文字幕色av一区二区三区| 亚洲精品免费视频| 日本视频在线一区| 国产精品18久久久久久久久久久久| 国产suv精品一区二区6| 91黄色激情网站| 这里只有精品免费| 国产午夜一区二区三区| 一区二区三区在线免费播放| 美女脱光内衣内裤视频久久网站| 狠狠狠色丁香婷婷综合久久五月| 成人av网在线| 欧美巨大另类极品videosbest| 欧美成人欧美edvon| 国产精品国产三级国产aⅴ原创| 亚洲国产人成综合网站| 韩国理伦片一区二区三区在线播放| eeuss鲁片一区二区三区| 在线91免费看| 国产精品国产三级国产普通话蜜臀 | 久久久久久久久久久久久久久99| 中文字幕日韩欧美一区二区三区| 天天综合色天天| 成人午夜av影视| 欧美久久一区二区| 国产精品国产三级国产aⅴ原创| 视频一区视频二区在线观看| 成人夜色视频网站在线观看| 欧美日韩成人综合天天影院| 国产人久久人人人人爽| 天天影视涩香欲综合网| 波多野结衣在线aⅴ中文字幕不卡| 欧美猛男超大videosgay| 国产精品三级视频| 九九久久精品视频| 欧美日韩一区三区| 国产精品无人区| 久久国产三级精品| 欧美日韩国产影片| 亚洲日本在线视频观看| 国内成+人亚洲+欧美+综合在线| 色偷偷88欧美精品久久久| 国产午夜一区二区三区| 美女国产一区二区| 欧美三级资源在线| 亚洲人成伊人成综合网小说| 国产大陆精品国产| 日韩欧美国产三级| 亚洲1区2区3区视频| 99精品欧美一区| 国产欧美日韩不卡| 久久精工是国产品牌吗| 91精品久久久久久久久99蜜臂| 亚洲欧美另类小说| heyzo一本久久综合| 国产肉丝袜一区二区| 蜜臂av日日欢夜夜爽一区| 欧美色中文字幕| 一级做a爱片久久| 波波电影院一区二区三区| 国产亚洲制服色| 国内国产精品久久| 26uuu欧美| 国内精品久久久久影院一蜜桃| 日韩一区二区影院| 日韩中文字幕区一区有砖一区| 在线观看亚洲成人| 亚洲人成网站在线| 色婷婷激情综合| 中文字幕一区二区在线播放| 成人污污视频在线观看| 国产视频一区二区在线观看| 国产真实精品久久二三区| 国产一区二区三区免费看| 久久久久久久综合狠狠综合| 国产精品久久久久国产精品日日 | 国内久久精品视频| 日韩欧美一级二级| 免费xxxx性欧美18vr| 欧美一区二区三区在线视频| 午夜国产精品一区| 欧美人与性动xxxx| 性做久久久久久免费观看| 欧美日韩一区 二区 三区 久久精品| 亚洲乱码精品一二三四区日韩在线| 99久久精品免费| 亚洲精品va在线观看| 欧美色欧美亚洲另类二区| 香港成人在线视频| 欧美一区二区免费| 精品影院一区二区久久久| 久久亚洲捆绑美女| 成人高清视频免费观看| 一区二区三区.www| 91精品国产综合久久久久久漫画 | 偷窥国产亚洲免费视频| 51精品国自产在线| 激情六月婷婷久久| 国产日韩亚洲欧美综合| 91老师片黄在线观看| 亚洲大片在线观看| 5858s免费视频成人| 国产一区二区在线电影| 国产精品麻豆视频| 欧美性大战久久久| 激情综合网av| 国产精品成人一区二区三区夜夜夜| 色噜噜久久综合| 久久精品噜噜噜成人av农村| 国产欧美精品一区二区三区四区 | 欧美日韩国产不卡| 精品一二三四区| 1000精品久久久久久久久| 欧美色图免费看| 国产麻豆91精品| 亚洲激情在线播放| 欧美大白屁股肥臀xxxxxx| 成人污视频在线观看| 日韩福利视频导航| 国产清纯在线一区二区www| 91久久一区二区| 狠狠色丁香婷综合久久| 一级中文字幕一区二区| 久久麻豆一区二区| 欧美日韩精品一区二区| 国产91精品在线观看| 亚洲成人先锋电影| 中文字幕不卡三区| 欧美一区二区在线观看| 成人一区二区三区| 日韩高清一区在线| 亚洲视频一区二区免费在线观看| 555夜色666亚洲国产免| 色综合中文综合网| 免费欧美高清视频| 日韩理论电影院| 欧美精品一区二区久久婷婷| 欧美亚洲高清一区二区三区不卡| 国产剧情一区二区| 日本午夜一区二区| 亚洲综合色网站| 国产精品色哟哟网站| 日韩一级高清毛片| 在线观看视频一区| 国产一区二三区| 欧美一区二区三区四区五区 | 国产精品成人网| 欧美三级一区二区| 国产不卡一区视频| 免费一级片91| 亚洲成a人片在线观看中文| 国产欧美日韩中文久久| 日韩一区二区在线看片| 欧美日韩综合一区| 成人一区在线观看| 韩国v欧美v日本v亚洲v| 日日噜噜夜夜狠狠视频欧美人| 亚洲美女精品一区| 国产精品久久久久久久久久免费看| 日韩精品在线网站| 欧美一二三四在线| 欧美精品xxxxbbbb| 在线亚洲人成电影网站色www| 成人综合婷婷国产精品久久蜜臀| 精品在线观看视频| 久久疯狂做爰流白浆xx| 六月丁香婷婷色狠狠久久| 日韩精彩视频在线观看| 日本亚洲三级在线| 日韩精品1区2区3区|