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

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

?? basicspinnerui.java

?? java jdk 1.4的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * @(#)BasicSpinnerUI.java	1.15 03/01/23 * * Copyright 2003 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.*;/** * The default Spinner UI delegate. * * @version 1.15 01/23/03 * @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;      /**     * The <code>PropertyChangeListener</code> that's added to the      * <code>JSpinner</code> itself. This listener is created by the     * <code>createPropertyChangeListener</code> method, added by the     * <code>installListeners</code> method, and removed by the     * <code>uninstallListeners</code> method.     * <p>     * One instance of this listener is shared by all JSpinners.     *      * @see #createPropertyChangeListener     * @see #installListeners     * @see #uninstallListeners     */    private static final PropertyChangeListener propertyChangeListener = new PropertyChangeHandler();    /**     * 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);    /**     * 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() {	spinner.addPropertyChangeListener(propertyChangeListener);    }    /**     * 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);	removeEditorBorderListener(spinner.getEditor());    }    /**     * 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");    }    /**     * 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);    }    /**     * 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 new SpinnerLayout();    }    /**     * 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 new PropertyChangeHandler();    }    /**     * 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     * who's <code>ActionListener</code> updates it's <code>JSpinner</code>     * ancestors model.  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     */    protected Component createPreviousButton() {	return createArrowButton(SwingConstants.SOUTH, previousButtonHandler);    }    /**     * 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     */    protected Component createNextButton() {	return createArrowButton(SwingConstants.NORTH, nextButtonHandler);    }    private Component createArrowButton(int direction, ArrowButtonHandler handler) {	JButton b = new BasicArrowButton(direction);	b.addActionListener(handler);	b.addMouseListener(handler);	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);	}	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      * the editor to the <code>JSpinner</code> in an      * <code>installUI</code> override.     * <p>     * Typically this method would be overridden to wrap the editor     * with a container with a custom border, since one can't assume     * that the editors border can be set directly.       * <p>     * The <code>replaceEditor</code> method is called when the spinners     * editor is changed with <code>JSpinner.setEditor</code>.  If you've     * overriden this method, then you'll probably want to override     * <code>replaceEditor</code> as well.     *      * @return the JSpinners editor JComponent, spinner.getEditor() by default     * @see #installUI     * @see #replaceEditor     * @see JSpinner#getEditor     */    protected JComponent createEditor() {	JComponent editor = spinner.getEditor();	maybeRemoveEditorBorder(editor);	installEditorBorderListener(editor);	return editor;    }    /**     * Called by the <code>PropertyChangeListener</code> when the      * <code>JSpinner</code> editor property changes.  It's the responsibility      * of this method to remove the old editor and add the new one.  By     * default this operation is just:     * <pre>     * spinner.remove(oldEditor);     * spinner.add(newEditor, "Editor");     * </pre>     * The implementation of <code>replaceEditor</code> should be coordinated     * with the <code>createEditor</code> method.     *      * @see #createEditor     * @see #createPropertyChangeListener     */    protected void replaceEditor(JComponent oldEditor, JComponent newEditor) {	spinner.remove(oldEditor);	maybeRemoveEditorBorder(newEditor);	installEditorBorderListener(newEditor);	spinner.add(newEditor, "Editor");    }    /**     * Remove the border around the inner editor component for LaFs     * that install an outside border around the spinner,     */    private void maybeRemoveEditorBorder(JComponent editor) {        if (!UIManager.getBoolean("Spinner.editorBorderPainted")) {	    if (editor instanceof JPanel &&		editor.getBorder() == null &&		editor.getComponentCount() > 0) {		editor = (JComponent)editor.getComponent(0);	    }	    if (editor != null && editor.getBorder() instanceof UIResource) {		editor.setBorder(null);	    }	}    }    /**     * Remove the border around the inner editor component for LaFs     * that install an outside border around the spinner,     */    private void installEditorBorderListener(JComponent editor) {        if (!UIManager.getBoolean("Spinner.editorBorderPainted")) {	    if (editor instanceof JPanel &&		editor.getBorder() == null &&		editor.getComponentCount() > 0) {		editor = (JComponent)editor.getComponent(0);	    }	    if (editor != null &&		(editor.getBorder() == null ||		 editor.getBorder() instanceof UIResource)) {		editor.addPropertyChangeListener(propertyChangeListener);	    }	}    }    private void removeEditorBorderListener(JComponent editor) {        if (!UIManager.getBoolean("Spinner.editorBorderPainted")) {	    if (editor instanceof JPanel &&		editor.getComponentCount() > 0) {		editor = (JComponent)editor.getComponent(0);	    }	    if (editor != null) {		editor.removePropertyChangeListener(propertyChangeListener);	    }	}    }    /**     * Updates the enabled state of the children Components based on the     * enabled state of the <code>JSpinner</code>.     */    private void updateEnabledState() {        updateEnabledState(spinner, spinner.isEnabled());    }    /**     * Recursively updates the enabled state of the child     * <code>Component</code>s of <code>c</code>.     */    private void updateEnabledState(Container c, boolean enabled) {        for (int counter = c.getComponentCount() - 1; counter >= 0;counter--) {            Component child = c.getComponent(counter);            child.setEnabled(enabled);            if (child instanceof Container) {                updateEnabledState((Container)child, enabled);            }        }    }    /**     * Installs the KeyboardActions onto the JSpinner.     */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美伊人久久久久久久久影院| 欧美精品在线一区二区三区| 在线免费观看日本欧美| 欧美三级日韩在线| 337p亚洲精品色噜噜狠狠| 91精品国产一区二区人妖| 欧美大片国产精品| 国产精品国产三级国产三级人妇 | 麻豆精品在线视频| 国产成人av电影在线| 日本精品一级二级| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲欧洲精品天堂一级| 丝袜美腿亚洲综合| 国产999精品久久久久久绿帽| 欧美怡红院视频| 久久久久久电影| 亚洲线精品一区二区三区八戒| 激情综合网最新| 91福利在线看| 久久久99免费| 丝袜美腿亚洲色图| 99国产精品久久久| 日韩精品一区在线| 一区二区三区资源| 国产馆精品极品| 欧美老年两性高潮| 国产精品国产三级国产aⅴ入口| 日韩国产欧美一区二区三区| 91在线观看美女| 久久蜜桃av一区精品变态类天堂| 亚洲二区在线视频| 成人性生交大片免费看视频在线| 欧美一区二区三区公司| 亚洲女同女同女同女同女同69| 韩国精品久久久| 欧美三级日韩三级| 亚洲日本欧美天堂| 丁香五精品蜜臀久久久久99网站| 欧美一级国产精品| 亚洲综合丁香婷婷六月香| 粉嫩aⅴ一区二区三区四区五区| 欧美一区国产二区| 亚洲午夜精品17c| 成人av影视在线观看| 精品久久人人做人人爽| 婷婷一区二区三区| 在线观看精品一区| 中文字幕亚洲视频| 成人激情午夜影院| www国产亚洲精品久久麻豆| 天天影视涩香欲综合网| 在线观看亚洲一区| 亚洲人妖av一区二区| 成人午夜视频免费看| 久久青草国产手机看片福利盒子| 免费看日韩精品| 欧美一区二区三区爱爱| 午夜电影网一区| 精品视频在线视频| 亚洲一区二三区| 欧美亚男人的天堂| 一区二区三区资源| 91小视频免费看| 成人欧美一区二区三区视频网页 | 国产精品久久久久婷婷二区次| 国产欧美综合色| 亚洲欧美一区二区在线观看| 久久99热99| 久久亚洲影视婷婷| 日韩午夜在线观看| 日本va欧美va欧美va精品| 欧美疯狂性受xxxxx喷水图片| 亚洲第一久久影院| 不卡一二三区首页| 亚洲三级免费观看| 欧美综合一区二区| 性久久久久久久久| 欧美一区二区私人影院日本| 日本aⅴ亚洲精品中文乱码| 欧美一区二区三区免费在线看 | 色婷婷av一区二区三区软件| 亚洲欧美色图小说| 色婷婷综合久久久| 午夜精品免费在线| 日韩一区二区免费高清| 久久精品国内一区二区三区| 欧美精品一区二区三区蜜桃视频| 国产成a人亚洲精| 亚洲色图色小说| 欧美日韩国产一二三| 三级成人在线视频| 久久久精品国产99久久精品芒果 | 国产精品国产自产拍高清av| 91丨porny丨国产入口| 亚洲国产视频一区| 日韩精品一区二区三区在线观看| 免费精品视频最新在线| 国产色产综合产在线视频| 99久久夜色精品国产网站| 亚洲国产精品一区二区www在线| 91精品蜜臀在线一区尤物| 国产毛片精品国产一区二区三区| 日本一区二区高清| 欧美午夜一区二区三区| 麻豆国产精品777777在线| 欧美国产一区在线| 综合分类小说区另类春色亚洲小说欧美| 91精品福利视频| 看电视剧不卡顿的网站| 国产性天天综合网| 欧洲人成人精品| 精品亚洲免费视频| 亚洲三级视频在线观看| 日韩美女在线视频| eeuss鲁一区二区三区| 午夜欧美在线一二页| 国产欧美中文在线| 欧美日韩黄色影视| 国产成人夜色高潮福利影视| 亚洲综合色网站| 久久久99精品久久| 欧美三区免费完整视频在线观看| 国产又粗又猛又爽又黄91精品| 亚洲免费看黄网站| 亚洲精品一线二线三线| 欧美mv日韩mv亚洲| 日韩免费看网站| 国产精品黄色在线观看| 亚洲欧洲中文日韩久久av乱码| 亚洲人成网站影音先锋播放| 亚洲精品视频一区二区| 亚洲一区二区三区美女| 三级精品在线观看| 国产麻豆成人精品| 97久久超碰精品国产| 欧美浪妇xxxx高跟鞋交| 国产精品色呦呦| 国产精品1区二区.| 国产欧美日韩综合精品一区二区| 欧洲国内综合视频| 成人av高清在线| 免费观看30秒视频久久| heyzo一本久久综合| 精品在线观看视频| 亚洲一二三四区不卡| 国产欧美一区二区精品性| 欧美一区二区高清| 97se亚洲国产综合在线| 国产米奇在线777精品观看| 日日夜夜免费精品| 一区二区三区中文字幕| 中文字幕免费在线观看视频一区| 欧美xingq一区二区| 6080yy午夜一二三区久久| 色视频一区二区| 成人久久视频在线观看| 国内不卡的二区三区中文字幕| 午夜精品免费在线| 亚洲高清视频中文字幕| 亚洲欧洲综合另类在线| 国产精品久久久久久久第一福利| 久久五月婷婷丁香社区| 日韩欧美123| 91精品国产福利在线观看| 欧美日韩一级片网站| 91极品视觉盛宴| 色婷婷综合久久久中文一区二区| 成人av网址在线观看| 高清不卡一区二区在线| 国产一区二区三区电影在线观看| 蜜臀av一区二区在线免费观看| 五月天久久比比资源色| 亚洲国产视频直播| 亚洲成a人片在线观看中文| 一二三四区精品视频| 亚洲免费大片在线观看| 亚洲欧洲制服丝袜| 亚洲美女视频一区| 一区二区久久久久| 亚洲一区在线观看网站| 一区二区三区四区高清精品免费观看 | 欧美一区二区免费视频| 在线播放国产精品二区一二区四区| 欧美伊人久久大香线蕉综合69| 欧洲av在线精品| 欧美日本国产一区| 在线综合视频播放| 日韩女优制服丝袜电影| 久久综合久久99| 久久精品一二三| 国产精品免费久久| 亚洲男同1069视频| 亚洲香肠在线观看| 免费av成人在线| 国产电影一区在线| 91免费国产在线| 欧美日韩一区二区三区在线看| 91麻豆精品国产91久久久资源速度| 欧美一区二区三区婷婷月色|