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

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

?? basicspinnerui.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * @(#)BasicSpinnerUI.java	1.28 06/04/10 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import java.awt.*;import java.awt.event.*;import java.text.ParseException;import javax.swing.*;import javax.swing.border.*;import javax.swing.event.*;import javax.swing.plaf.*;import javax.swing.text.*;import java.beans.*;import java.text.*;import java.util.*;import sun.swing.DefaultLookup;/** * The default Spinner UI delegate. * * @version 1.28 04/10/06 * @author Hans Muller * @since 1.4 */public class BasicSpinnerUI extends SpinnerUI{    /**     * The spinner that we're a UI delegate for.  Initialized by      * the <code>installUI</code> method, and reset to null     * by <code>uninstallUI</code>.     *      * @see #installUI     * @see #uninstallUI     */    protected JSpinner spinner;      private Handler handler;    /**     * The mouse/action listeners that are added to the spinner's      * arrow buttons.  These listeners are shared by all      * spinner arrow buttons.     *      * @see #createNextButton     * @see #createPreviousButton     */    private static final ArrowButtonHandler nextButtonHandler = new ArrowButtonHandler("increment", true);    private static final ArrowButtonHandler previousButtonHandler = new ArrowButtonHandler("decrement", false);    private PropertyChangeListener propertyChangeListener;    /**     * Used by the default LayoutManager class - SpinnerLayout for      * missing (null) editor/nextButton/previousButton children.     */    private static final Dimension zeroSize = new Dimension(0, 0);    /**     * Returns a new instance of BasicSpinnerUI.  SpinnerListUI      * delegates are allocated one per JSpinner.       *      * @param c the JSpinner (not used)     * @see ComponentUI#createUI     * @return a new BasicSpinnerUI object     */    public static ComponentUI createUI(JComponent c) {        return new BasicSpinnerUI();    }    private void maybeAdd(Component c, String s) {	if (c != null) {	    spinner.add(c, s);	}    }    /**     * Calls <code>installDefaults</code>, <code>installListeners</code>,     * and then adds the components returned by <code>createNextButton</code>,     * <code>createPreviousButton</code>, and <code>createEditor</code>.     *      * @param c the JSpinner     * @see #installDefaults     * @see #installListeners     * @see #createNextButton     * @see #createPreviousButton     * @see #createEditor     */    public void installUI(JComponent c) {	this.spinner = (JSpinner)c;	installDefaults();	installListeners();	maybeAdd(createNextButton(), "Next");	maybeAdd(createPreviousButton(), "Previous");	maybeAdd(createEditor(), "Editor");        updateEnabledState();        installKeyboardActions();    }    /**     * Calls <code>uninstallDefaults</code>, <code>uninstallListeners</code>,     * and then removes all of the spinners children.     *      * @param c the JSpinner (not used)     */    public void uninstallUI(JComponent c) {	uninstallDefaults();	uninstallListeners();	this.spinner = null;	c.removeAll();    }        /**     * Initializes <code>PropertyChangeListener</code> with      * a shared object that delegates interesting PropertyChangeEvents     * to protected methods.     * <p>     * This method is called by <code>installUI</code>.     *      * @see #replaceEditor     * @see #uninstallListeners     */    protected void installListeners() {        propertyChangeListener = createPropertyChangeListener();        spinner.addPropertyChangeListener(propertyChangeListener);	if (DefaultLookup.getBoolean(spinner, this,	    "Spinner.disableOnBoundaryValues", false)) {	    spinner.addChangeListener(getHandler());	}	JComponent editor = spinner.getEditor();	if (editor != null && editor instanceof JSpinner.DefaultEditor) {	    JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField();	    if (tf != null) {		tf.addFocusListener(nextButtonHandler);		tf.addFocusListener(previousButtonHandler);	    }	}    }    /**     * Removes the <code>PropertyChangeListener</code> added     * by installListeners.     * <p>     * This method is called by <code>uninstallUI</code>.     *      * @see #installListeners     */    protected void uninstallListeners() {	spinner.removePropertyChangeListener(propertyChangeListener);	spinner.removeChangeListener(handler);	JComponent editor = spinner.getEditor();	removeEditorBorderListener(editor);	if (editor instanceof JSpinner.DefaultEditor) {	    JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField();	    if (tf != null) {		tf.removeFocusListener(nextButtonHandler);		tf.removeFocusListener(previousButtonHandler);	    }	}        propertyChangeListener = null;        handler = null;    }    /**     * Initialize the <code>JSpinner</code> <code>border</code>,      * <code>foreground</code>, and <code>background</code>, properties      * based on the corresponding "Spinner.*" properties from defaults table.       * The <code>JSpinners</code> layout is set to the value returned by     * <code>createLayout</code>.  This method is called by <code>installUI</code>.     *     * @see #uninstallDefaults     * @see #installUI     * @see #createLayout     * @see LookAndFeel#installBorder     * @see LookAndFeel#installColors     */    protected void installDefaults() {	spinner.setLayout(createLayout());        LookAndFeel.installBorder(spinner, "Spinner.border");        LookAndFeel.installColorsAndFont(spinner, "Spinner.background", "Spinner.foreground", "Spinner.font");        LookAndFeel.installProperty(spinner, "opaque", Boolean.TRUE);    }    /**     * Sets the <code>JSpinner's</code> layout manager to null.  This     * method is called by <code>uninstallUI</code>.     *      * @see #installDefaults     * @see #uninstallUI     */    protected void uninstallDefaults() {	spinner.setLayout(null);    }    private Handler getHandler() {        if (handler == null) {            handler = new Handler();        }        return handler;    }    /**     * Installs the necessary listeners on the next button, <code>c</code>,     * to update the <code>JSpinner</code> in response to a user gesture.     *     * @param c Component to install the listeners on     * @throws NullPointerException if <code>c</code> is null.     * @see #createNextButton     * @since 1.5     */    protected void installNextButtonListeners(Component c) {        installButtonListeners(c, nextButtonHandler);    }    /**     * Installs the necessary listeners on the previous button, <code>c</code>,     * to update the <code>JSpinner</code> in response to a user gesture.     *     * @param c Component to install the listeners on.     * @throws NullPointerException if <code>c</code> is null.     * @see #createPreviousButton     * @since 1.5     */    protected void installPreviousButtonListeners(Component c) {        installButtonListeners(c, previousButtonHandler);    }    private void installButtonListeners(Component c,                                        ArrowButtonHandler handler) {        if (c instanceof JButton) {            ((JButton)c).addActionListener(handler);        }        c.addMouseListener(handler);    }    /**     * Create a <code>LayoutManager</code> that manages the <code>editor</code>,      * <code>nextButton</code>, and <code>previousButton</code>      * children of the JSpinner.  These three children must be     * added with a constraint that identifies their role:      * "Editor", "Next", and "Previous". The default layout manager      * can handle the absence of any of these children.     *      * @return a LayoutManager for the editor, next button, and previous button.     * @see #createNextButton     * @see #createPreviousButton     * @see #createEditor     */    protected LayoutManager createLayout() {        return getHandler();    }    /**     * Create a <code>PropertyChangeListener</code> that can be     * added to the JSpinner itself.  Typically, this listener     * will call replaceEditor when the "editor" property changes,      * since it's the <code>SpinnerUI's</code> responsibility to      * add the editor to the JSpinner (and remove the old one).     * This method is called by <code>installListeners</code>.     *      * @return A PropertyChangeListener for the JSpinner itself     * @see #installListeners     */    protected PropertyChangeListener createPropertyChangeListener() {        return getHandler();    }    /**     * Create a component that will replace the spinner models value     * with the object returned by <code>spinner.getPreviousValue</code>.     * By default the <code>previousButton</code> is a JButton. This     * method invokes <code>installPreviousButtonListeners</code> to     * install the necessary listeners to update the <code>JSpinner</code>'s     * model in response to a user gesture. If a previousButton isn't needed     * (in a subclass) then override this method to return null.     *     * @return a component that will replace the spinners model with the     *     next value in the sequence, or null     * @see #installUI     * @see #createNextButton     * @see #installPreviousButtonListeners     */    protected Component createPreviousButton() {	Component c = createArrowButton(SwingConstants.SOUTH);        c.setName("Spinner.previousButton");        installPreviousButtonListeners(c);        return c;    }    /**     * Create a component that will replace the spinner models value     * with the object returned by <code>spinner.getNextValue</code>.     * By default the <code>nextButton</code> is a JButton     * who's <code>ActionListener</code> updates it's <code>JSpinner</code>     * ancestors model.  If a nextButton isn't needed (in a subclass)     * then override this method to return null.     *     * @return a component that will replace the spinners model with the     *     next value in the sequence, or null     * @see #installUI     * @see #createPreviousButton     * @see #installNextButtonListeners     */    protected Component createNextButton() {	Component c = createArrowButton(SwingConstants.NORTH);        c.setName("Spinner.nextButton");        installNextButtonListeners(c);        return c;    }    private Component createArrowButton(int direction) {	JButton b = new BasicArrowButton(direction);	Border buttonBorder = UIManager.getBorder("Spinner.arrowButtonBorder");	if (buttonBorder instanceof UIResource) {	    // Wrap the border to avoid having the UIResource be replaced by	    // the ButtonUI. This is the opposite of using BorderUIResource.	    b.setBorder(new CompoundBorder(buttonBorder, null));	} else {	    b.setBorder(buttonBorder);	}        b.setInheritsPopupMenu(true);	return b;    }    /**     * This method is called by installUI to get the editor component     * of the <code>JSpinner</code>.  By default it just returns      * <code>JSpinner.getEditor()</code>.  Subclasses can override     * <code>createEditor</code> to return a component that contains      * the spinner's editor or null, if they're going to handle adding 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性xxxxxxxx| 精品国产乱码久久久久久影片| 国产一区三区三区| 美洲天堂一区二卡三卡四卡视频 | 国产欧美日韩在线观看| 久久影视一区二区| 国产三级精品视频| 国产精品久久夜| 一色桃子久久精品亚洲| 亚洲三级在线播放| 亚洲综合色视频| 首页欧美精品中文字幕| 麻豆91免费看| 国产成人在线视频网站| heyzo一本久久综合| 99精品视频一区二区三区| 成人污视频在线观看| 97精品视频在线观看自产线路二| 91麻豆精品视频| 欧美日韩精品一区二区| 91精品国产综合久久精品麻豆| 欧美亚洲高清一区| 日韩一区二区三区四区| 久久嫩草精品久久久精品一| 国产日产精品一区| 综合av第一页| 亚洲v日本v欧美v久久精品| 青娱乐精品在线视频| 国产精品一区二区不卡| 9久草视频在线视频精品| 欧美三级一区二区| 久久综合九色综合97婷婷女人| 中文字幕高清一区| 樱花草国产18久久久久| 秋霞电影网一区二区| 懂色中文一区二区在线播放| 色婷婷av一区二区三区gif| 欧美日韩国产精品自在自线| 久久综合色一综合色88| 最新国产精品久久精品| 婷婷成人激情在线网| 国产精品一区不卡| 在线精品亚洲一区二区不卡| 欧美变态tickling挠脚心| 国产精品久久久久影院色老大| 亚洲一区视频在线| 国产在线日韩欧美| 欧美专区亚洲专区| 久久久国产精品午夜一区ai换脸| 亚洲欧美国产三级| 国产一区二区在线视频| 在线观看亚洲一区| 久久精品人人爽人人爽| 亚洲444eee在线观看| 风间由美一区二区av101| 欧美日韩电影在线| 国产精品国产三级国产aⅴ入口| 午夜精品在线看| av电影天堂一区二区在线| 日韩欧美国产综合| 欧美在线免费观看亚洲| 日韩免费观看高清完整版在线观看| 国产精品久久久99| 美女视频一区在线观看| 在线观看一区二区视频| 国产精品无遮挡| 久草这里只有精品视频| 欧美日韩精品一区二区| 亚洲人成7777| 福利一区二区在线| 亚洲精品一区二区三区在线观看| 亚洲午夜免费福利视频| 97久久超碰国产精品电影| 精品久久国产老人久久综合| 亚洲国产人成综合网站| 91视频精品在这里| 欧美激情一区二区| 久久91精品久久久久久秒播| 欧美日韩国产另类不卡| 依依成人精品视频| 99精品久久只有精品| 国产日韩精品视频一区| 国产一区二区按摩在线观看| 日韩视频免费观看高清完整版| 亚洲图片欧美综合| 欧美影片第一页| 亚洲摸摸操操av| 不卡电影一区二区三区| 国产色综合久久| 国产盗摄女厕一区二区三区| 欧美精品一区二| 狠狠色丁香婷婷综合久久片| 日韩欧美一级二级| 麻豆传媒一区二区三区| 欧美一区永久视频免费观看| 五月综合激情婷婷六月色窝| 欧美性猛交xxxx乱大交退制版| 亚洲激情图片一区| 一本久久综合亚洲鲁鲁五月天| 国产精品美女久久久久久| 成人午夜电影网站| 国产精品成人一区二区三区夜夜夜 | 国产精品视频第一区| 美脚の诱脚舐め脚责91| 日韩一区二区不卡| 久久国产人妖系列| 精品对白一区国产伦| 麻豆国产一区二区| www国产精品av| 国产风韵犹存在线视精品| 国产欧美日韩精品a在线观看| 国产精品一区久久久久| 中文字幕免费一区| 91麻豆国产在线观看| 亚洲激情av在线| 欧美人成免费网站| 老色鬼精品视频在线观看播放| 欧美精品一区二区久久婷婷| 国产伦精一区二区三区| 国产欧美综合在线| 91精品1区2区| 婷婷国产v国产偷v亚洲高清| 日韩天堂在线观看| 国产精品一区二区久激情瑜伽| 国产精品久久一级| 在线观看免费视频综合| 秋霞午夜鲁丝一区二区老狼| 久久日一线二线三线suv| 国产大陆精品国产| 亚洲综合色视频| 日韩三级av在线播放| 国产69精品久久久久毛片| 亚洲精品乱码久久久久久久久| 7777精品伊人久久久大香线蕉超级流畅 | 欧美日韩五月天| 日日摸夜夜添夜夜添国产精品 | 欧美刺激脚交jootjob| 国产在线麻豆精品观看| 中文字幕在线免费不卡| 欧美无人高清视频在线观看| 美女爽到高潮91| 国产精品人妖ts系列视频| 欧美主播一区二区三区| 韩国成人在线视频| 亚洲欧美激情在线| 欧美成人激情免费网| www.亚洲激情.com| 一区二区高清免费观看影视大全| 91精品欧美综合在线观看最新 | 久久久电影一区二区三区| 97久久精品人人做人人爽| 亚洲精品一二三四区| 欧美zozozo| 欧美性欧美巨大黑白大战| 国产乱淫av一区二区三区 | 欧美aaa在线| 中文字幕一区二区在线播放| 成人免费看视频| 日韩伦理av电影| 欧美成人国产一区二区| 日本精品免费观看高清观看| 久久黄色级2电影| 日韩美女精品在线| 日韩视频不卡中文| 色综合久久天天综合网| 久久国产精品第一页| 亚洲自拍偷拍网站| 国产精品美女久久久久av爽李琼| 欧美一区欧美二区| 在线观看视频欧美| 成人自拍视频在线| 韩国三级电影一区二区| 性感美女极品91精品| 亚洲精品欧美激情| 中文字幕第一区第二区| 日韩精品一区二区在线| 欧美性生活大片视频| 94色蜜桃网一区二区三区| 韩国成人在线视频| 免费在线视频一区| 丝袜亚洲另类欧美综合| 亚洲欧美日韩久久精品| 中文字幕免费观看一区| 久久久久99精品国产片| 日韩视频123| 欧美精品1区2区3区| 欧美日韩亚洲综合一区| 91在线看国产| 国内精品国产成人| 一区二区三区在线看| 欧美激情一区二区三区全黄| 337p粉嫩大胆噜噜噜噜噜91av| 9191成人精品久久| 欧美丰满少妇xxxbbb| 一本大道av伊人久久综合| 91亚洲精品一区二区乱码| 国产在线一区二区| 国产一区 二区| 国产伦精品一区二区三区视频青涩| 开心九九激情九九欧美日韩精美视频电影 |