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

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

?? basicspinnerui.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(hào):
     * 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);        editor.setInheritsPopupMenu(true);        updateEditorAlignment(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);        newEditor.setInheritsPopupMenu(true);        updateEditorAlignment(newEditor);	spinner.add(newEditor, "Editor");    }    private void updateEditorAlignment(JComponent editor) {        if (editor instanceof JSpinner.DefaultEditor) {            // if editor alignment isn't set in LAF, we get 0 (CENTER) here            int alignment = UIManager.getInt("Spinner.editorAlignment");            JTextField text = ((JSpinner.DefaultEditor)editor).getTextField();            text.setHorizontalAlignment(alignment);        }    }        /**     * 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(getHandler());	    }	}    }    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(getHandler());	    }	}    }    /**     * 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);	    if (DefaultLookup.getBoolean(spinner, this,		"Spinner.disableOnBoundaryValues", false)) { 		SpinnerModel model = spinner.getModel(); 		if (child.getName() == "Spinner.nextButton" &&		    model.getNextValue() == null) { 		    child.setEnabled(false); 		} 		else if (child.getName() == "Spinner.previousButton" &&			 model.getPreviousValue() == null) { 		    child.setEnabled(false); 		} 		else { 		    child.setEnabled(enabled); 		} 	    }	    else {		child.setEnabled(enabled);	    }            if (child instanceof Container) {                updateEnabledState((Container)child, enabled);            }        }    }    /**     * Installs the keyboard Actions onto the JSpinner.     *     * @since 1.5     */    protected void installKeyboardActions() {        InputMap iMap = getInputMap(JComponent.                                   WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);	SwingUtilities.replaceUIInputMap(spinner, JComponent.					 WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,					 iMap);        LazyActionMap.installLazyActionMap(spinner, BasicSpinnerUI.class,                "Spinner.actionMap");    }    /**     * Returns the InputMap to install for <code>condition</code>.     */    private InputMap getInputMap(int condition) {        if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {	    return (InputMap)DefaultLookup.get(spinner, this,                    "Spinner.ancestorInputMap");        }        return null;    }    static void loadActionMap(LazyActionMap map) {        map.put("increment", nextButtonHandler);        map.put("decrement", previousButtonHandler);    }    /**     * Returns the baseline.     *     * @throws NullPointerException {@inheritDoc}     * @throws IllegalArgumentException {@inheritDoc}     * @see javax.swing.JComponent#getBaseline(int, int)     * @since 1.6     */    public int getBaseline(JComponent c, int width, int height) {        super.getBaseline(c, width, height);        JComponent editor = spinner.getEditor();        Insets insets = spinner.getInsets();        width = width - insets.left - insets.right;        height = height - insets.top - insets.bottom;        if (width >= 0 && height >= 0) {            int baseline = editor.getBaseline(width, height);            if (baseline >= 0) {                return insets.top + baseline;            }        }        return -1;    }    /**     * Returns an enum indicating how the baseline of the component     * changes as the size changes.     *     * @throws NullPointerException {@inheritDoc}     * @see javax.swing.JComponent#getBaseline(int, int)     * @since 1.6     */    public Component.BaselineResizeBehavior getBaselineResizeBehavior(            JComponent c) {        super.getBaselineResizeBehavior(c);        return spinner.getEditor().getBaselineResizeBehavior();    }    /**     * A handler for spinner arrow button mouse and action events.  When      * a left mouse pressed event occurs we look up the (enabled) spinner      * that's the source of the event and start the autorepeat timer.  The     * timer fires action events until any button is released at which      * point the timer is stopped and the reference to the spinner cleared.     * The timer doesn't start until after a 300ms delay, so often the      * source of the initial (and final) action event is just the button     * logic for mouse released - which means that we're relying on the fact     * that our mouse listener runs after the buttons mouse listener.     * <p>     * Note that one instance of this handler is shared by all slider previous      * arrow buttons and likewise for all of the next buttons,      * so it doesn't have any state that persists beyond the limits     * of a single button pressed/released gesture.     */    private static class ArrowButtonHandler extends AbstractAction					    implements FocusListener, MouseListener, UIResource {	final javax.swing.Timer autoRepeatTimer;	final boolean isNext;	JSpinner spinner = null; 	JButton arrowButton = null;	ArrowButtonHandler(String name, boolean isNext) {            super(name);	    this.isNext = isNext;	    autoRepeatTimer = new javax.swing.Timer(60, this);	    autoRepeatTimer.setInitialDelay(300);	}	private JSpinner eventToSpinner(AWTEvent e) {	    Object src = e.getSource();	    while ((src instanceof Component) && !(src instanceof JSpinner)) {		src = ((Component)src).getParent();	    }	    return (src instanceof JSpinner) ? (JSpinner)src : null;	}	public void actionPerformed(ActionEvent e) {            JSpinner spinner = this.spinner;            if (!(e.getSource() instanceof javax.swing.Timer)) {                // Most likely resulting from being in ActionMap.                spinner = eventToSpinner(e);		if (e.getSource() instanceof JButton) {		    arrowButton = (JButton)e.getSource();		}	    } else {  		if (arrowButton!=null && !arrowButton.getModel().isPressed()		    && autoRepeatTimer.isRunning()) {  		    autoRepeatTimer.stop();  		    spinner = null;		    arrowButton = null;  		}	    }            if (spinner != null) {                try {                    int calendarField = getCalendarField(spinner);                    spinner.commitEdit();                    if (calendarField != -1) {                        ((SpinnerDateModel)spinner.getModel()).                                 setCalendarField(calendarField);                    }                    Object value = (isNext) ? spinner.getNextValue() :                               spinner.getPreviousValue();                    if (value != null) {                        spinner.setValue(value);                        select(spinner);                    }                } catch (IllegalArgumentException iae) {                    UIManager.getLookAndFeel().provideErrorFeedback(spinner);                } catch (ParseException pe) {                    UIManager.getLookAndFeel().provideErrorFeedback(spinner);                }            }	}        /**         * If the spinner's editor is a DateEditor, this selects the field         * associated with the value that is being incremented.         */        private void select(JSpinner spinner) {            JComponent editor = spinner.getEditor();            if (editor instanceof JSpinner.DateEditor) {                JSpinner.DateEditor dateEditor = (JSpinner.DateEditor)editor;                JFormattedTextField ftf = dateEditor.getTextField();                Format format = dateEditor.getFormat();                Object value;                if (format != null && (value = spinner.getValue()) != null) {                    SpinnerDateModel model = dateEditor.getModel();                    DateFormat.Field field = DateFormat.Field.ofCalendarField(                        model.getCalendarField());                    if (field != null) {                        try {                            AttributedCharacterIterator iterator = format.                                formatToCharacterIterator(value);                            if (!select(ftf, iterator, field) &&                                       field == DateFormat.Field.HOUR0) {                                select(ftf, iterator, DateFormat.Field.HOUR1);                            }                        }                        catch (IllegalArgumentException iae) {}                    }                }            }        }        /**         * Selects the passed in field, returning true if it is found,         * false otherwise.         */        private boolean select(JFormattedTextField ftf,                               AttributedCharacterIterator iterator,                               DateFormat.Field field) {            int max = ftf.getDocument().getLength();            iterator.first();            do {                Map attrs = iterator.getAttributes();                if (attrs != null && attrs.containsKey(field)){                    int start = iterator.getRunStart(field);                    int end = iterator.getRunLimit(field);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产三级精品三级| 国产99久久久国产精品潘金| 欧美日韩一级片在线观看| 亚洲精品免费播放| 欧美综合视频在线观看| 午夜精品视频在线观看| 欧美一区二区在线播放| 久久电影国产免费久久电影| 国产婷婷色一区二区三区| 成人午夜在线免费| 一区二区三区四区在线播放| 欧美日韩精品免费观看视频| 麻豆精品视频在线观看视频| 久久久三级国产网站| 东方欧美亚洲色图在线| 亚洲第一综合色| 精品99久久久久久| 不卡的av在线| 日韩黄色免费网站| 26uuu色噜噜精品一区| 成人动漫一区二区三区| 性久久久久久久| 久久免费精品国产久精品久久久久| 成人avav影音| 午夜久久久久久久久| 久久亚洲捆绑美女| 91蝌蚪porny九色| 美女国产一区二区| 综合久久久久久| 精品福利一二区| 91丝袜美腿高跟国产极品老师| 日韩精品国产精品| 亚洲国产精品国自产拍av| 欧美午夜不卡在线观看免费| 久久精品国产久精国产爱| 国产精品成人一区二区三区夜夜夜| 欧美日韩一级黄| 成人激情免费视频| 蜜臀av一区二区三区| 亚洲视频1区2区| 久久伊99综合婷婷久久伊| 欧美性感一区二区三区| 夫妻av一区二区| 青娱乐精品视频| 亚洲一线二线三线视频| 欧美国产日韩一二三区| 欧美一区二区三区四区五区| 99精品视频在线观看免费| 久久99热99| 天堂影院一区二区| 亚洲精品福利视频网站| 日本一区二区三区高清不卡| 日韩一区二区在线观看视频| 欧美日韩专区在线| 91视频在线看| jvid福利写真一区二区三区| 国产真实乱对白精彩久久| 日韩精品亚洲一区| 亚洲一二三四在线观看| 亚洲人精品午夜| 亚洲免费av在线| 26uuu久久天堂性欧美| 777精品伊人久久久久大香线蕉| 91久久精品国产91性色tv| 粉嫩一区二区三区性色av| 九九久久精品视频| 久久精品国产77777蜜臀| 婷婷综合在线观看| 亚洲一区二区三区四区五区黄 | 亚洲人成网站精品片在线观看| 亚洲精品在线观| 欧美一级欧美一级在线播放| 欧美日本视频在线| 欧美日韩国产一区| 欧美日韩不卡一区| 欧美福利一区二区| 欧美日韩午夜影院| 欧美精品在线视频| 91 com成人网| 精品国产一区二区三区忘忧草| 日韩一区二区电影网| 日韩欧美国产wwwww| 欧美va亚洲va| 久久亚洲一区二区三区四区| 国产色综合久久| 中文字幕一区二区视频| 国产精品久久久久精k8| 中文字幕综合网| 亚洲国产精品一区二区久久| 亚洲成人免费av| 日韩av电影免费观看高清完整版 | 成人免费小视频| 自拍偷在线精品自拍偷无码专区| 亚洲欧美偷拍卡通变态| 亚洲一区二区精品视频| 日韩精品高清不卡| 激情综合色综合久久| 国产成人高清在线| 色老综合老女人久久久| 欧美高清一级片在线| 日韩午夜激情视频| 国产亚洲福利社区一区| 亚洲欧洲99久久| 五月天一区二区三区| 日韩电影一二三区| 国产精品综合在线视频| 成人精品在线视频观看| 成人av网址在线| 欧美色窝79yyyycom| 日韩精品中文字幕在线一区| 精品国产乱码久久久久久1区2区| 久久久久国色av免费看影院| 欧美激情综合五月色丁香小说| 亚洲免费在线电影| 亚洲电影一级片| 成人免费毛片片v| 久久成人精品无人区| 一区二区三区成人在线视频| 欧美日韩国产综合一区二区三区| 91黄视频在线| 精品欧美乱码久久久久久1区2区| 国产精品久久久久久久久搜平片 | 精品入口麻豆88视频| 亚洲天堂免费看| 人妖欧美一区二区| av电影在线不卡| 日韩无一区二区| 亚洲婷婷在线视频| 精品一区二区三区在线播放| 在线一区二区三区四区五区| 久久久精品人体av艺术| 午夜亚洲国产au精品一区二区| 粉嫩av一区二区三区粉嫩| 欧美久久久久免费| 1024成人网| 国产精品1024| 4438x亚洲最大成人网| 亚洲欧美日韩成人高清在线一区| 极品销魂美女一区二区三区| 欧美性色黄大片| 国产精品美女久久久久久| 精品一区二区久久| 欧美片网站yy| 国产精品久久久久影视| 国产一区二区三区免费看| 91精品国产综合久久久久久漫画| 亚洲乱码国产乱码精品精可以看 | 国产丝袜美腿一区二区三区| 奇米综合一区二区三区精品视频| 在线观看日韩国产| 亚洲精品国产视频| av动漫一区二区| 国产精品国产三级国产a| 国产精品一区二区你懂的| 日韩欧美中文字幕一区| 日韩成人伦理电影在线观看| 欧美美女直播网站| 丝袜国产日韩另类美女| 色噜噜狠狠色综合欧洲selulu| 中文字幕在线不卡一区二区三区 | 日韩精品一区第一页| 色一情一乱一乱一91av| 国产精品成人免费在线| 成人av在线资源网| 国产三级精品三级在线专区| 亚洲国产精品久久艾草纯爱| 欧洲视频一区二区| 亚洲国产精品人人做人人爽| 在线观看av一区二区| 亚洲精品国久久99热| www.欧美精品一二区| 国产蜜臀av在线一区二区三区| 亚洲二区视频在线| 91精品在线麻豆| 日韩欧美国产不卡| 久久国产三级精品| 成人免费高清在线| 中文字幕亚洲欧美在线不卡| 一区二区三区在线免费| 欧美色倩网站大全免费| 亚洲欧洲一区二区三区| 在线视频一区二区免费| 亚洲三级视频在线观看| 欧美三级中文字幕| 亚洲视频免费看| 色综合色综合色综合色综合色综合| 欧美日韩一区二区在线观看 | 成人深夜视频在线观看| 精品福利一二区| 久久精品国产久精国产爱| 日韩国产欧美在线视频| 91.com视频| 五月婷婷久久综合| 久久奇米777| 美女视频黄频大全不卡视频在线播放| 91超碰这里只有精品国产| 久久久综合视频| 国内精品第一页| 国产日本一区二区| 在线观看成人小视频|