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

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

?? synthspinnerui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
字號:
/* * @(#)SynthSpinnerUI.java	1.11 03/12/19 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.synth;import java.awt.*;import java.awt.event.*;import java.text.ParseException;import javax.swing.*;import javax.swing.event.*;import javax.swing.plaf.*;import javax.swing.plaf.basic.BasicSpinnerUI;import javax.swing.text.*;import java.beans.*;import java.text.*;import java.util.*;import sun.swing.plaf.synth.SynthUI;/** * Synth's SpinnerUI. * * @version 1.11, 12/19/03 * @author Hans Muller * @author Joshua Outwater */class SynthSpinnerUI extends BasicSpinnerUI implements PropertyChangeListener,        SynthUI {    private SynthStyle style;    /**     * Returns a new instance of SynthSpinnerUI.       *      * @param c the JSpinner (not used)     * @see ComponentUI#createUI     * @return a new SynthSpinnerUI object     */    public static ComponentUI createUI(JComponent c) {        return new SynthSpinnerUI();    }    protected void installListeners() {        spinner.addPropertyChangeListener(this);    }    /**     * Removes the <code>propertyChangeListener</code> added     * by installListeners.     * <p>     * This method is called by <code>uninstallUI</code>.     *      * @see #installListeners     */    protected void uninstallListeners() {	spinner.removePropertyChangeListener(this);    }    /**     * 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() {        LayoutManager layout = spinner.getLayout();        if (layout == null || layout instanceof UIResource) {            spinner.setLayout(createLayout());        }        updateStyle(spinner);    }    private void updateStyle(JSpinner c) {        SynthContext context = getContext(c, ENABLED);        SynthStyle oldStyle = style;        style = SynthLookAndFeel.updateStyle(context, this);        if (style != oldStyle) {            if (oldStyle != null) {                // Only call installKeyboardActions as uninstall is not                // public.                installKeyboardActions();            }        }        context.dispose();    }    /**     * 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() {        if (spinner.getLayout() instanceof UIResource) {            spinner.setLayout(null);        }        SynthContext context = getContext(spinner, ENABLED);        style.uninstallDefaults(context);        context.dispose();        style = null;    }    protected LayoutManager createLayout() {        return new SpinnerLayout();    }    // Not used since we overload install/uninstallListeners.    protected PropertyChangeListener createPropertyChangeListener() {	return this;    }    /**     * 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() {	JButton b = new SynthArrowButton(SwingConstants.SOUTH);        b.setName("Spinner.previousButton");        installPreviousButtonListeners(b);	return b;    }    /**     * 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() {	JButton b = new SynthArrowButton(SwingConstants.NORTH);        b.setName("Spinner.nextButton");        installNextButtonListeners(b);	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();        editor.setName("Spinner.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);	spinner.add(newEditor, "Editor");    }    /**     * 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);            }        }    }    public SynthContext getContext(JComponent c) {        return getContext(c, getComponentState(c));    }    private SynthContext getContext(JComponent c, int state) {        return SynthContext.getContext(SynthContext.class, c,                    SynthLookAndFeel.getRegion(c), style, state);    }    private Region getRegion(JComponent c) {        return SynthLookAndFeel.getRegion(c);    }    private int getComponentState(JComponent c) {        return SynthLookAndFeel.getComponentState(c);    }    public void update(Graphics g, JComponent c) {        SynthContext context = getContext(c);        SynthLookAndFeel.update(context, g);        context.getPainter().paintSpinnerBackground(context,                          g, 0, 0, c.getWidth(), c.getHeight());        paint(context, g);        context.dispose();    }    public void paint(Graphics g, JComponent c) {        SynthContext context = getContext(c);        paint(context, g);        context.dispose();    }    protected void paint(SynthContext context, Graphics g) {    }    public void paintBorder(SynthContext context, Graphics g, int x,                            int y, int w, int h) {        context.getPainter().paintSpinnerBorder(context, g, x, y, w, h);    }    /**     * A simple layout manager for the editor and the next/previous buttons.     * See the SynthSpinnerUI javadoc for more information about exactly     * how the components are arranged.     */    private static class SpinnerLayout implements LayoutManager, UIResource    {	private Component nextButton = null;	private Component previousButton = null;	private Component editor = null;	public void addLayoutComponent(String name, Component c) {	    if ("Next".equals(name)) {		nextButton = c;	    }	    else if ("Previous".equals(name)) {		previousButton = c;	    }	    else if ("Editor".equals(name)) {		editor = c;	    }	}	public void removeLayoutComponent(Component c) {	    if (c == nextButton) {		c = null;	    }	    else if (c == previousButton) {		previousButton = null;	    }	    else if (c == editor) {		editor = null;	    }	}	private Dimension preferredSize(Component c) {	    return (c == null) ? new Dimension(0, 0) : c.getPreferredSize();	}	public Dimension preferredLayoutSize(Container parent) {	    Dimension nextD = preferredSize(nextButton);	    Dimension previousD = preferredSize(previousButton);	    Dimension editorD = preferredSize(editor);	    /* Force the editors height to be a multiple of 2	     */	    editorD.height = ((editorD.height + 1) / 2) * 2;     	    Dimension size = new Dimension(editorD.width, editorD.height);	    size.width += Math.max(nextD.width, previousD.width);	    Insets insets = parent.getInsets();	    size.width += insets.left + insets.right;	    size.height += insets.top + insets.bottom;	    return size;	}	public Dimension minimumLayoutSize(Container parent) {	    return preferredLayoutSize(parent);	}	private void setBounds(Component c, int x, int y, int width, int height) {	    if (c != null) {		c.setBounds(x, y, width, height);	    }	}	public void layoutContainer(Container parent) {	    Insets insets = parent.getInsets();	    int availWidth = parent.getWidth() - (insets.left + insets.right);	    int availHeight = parent.getHeight() - (insets.top + insets.bottom);	    Dimension nextD = preferredSize(nextButton);	    Dimension previousD = preferredSize(previousButton);	    	    int nextHeight = availHeight / 2;	    int previousHeight = availHeight - nextHeight;	    int buttonsWidth = Math.max(nextD.width, previousD.width);	    int editorWidth = availWidth - buttonsWidth;	    /* Deal with the spinners componentOrientation property.	     */	    int editorX, buttonsX;	    if (parent.getComponentOrientation().isLeftToRight()) {		editorX = insets.left;		buttonsX = editorX + editorWidth;	    }	    else {		buttonsX = insets.left;		editorX = buttonsX + buttonsWidth;	    }	    int previousY = insets.top + nextHeight;	    setBounds(editor, editorX, insets.top, editorWidth, availHeight);	    setBounds(nextButton, buttonsX, insets.top, buttonsWidth, nextHeight);	    setBounds(previousButton, buttonsX, previousY, buttonsWidth, previousHeight);	}    }    public void propertyChange(PropertyChangeEvent e) {        String propertyName = e.getPropertyName();        JSpinner spinner = (JSpinner)(e.getSource());        SpinnerUI spinnerUI = spinner.getUI();            if (spinnerUI instanceof SynthSpinnerUI) {            SynthSpinnerUI ui = (SynthSpinnerUI)spinnerUI;                if (SynthLookAndFeel.shouldUpdateStyle(e)) {                ui.updateStyle(spinner);            }            if ("editor".equals(propertyName)) {                JComponent oldEditor = (JComponent)e.getOldValue();                JComponent newEditor = (JComponent)e.getNewValue();                ui.replaceEditor(oldEditor, newEditor);                ui.updateEnabledState();            }            else if ("enabled".equals(propertyName)) {                ui.updateEnabledState();            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级片在线| 一区二区三区 在线观看视频| 欧美国产乱子伦 | 欧美丝袜丝交足nylons| 日韩视频免费观看高清完整版| 中文字幕欧美区| 日本中文在线一区| 在线视频国内自拍亚洲视频| 2023国产精品| 美女网站色91| 欧美无乱码久久久免费午夜一区| 国产午夜精品福利| 日本亚洲免费观看| 欧美三级电影在线看| 中文字幕高清不卡| 国产激情偷乱视频一区二区三区| 欧美日韩午夜在线| 亚洲美女在线一区| 成人avav影音| 中文在线免费一区三区高中清不卡| 日韩精品视频网站| 欧美电影一区二区三区| 亚洲午夜视频在线| 91久久精品一区二区| 亚洲丝袜美腿综合| 成人免费毛片aaaaa**| 久久久国产精华| 国产一区二区三区电影在线观看 | 97精品国产97久久久久久久久久久久 | 国产寡妇亲子伦一区二区| 欧美一级免费大片| 蜜臀99久久精品久久久久久软件| 91精品久久久久久蜜臀| 首页国产欧美久久| 91精品国产麻豆| 美洲天堂一区二卡三卡四卡视频| 日韩一区二区三区四区五区六区| 三级影片在线观看欧美日韩一区二区| 色婷婷一区二区三区四区| 亚洲欧美一区二区不卡| 色菇凉天天综合网| 亚洲综合在线视频| 欧美精品第1页| 日本欧美一区二区在线观看| 3d动漫精品啪啪一区二区竹菊| 亚洲成av人在线观看| 欧美一级一区二区| 国产成人在线视频免费播放| 欧美极品aⅴ影院| 色综合久久综合网97色综合 | 国产精品天美传媒| 在线观看日韩毛片| 日韩高清一级片| 久久九九99视频| 91玉足脚交白嫩脚丫在线播放| 亚洲精品中文字幕乱码三区 | 精品国产电影一区二区| 国产a区久久久| 亚洲人成网站影音先锋播放| 欧美日韩一区二区三区高清| 男人的天堂久久精品| 日本一区二区三区久久久久久久久不 | 美洲天堂一区二卡三卡四卡视频| 久久久久久久久久看片| a4yy欧美一区二区三区| 亚洲成人av电影在线| 精品88久久久久88久久久| 波多野结衣中文一区| 亚洲伊人伊色伊影伊综合网| 欧美大胆一级视频| 色哟哟国产精品免费观看| 日韩精品一二区| 国产精品久久久久久久裸模| 欧美日本国产视频| 丁香啪啪综合成人亚洲小说| 亚洲国产wwwccc36天堂| 中文字幕欧美激情| 91精品国产麻豆| 91香蕉视频mp4| 国产在线精品一区二区三区不卡| 亚洲精品国产一区二区三区四区在线| 日韩欧美国产麻豆| 色先锋久久av资源部| 国产成人精品三级| 日韩成人dvd| 亚洲免费观看在线视频| 久久免费美女视频| 欧美一级欧美三级| 欧美性猛片xxxx免费看久爱| 国产一区二区在线电影| 亚洲成人一区二区在线观看| 国产精品传媒入口麻豆| 精品国产乱码久久| wwwwww.欧美系列| 3d动漫精品啪啪一区二区竹菊| 色美美综合视频| 99在线精品视频| 大白屁股一区二区视频| 精品综合免费视频观看| 日韩电影网1区2区| 天堂午夜影视日韩欧美一区二区| 亚洲视频你懂的| 日本一区二区三区久久久久久久久不 | 国产麻豆精品在线观看| 美美哒免费高清在线观看视频一区二区| 亚洲精品乱码久久久久久久久| 国产精品进线69影院| 久久久精品蜜桃| 久久久精品国产免大香伊| 精品粉嫩aⅴ一区二区三区四区| 777a∨成人精品桃花网| 欧美性色欧美a在线播放| 一本色道久久综合亚洲aⅴ蜜桃| 99久久99久久精品国产片果冻| 国产精品系列在线播放| 韩国精品主播一区二区在线观看 | av日韩在线网站| 成人动漫av在线| 99久久综合国产精品| 99久久er热在这里只有精品66| 成人中文字幕在线| 成人av网在线| 日本高清无吗v一区| 91福利区一区二区三区| 欧美日韩国产一区| 欧美一区二区国产| 精品国产免费人成电影在线观看四季 | 一区二区中文视频| 夜夜夜精品看看| 日本人妖一区二区| 国产制服丝袜一区| 成人夜色视频网站在线观看| 国产成人在线视频免费播放| 99视频一区二区| 欧美私人免费视频| 欧美精品一区二区三区高清aⅴ| 久久久久久久久久久久久久久99 | 久久蜜桃一区二区| 中文字幕一区二区三区蜜月| 一区二区成人在线视频| 丝袜诱惑亚洲看片| 国产精品99久久久久久久vr| 91麻豆国产福利在线观看| 欧美美女直播网站| 国产日韩欧美综合在线| 一区二区三区四区在线播放| 日韩高清在线一区| 成人黄色网址在线观看| 欧美日韩午夜在线视频| 国产三级精品视频| 午夜亚洲福利老司机| 久久99精品一区二区三区| 91麻豆精品在线观看| 精品国产污网站| 亚洲一区二区三区四区在线| 精品影院一区二区久久久| 在线免费观看日本欧美| 精品久久久网站| 一区二区在线观看免费| 黑人巨大精品欧美黑白配亚洲| 99精品国产视频| 精品国产91洋老外米糕| 亚洲一二三四在线观看| 国产精品一区二区男女羞羞无遮挡| 色综合色综合色综合| 久久精品视频一区| 日韩av午夜在线观看| 色呦呦一区二区三区| 久久久久久影视| 奇米四色…亚洲| 欧美最猛黑人xxxxx猛交| 国产亚洲欧美日韩俺去了| 五月激情综合色| 日本国产一区二区| 国产精品久久久久一区二区三区共| 日韩不卡一区二区三区| 欧美性色综合网| 一区二区三区在线视频观看58| 国产高清精品在线| 精品噜噜噜噜久久久久久久久试看| 亚洲综合在线第一页| 91天堂素人约啪| 国产精品素人一区二区| 国产一区二区三区香蕉| 欧美videos大乳护士334| 日韩av在线免费观看不卡| 欧美无砖专区一中文字| 椎名由奈av一区二区三区| 成人永久免费视频| 国产网红主播福利一区二区| 久久成人免费电影| 日韩一区二区免费高清| 人人超碰91尤物精品国产| 欧美剧情片在线观看| 午夜国产精品一区| 欧美精品一二三区| 日本午夜一本久久久综合| 777色狠狠一区二区三区| 日韩精品电影一区亚洲| 欧美一区二区啪啪|