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

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

?? basicoptionpaneui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * @(#)BasicOptionPaneUI.java	1.58 03/12/19 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import sun.swing.DefaultLookup;import sun.swing.UIAction;import javax.swing.border.Border;import javax.swing.border.EmptyBorder;import javax.swing.*;import javax.swing.event.*;import javax.swing.plaf.ActionMapUIResource;import javax.swing.plaf.ComponentUI;import javax.swing.plaf.OptionPaneUI;import java.awt.*;import java.awt.event.*;import java.beans.PropertyChangeEvent;import java.beans.PropertyChangeListener;import java.util.Locale;import java.security.AccessController;import sun.security.action.GetPropertyAction;/** * Provides the basic look and feel for a <code>JOptionPane</code>. * <code>BasicMessagePaneUI</code> provides a means to place an icon, * message and buttons into a <code>Container</code>. * Generally, the layout will look like:<p> * <pre> *        ------------------ *        | i | message    | *        | c | message    | *        | o | message    | *        | n | message    | *        ------------------ *        |     buttons    | *        |________________| * </pre> * icon is an instance of <code>Icon</code> that is wrapped inside a * <code>JLabel</code>.  The message is an opaque object and is tested * for the following: if the message is a <code>Component</code> it is * added to the <code>Container</code>, if it is an <code>Icon</code> * it is wrapped inside a <code>JLabel</code> and added to the  * <code>Container</code> otherwise it is wrapped inside a <code>JLabel</code>. * <p> * The above layout is used when the option pane's  * <code>ComponentOrientation</code> property is horizontal, left-to-right. * The layout will be adjusted appropriately for other orientations. * <p> * The <code>Container</code>, message, icon, and buttons are all * determined from abstract methods. *  * @version 1.58 12/19/03 * @author James Gosling * @author Scott Violet * @author Amy Fowler */public class BasicOptionPaneUI extends OptionPaneUI {    public static final int MinimumWidth = 262;    public static final int MinimumHeight = 90;    private static String newline;    /**     * <code>JOptionPane</code> that the receiver is providing the     * look and feel for.     */    protected JOptionPane         optionPane;    protected Dimension minimumSize;    /** JComponent provide for input if optionPane.getWantsInput() returns     * true. */    protected JComponent          inputComponent;    /** Component to receive focus when messaged with selectInitialValue. */    protected Component           initialFocusComponent;    /** This is set to true in validateComponent if a Component is contained     * in either the message or the buttons. */    protected boolean             hasCustomComponents;    protected PropertyChangeListener propertyChangeListener;    private Handler handler;    static {	newline = (String)java.security.AccessController.doPrivileged(                                new GetPropertyAction("line.separator"));        if (newline == null) {            newline = "\n";        }    }    static void loadActionMap(LazyActionMap map) {	map.put(new Actions(Actions.CLOSE));        BasicLookAndFeel.installAudioActionMap(map);    }    /**      * Creates a new BasicOptionPaneUI instance.      */    public static ComponentUI createUI(JComponent x) {	return new BasicOptionPaneUI();    }    /**      * Installs the receiver as the L&F for the passed in      * <code>JOptionPane</code>.      */    public void installUI(JComponent c) {	optionPane = (JOptionPane)c;        installDefaults();        optionPane.setLayout(createLayoutManager());	installComponents();        installListeners();         installKeyboardActions();    }    /**      * Removes the receiver from the L&F controller of the passed in split      * pane.      */    public void uninstallUI(JComponent c) {        uninstallComponents();        optionPane.setLayout(null);        uninstallKeyboardActions();        uninstallListeners();        uninstallDefaults();	optionPane = null;    }    protected void installDefaults() {        LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background",                                          "OptionPane.foreground", "OptionPane.font");	LookAndFeel.installBorder(optionPane, "OptionPane.border");        minimumSize = UIManager.getDimension("OptionPane.minimumSize");        LookAndFeel.installProperty(optionPane, "opaque", Boolean.TRUE);    }    protected void uninstallDefaults() {	LookAndFeel.uninstallBorder(optionPane);    }    protected void installComponents() {	optionPane.add(createMessageArea());                Container separator = createSeparator();        if (separator != null) {            optionPane.add(separator);        }	optionPane.add(createButtonArea());	optionPane.applyComponentOrientation(optionPane.getComponentOrientation());    }    protected void uninstallComponents() {	hasCustomComponents = false;        inputComponent = null;	initialFocusComponent = null;	optionPane.removeAll();    }    protected LayoutManager createLayoutManager() {        return new BoxLayout(optionPane, BoxLayout.Y_AXIS);    }    protected void installListeners() {        if ((propertyChangeListener = createPropertyChangeListener()) != null) {            optionPane.addPropertyChangeListener(propertyChangeListener);        }    }    protected void uninstallListeners() {        if (propertyChangeListener != null) {            optionPane.removePropertyChangeListener(propertyChangeListener);            propertyChangeListener = null;        }        handler = null;    }    protected PropertyChangeListener createPropertyChangeListener() {        return getHandler();    }    private Handler getHandler() {        if (handler == null) {            handler = new Handler();        }        return handler;    }    protected void installKeyboardActions() {	InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);	SwingUtilities.replaceUIInputMap(optionPane, JComponent.				       WHEN_IN_FOCUSED_WINDOW, map);        LazyActionMap.installLazyActionMap(optionPane, BasicOptionPaneUI.class,                                           "OptionPane.actionMap");    }    protected void uninstallKeyboardActions() {	SwingUtilities.replaceUIInputMap(optionPane, JComponent.				       WHEN_IN_FOCUSED_WINDOW, null);	SwingUtilities.replaceUIActionMap(optionPane, null);    }    InputMap getInputMap(int condition) {	if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW) {	    Object[] bindings = (Object[])DefaultLookup.get(                             optionPane, this, "OptionPane.windowBindings");	    if (bindings != null) {		return LookAndFeel.makeComponentInputMap(optionPane, bindings);	    }	}	return null;    }    /**     * Returns the minimum size the option pane should be. Primarily     * provided for subclassers wishing to offer a different minimum size.     */    public Dimension getMinimumOptionPaneSize() {        if (minimumSize == null) {            return new Dimension(MinimumWidth, MinimumHeight);        }	return new Dimension(minimumSize.width,			     minimumSize.height);    }    /**     * If <code>c</code> is the <code>JOptionPane</code> the receiver     * is contained in, the preferred     * size that is returned is the maximum of the preferred size of     * the <code>LayoutManager</code> for the <code>JOptionPane</code>, and     * <code>getMinimumOptionPaneSize</code>.     */    public Dimension getPreferredSize(JComponent c) {	if ((JOptionPane)c == optionPane) {	    Dimension            ourMin = getMinimumOptionPaneSize();	    LayoutManager        lm = c.getLayout();	    if (lm != null) {		Dimension         lmSize = lm.preferredLayoutSize(c);		if (ourMin != null)		    return new Dimension			(Math.max(lmSize.width, ourMin.width),			 Math.max(lmSize.height, ourMin.height));		return lmSize;	    }	    return ourMin;	}	return null;    }    /**     * Messaged from installComponents to create a Container containing the     * body of the message. The icon is the created by calling     * <code>addIcon</code>.     */    protected Container createMessageArea() {        JPanel top = new JPanel();        Border topBorder = (Border)DefaultLookup.get(optionPane, this,                                             "OptionPane.messageAreaBorder");        if (topBorder != null) {            top.setBorder(topBorder);        }	top.setLayout(new BorderLayout());	/* Fill the body. */	Container          body = new JPanel(new GridBagLayout());	Container          realBody = new JPanel(new BorderLayout());        body.setName("OptionPane.body");        realBody.setName("OptionPane.realBody");	if (getIcon() != null) {            JPanel sep = new JPanel();            sep.setName("OptionPane.separator");            sep.setPreferredSize(new Dimension(15, 1));	    realBody.add(sep, BorderLayout.BEFORE_LINE_BEGINS);	}	realBody.add(body, BorderLayout.CENTER);	GridBagConstraints cons = new GridBagConstraints();	cons.gridx = cons.gridy = 0;	cons.gridwidth = GridBagConstraints.REMAINDER;	cons.gridheight = 1;	cons.anchor = DefaultLookup.getInt(optionPane, this,                      "OptionPane.messageAnchor", GridBagConstraints.CENTER);	cons.insets = new Insets(0,0,3,0);	addMessageComponents(body, cons, getMessage(),			  getMaxCharactersPerLineCount(), false);	top.add(realBody, BorderLayout.CENTER);	addIcon(top);	return top;    }    /**     * Creates the appropriate object to represent <code>msg</code> and     * places it into <code>container</code>. If <code>msg</code> is an     * instance of Component, it is added directly, if it is an Icon,     * a JLabel is created to represent it, otherwise a JLabel is     * created for the string, if <code>d</code> is an Object[], this     * method will be recursively invoked for the children.     * <code>internallyCreated</code> is true if Objc is an instance     * of Component and was created internally by this method (this is     * used to correctly set hasCustomComponents only if !internallyCreated).     */    protected void addMessageComponents(Container container,				     GridBagConstraints cons,				     Object msg, int maxll,				     boolean internallyCreated) {	if (msg == null) {	    return;        }	if (msg instanceof Component) {            // To workaround problem where Gridbad will set child            // to its minimum size if its preferred size will not fit            // within allocated cells            if (msg instanceof JScrollPane || msg instanceof JPanel) {                cons.fill = GridBagConstraints.BOTH;                cons.weighty = 1;            } else {	        cons.fill = GridBagConstraints.HORIZONTAL;            }	    cons.weightx = 1;	    container.add((Component) msg, cons);	    cons.weightx = 0;            cons.weighty = 0;	    cons.fill = GridBagConstraints.NONE;	    cons.gridy++;	    if (!internallyCreated) {		hasCustomComponents = true;            }	} else if (msg instanceof Object[]) {	    Object [] msgs = (Object[]) msg;	    for (int i = 0; i < msgs.length; i++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性生活大片视频| 91老师片黄在线观看| 国产亚洲一区二区三区四区| 久久99精品网久久| 国产无人区一区二区三区| 不卡免费追剧大全电视剧网站| 亚洲三级小视频| 777奇米成人网| 国产一区999| 中文字幕欧美一区| 欧美视频在线一区| 久久99久国产精品黄毛片色诱| 久久久久久夜精品精品免费| 91丝袜美女网| 日本va欧美va欧美va精品| 国产网站一区二区三区| 欧美亚洲自拍偷拍| 狠狠色狠狠色综合系列| 亚洲色欲色欲www在线观看| 欧美日韩第一区日日骚| 国产成人综合亚洲91猫咪| 国产精品传媒入口麻豆| 欧美一级日韩免费不卡| 波多野结衣中文一区| 亚洲成人中文在线| 国产欧美日韩另类一区| 欧美日韩精品一区视频| 国产a视频精品免费观看| 亚洲国产视频在线| 国产日韩欧美一区二区三区综合| 91官网在线免费观看| 蜜桃视频一区二区| 一区二区三区电影在线播| 精品久久久久一区| 一本色道久久综合狠狠躁的推荐| 极品少妇一区二区| 亚洲h在线观看| 国产精品久久久久一区二区三区 | 国产福利精品一区| 亚洲国产乱码最新视频| 国产精品网站在线| 精品国产乱码久久久久久图片| 欧美优质美女网站| 高清免费成人av| 精东粉嫩av免费一区二区三区| 亚洲中国最大av网站| 国产精品视频yy9299一区| 日韩欧美国产小视频| 在线免费观看日本欧美| 成人91在线观看| 国产成人高清在线| 国产在线播放一区三区四| 亚洲v精品v日韩v欧美v专区| 亚洲美女在线一区| 中文字幕一区二区三区蜜月| 久久一二三国产| 日韩三级视频在线看| 51久久夜色精品国产麻豆| 日本高清不卡视频| 91性感美女视频| 粉嫩一区二区三区在线看| 国产麻豆精品久久一二三| 久久精品99久久久| 久久国产婷婷国产香蕉| 久久精品国内一区二区三区| 日本午夜一区二区| 亚洲成国产人片在线观看| 亚洲第一主播视频| 午夜精品久久久久久久久久 | 日韩精品久久久久久| 亚洲国产中文字幕| 亚洲大型综合色站| 午夜精品久久久久久久99水蜜桃 | 91精品国产欧美一区二区18| 欧美电影一区二区三区| 欧美电影一区二区| 欧美mv日韩mv亚洲| 久久久久久久久久久久久女国产乱 | 亚洲国产精品一区二区www在线| 亚洲色图视频网| 一区二区三区久久久| 一个色在线综合| 五月激情综合网| 日本不卡一区二区| 黄网站免费久久| 成人黄色av电影| 日本韩国精品在线| 69av一区二区三区| 精品久久久久久久久久久院品网| 欧美精品一区二| 国产精品女同一区二区三区| 自拍偷自拍亚洲精品播放| 一个色综合av| 精品亚洲国产成人av制服丝袜| 国产精品一区免费在线观看| 成人精品一区二区三区中文字幕| 一本色道久久综合狠狠躁的推荐| 欧美日韩亚洲不卡| 久久毛片高清国产| 亚洲视频一区二区免费在线观看| 亚洲成人黄色小说| 国产久卡久卡久卡久卡视频精品| 99久久久久久| 日韩欧美色综合| 亚洲欧美综合色| 美腿丝袜亚洲色图| fc2成人免费人成在线观看播放| 欧美视频中文字幕| 久久亚洲二区三区| 一区二区三区在线观看欧美| 麻豆国产一区二区| 97se亚洲国产综合自在线不卡| 欧美日韩成人高清| 欧美激情综合在线| 日韩av电影一区| 99视频国产精品| 日韩一级免费一区| 亚洲同性同志一二三专区| 日韩电影在线观看一区| 成人av动漫网站| 日韩一级高清毛片| 亚洲欧美欧美一区二区三区| 韩国午夜理伦三级不卡影院| 在线亚洲一区二区| 久久久天堂av| 日韩精品成人一区二区三区| 91在线无精精品入口| 2014亚洲片线观看视频免费| 午夜精品久久久久久| 99国产欧美久久久精品| 2021国产精品久久精品| 香蕉久久夜色精品国产使用方法| 国产成a人亚洲精品| 欧美一二三四在线| 亚洲一二三四在线| 粉嫩av一区二区三区粉嫩| 欧美videos大乳护士334| 亚洲影视在线播放| 91麻豆产精品久久久久久| 久久久久久电影| 久久精品国产一区二区| 91精品在线观看入口| 亚洲综合免费观看高清在线观看| eeuss国产一区二区三区| 久久久久国产一区二区三区四区 | 亚洲精品成人在线| 成人av电影在线播放| 国产性天天综合网| 紧缚奴在线一区二区三区| 日韩午夜激情免费电影| 亚洲444eee在线观看| 欧美三级在线看| 亚洲国产精品视频| 欧美伊人久久久久久久久影院 | 中文无字幕一区二区三区 | 欧美日韩国产影片| 亚洲精选一二三| 99这里都是精品| 亚洲欧美在线aaa| 成人黄色综合网站| 国产精品卡一卡二| 色综合天天综合网国产成人综合天 | 轻轻草成人在线| 欧美一区二区黄| 蜜桃久久久久久久| 精品国产乱码久久久久久蜜臀| 麻豆精品一区二区| 久久综合九色综合97_久久久| 激情综合亚洲精品| 国产蜜臀av在线一区二区三区| 国产激情视频一区二区三区欧美| 久久久久久久久久久久电影 | 免费精品99久久国产综合精品| 欧美精品高清视频| 美女视频网站久久| 久久精品日产第一区二区三区高清版 | 亚洲精品大片www| 欧美日本在线观看| 伦理电影国产精品| 国产欧美视频一区二区| 91女人视频在线观看| 亚洲欧美偷拍另类a∨色屁股| 欧美视频三区在线播放| 免费观看成人鲁鲁鲁鲁鲁视频| 精品福利一区二区三区免费视频| 国产福利不卡视频| 一区二区三区.www| 日韩一区二区中文字幕| 国产精品一区二区x88av| 国产精品国产精品国产专区不蜜 | 日韩欧美成人激情| 国产福利不卡视频| 亚洲综合色噜噜狠狠| 欧美大度的电影原声| 粉嫩高潮美女一区二区三区| 亚洲制服丝袜av| 久久精品视频在线免费观看| 一本色道综合亚洲| 狠狠色丁香婷综合久久| 成人欧美一区二区三区白人 |